Sha256: b9d85624c88082068a347fd60c20e7f90cb13f3e035e60b2155d9f68b25b6602

Contents?: true

Size: 729 Bytes

Versions: 43

Compression:

Stored size: 729 Bytes

Contents

# frozen_string_literal: true

module LicenseFinder
  module CLI
    class Licenses < Base
      extend Subcommand
      include MakesDecisions

      auditable
      desc 'add DEPENDENCY LICENSE', "Set a dependency's licenses, overwriting any license_finder has found"
      def add(name, license)
        modifying { decisions.license(name, license, txn) }

        say "The #{name} dependency has been marked as using #{license} license!", :green
      end

      auditable
      desc 'remove DEPENDENCY LICENSE', 'Remove a manually set license'
      def remove(dep, lic)
        modifying { decisions.unlicense(dep, lic, txn) }

        say "The dependency #{dep} no longer has a manual license"
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
license_finder-6.15.0 lib/license_finder/cli/licenses.rb
gitlab-license_finder-6.14.2.1 lib/license_finder/cli/licenses.rb
license_finder-6.14.2 lib/license_finder/cli/licenses.rb
license_finder-6.14.1 lib/license_finder/cli/licenses.rb
license_finder-6.13.0 lib/license_finder/cli/licenses.rb
license_finder-6.12.2 lib/license_finder/cli/licenses.rb
license_finder-6.12.1 lib/license_finder/cli/licenses.rb
license_finder-6.12.0 lib/license_finder/cli/licenses.rb
license_finder-6.11.0 lib/license_finder/cli/licenses.rb
license_finder-6.10.1 lib/license_finder/cli/licenses.rb
license_finder-6.10.0 lib/license_finder/cli/licenses.rb
license_finder-6.9.0 lib/license_finder/cli/licenses.rb
license_finder-6.8.2 lib/license_finder/cli/licenses.rb
license_finder-6.8.1 lib/license_finder/cli/licenses.rb
license_finder-6.8.0 lib/license_finder/cli/licenses.rb
license_finder-6.7.0 lib/license_finder/cli/licenses.rb
license_finder-6.6.2 lib/license_finder/cli/licenses.rb
license_finder-6.6.1 lib/license_finder/cli/licenses.rb
license_finder-6.6.0 lib/license_finder/cli/licenses.rb
license_finder-6.5.0 lib/license_finder/cli/licenses.rb