Class: LicenseFinder::CLI::Dependencies
- Inherits:
-
Subcommand
- Object
- Thor
- Base
- Subcommand
- LicenseFinder::CLI::Dependencies
- Defined in:
- lib/license_finder/cli.rb
Instance Method Summary collapse
Methods inherited from Subcommand
Methods inherited from Base
Instance Method Details
#add(license, name, version = nil) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/license_finder/cli.rb', line 44 def add(license, name, version = nil) die_on_error { DependencyManager.create_non_bundler(license, name, version) DependencyManager.approve!(name) if [:approve] } if [:approve] say "The #{name} dependency has been added and approved!", :green else say "The #{name} dependency has been added!", :green end end |
#remove(name) ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/license_finder/cli.rb', line 57 def remove(name) die_on_error { DependencyManager.destroy_non_bundler(name) } say "The #{name} dependency has been removed.", :green end |