Class: Edploy::Git
- Inherits:
-
Object
- Object
- Edploy::Git
- Defined in:
- lib/edployscripts/git.rb
Class Method Summary collapse
Class Method Details
.git(*opts) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/edployscripts/git.rb', line 6 def git(*opts) = opts.last.is_a?(Hash) ? opts.pop : {} opts << "--hard" if [:hard] if = .delete(:message) opts << "-m '#{}'" end opts << '2>/dev/null' if [:silent] cmd = "git #{opts.map(&:to_s).join(' ')}" unless system(cmd) return if [:silent] abort "error while running `#{cmd}'" end end |
.method_missing(method, *args, &block) ⇒ Object
20 21 22 |
# File 'lib/edployscripts/git.rb', line 20 def method_missing(method, *args, &block) git(*([method] + args)) end |