Module: Kibo::System
Instance Method Summary collapse
- #git(*args) ⇒ Object
- #git?(*args) ⇒ Boolean
- #heroku(*args) ⇒ Object
- #sys(*args) ⇒ Object
- #sys!(*args) ⇒ Object
Instance Method Details
#git(*args) ⇒ Object
8 9 10 |
# File 'lib/kibo/system.rb', line 8 def git(*args) sys! "git", *args end |
#git?(*args) ⇒ Boolean
12 13 14 |
# File 'lib/kibo/system.rb', line 12 def git?(*args) sys "git", *args end |
#heroku(*args) ⇒ Object
4 5 6 |
# File 'lib/kibo/system.rb', line 4 def heroku(*args) sys! "heroku", *args end |
#sys(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/kibo/system.rb', line 16 def sys(*args) quiet = args.pop if args.last == :quiet cmd = build_command(quiet, *args) result = Kernel.send "`", "bash -c \"#{cmd}\"" if command_succeeded?(quiet, cmd) result.chomp end end |
#sys!(*args) ⇒ Object
26 27 28 |
# File 'lib/kibo/system.rb', line 26 def sys!(*args) sys(*args) || exit(1) end |