class XZGit::XZInteCommit
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
XZGit::Command::new
# File lib/mrbin/xzcommand/xzintegratecommit.rb, line 12 def initialize(argv) @std = argv.flag?('std',false) super end
options()
click to toggle source
Calls superclass method
# File lib/mrbin/xzcommand/xzintegratecommit.rb, line 6 def self.options [ ['--std','target branch name'], ].concat(super) end
Public Instance Methods
run()
click to toggle source
# File lib/mrbin/xzcommand/xzintegratecommit.rb, line 27 def run pwdpath = Dir.pwd.strip podfilepath = "#{pwdpath}/Podfile" if @std res = `cat #{podfilepath} | grep commit | grep -v MJRefresh | grep -v XZMonitor` puts res else `cat #{podfilepath} | grep commit | grep -v MJRefresh | grep -v XZMonitor > commit.txt` end end
validate!()
click to toggle source
Calls superclass method
# File lib/mrbin/xzcommand/xzintegratecommit.rb, line 17 def validate! super pwdpath = Dir.pwd.strip podfilepath = "#{pwdpath}/Podfile" if !File.exist?(podfilepath) puts "can not found Podfile, please inspect your project path" exit(1) end end