Sha256: d9690e8bf6b33e6dfc686d380bb6a73dc6a131caaa083a89727ce3dca81b8be2

Contents?: true

Size: 690 Bytes

Versions: 17

Compression:

Stored size: 690 Bytes

Contents

# frozen_string_literal: true

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

      auditable
      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

17 entries across 17 versions & 1 rubygems

Version Path
license_finder-5.11.1 lib/license_finder/cli/approvals.rb
license_finder-5.11.0 lib/license_finder/cli/approvals.rb
license_finder-5.10.2 lib/license_finder/cli/approvals.rb
license_finder-5.10.1 lib/license_finder/cli/approvals.rb
license_finder-5.10.0 lib/license_finder/cli/approvals.rb
license_finder-5.9.2 lib/license_finder/cli/approvals.rb
license_finder-5.9.1 lib/license_finder/cli/approvals.rb
license_finder-5.9.0 lib/license_finder/cli/approvals.rb
license_finder-5.8.0 lib/license_finder/cli/approvals.rb
license_finder-5.7.1 lib/license_finder/cli/approvals.rb
license_finder-5.7.0 lib/license_finder/cli/approvals.rb
license_finder-5.6.2 lib/license_finder/cli/approvals.rb
license_finder-5.6.1 lib/license_finder/cli/approvals.rb
license_finder-5.6.0 lib/license_finder/cli/approvals.rb
license_finder-5.5.2 lib/license_finder/cli/approvals.rb
license_finder-5.5.1 lib/license_finder/cli/approvals.rb
license_finder-5.5.0 lib/license_finder/cli/approvals.rb