Sha256: 03fc16abbdb920be8cf1abf5115974851afb5dcc4a1edb289d14bf17b031dc43

Contents?: true

Size: 707 Bytes

Versions: 26

Compression:

Stored size: 707 Bytes

Contents

# frozen_string_literal: true

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

      auditable
      approvable
      desc 'add DEPENDENCY...', 'Approve one or more dependencies by name'
      def add(*names)
        assert_some names
        modifying { names.each { |name| decisions.approve(name, txn) } }

        say "The #{names.join(', ')} dependency has been approved!", :green
      end

      auditable
      desc 'remove DEPENDENCY', 'Unapprove a dependency'
      def remove(dep)
        modifying { decisions.unapprove(dep, txn) }

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

Version data entries

26 entries across 26 versions & 2 rubygems

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