Sha256: 873b5e51cc7771ace979ca84a4ea5773d7d06a688a657b2a9ee8375e7a8a02c9

Contents?: true

Size: 786 Bytes

Versions: 43

Compression:

Stored size: 786 Bytes

Contents

# frozen_string_literal: true

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

      desc 'list', 'List all the ignored dependencies'
      def list
        say 'Ignored Dependencies:', :blue
        say_each(decisions.ignored)
      end

      auditable
      desc 'add DEPENDENCY', 'Add a dependency to be ignored'
      def add(dep)
        modifying { decisions.ignore(dep, txn) }

        say "Added #{dep} to the ignored dependencies"
      end

      auditable
      desc 'remove DEPENDENCY', 'Remove a dependency from the ignored dependencies'
      def remove(dep)
        modifying { decisions.heed(dep, txn) }

        say "Removed #{dep} from the ignored dependencies"
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
license_finder-5.5.2 lib/license_finder/cli/ignored_dependencies.rb
license_finder-5.5.1 lib/license_finder/cli/ignored_dependencies.rb
license_finder-5.5.0 lib/license_finder/cli/ignored_dependencies.rb