Module: TapDance::BrewCLI
- Defined in:
- lib/tap_dance/brew_cli.rb
Class Attribute Summary collapse
-
.dry_run ⇒ Object
One offing terminal commands makes it easy to stub.
- .prefix ⇒ Object
Class Method Summary collapse
- .formula_info(name) ⇒ Object
- .formula_versions(name) ⇒ Object
- .install(name, flags = "") ⇒ Object
- .list_versions(name) ⇒ Object
- .tap(url) ⇒ Object
- .tap_list ⇒ Object
- .untap(url) ⇒ Object
- .update ⇒ Object
- .upgrade(name, flags = "") ⇒ Object
Class Attribute Details
.dry_run ⇒ Object
One offing terminal commands makes it easy to stub.
12 13 14 |
# File 'lib/tap_dance/brew_cli.rb', line 12 def dry_run @dry_run end |
.prefix ⇒ Object
15 16 17 |
# File 'lib/tap_dance/brew_cli.rb', line 15 def prefix @prefix ||= exec("--prefix").strip end |
Class Method Details
.formula_info(name) ⇒ Object
35 36 37 |
# File 'lib/tap_dance/brew_cli.rb', line 35 def formula_info(name) exec "info #{name}" end |
.formula_versions(name) ⇒ Object
39 40 41 |
# File 'lib/tap_dance/brew_cli.rb', line 39 def formula_versions(name) exec "versions #{name}" end |
.install(name, flags = "") ⇒ Object
23 24 25 |
# File 'lib/tap_dance/brew_cli.rb', line 23 def install(name, flags="") exec "install #{name} #{flag_string flags}", true end |
.list_versions(name) ⇒ Object
31 32 33 |
# File 'lib/tap_dance/brew_cli.rb', line 31 def list_versions(name) exec "list --versions #{name}" end |
.tap(url) ⇒ Object
43 44 45 |
# File 'lib/tap_dance/brew_cli.rb', line 43 def tap(url) exec "tap #{url}", true end |
.tap_list ⇒ Object
51 52 53 |
# File 'lib/tap_dance/brew_cli.rb', line 51 def tap_list exec "tap" end |
.untap(url) ⇒ Object
47 48 49 |
# File 'lib/tap_dance/brew_cli.rb', line 47 def untap(url) exec "untap #{url}", true end |
.update ⇒ Object
19 20 21 |
# File 'lib/tap_dance/brew_cli.rb', line 19 def update exec "update", true end |
.upgrade(name, flags = "") ⇒ Object
27 28 29 |
# File 'lib/tap_dance/brew_cli.rb', line 27 def upgrade(name, flags="") exec "upgrade #{name} #{flag_string flags}", true end |