Sha256: 1487610ffc3d70685addc974a605d22d9ca871c02946202ec3d8d967e42339e6

Contents?: true

Size: 659 Bytes

Versions: 14

Compression:

Stored size: 659 Bytes

Contents

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

14 entries across 14 versions & 1 rubygems

Version Path
license_finder-5.4.1 lib/license_finder/cli/approvals.rb
license_finder-5.4.0 lib/license_finder/cli/approvals.rb
license_finder-5.3.0 lib/license_finder/cli/approvals.rb
license_finder-5.2.3 lib/license_finder/cli/approvals.rb
license_finder-5.2.1 lib/license_finder/cli/approvals.rb
license_finder-5.2.0 lib/license_finder/cli/approvals.rb
license_finder-5.1.1 lib/license_finder/cli/approvals.rb
license_finder-5.1.0 lib/license_finder/cli/approvals.rb
license_finder-5.0.3 lib/license_finder/cli/approvals.rb
license_finder-5.0.2 lib/license_finder/cli/approvals.rb
license_finder-5.0.0 lib/license_finder/cli/approvals.rb
license_finder-4.0.2 lib/license_finder/cli/approvals.rb
license_finder-4.0.1 lib/license_finder/cli/approvals.rb
license_finder-3.1.1 lib/license_finder/cli/approvals.rb