Class: LicenseFinder::CLI::Licenses
Instance Method Summary collapse
Methods included from Subcommand
Methods included from MakesDecisions
Instance Method Details
#add(name, license) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/license_finder/cli/licenses.rb', line 12 def add(name, license) { decisions.license(name, license, txn) } version_info = [:version] ? " with version #{[:version]}" : '' printer.say "The #{name} dependency#{version_info} has been marked as using #{license} license!", :green end |
#remove(dep, lic = nil) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/license_finder/cli/licenses.rb', line 22 def remove(dep, lic = nil) { decisions.unlicense(dep, lic, txn) } version_info = [:version] ? " with version #{[:version]}" : '' suffix = lic ? " of #{lic}" : '' printer.say "The dependency #{dep}#{version_info} no longer has a manual license#{suffix}" end |