Class: LicenseFinder::CLI::Dependencies
Instance Method Summary collapse
Methods included from Subcommand
Methods included from MakesDecisions
Instance Method Details
#add(name, license, version) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/license_finder/cli/dependencies.rb', line 14 def add(name, license, version) do decisions .add_package(name, version, txn) .license(name, license, txn) decisions.homepage(name, [:homepage], txn) if [:homepage] decisions.approve(name, txn) if [:approve] end if [:approve] printer.say "The #{name} dependency has been added and approved!", :green else printer.say "The #{name} dependency has been added!", :green end end |
#list ⇒ Object
38 39 40 41 |
# File 'lib/license_finder/cli/dependencies.rb', line 38 def list printer.say 'Manually Added Dependencies:', :blue say_each(decisions.packages, &:name) end |
#remove(name) ⇒ Object
31 32 33 34 35 |
# File 'lib/license_finder/cli/dependencies.rb', line 31 def remove(name) { decisions.remove_package(name, txn) } printer.say "The #{name} dependency has been removed.", :green end |