Sha256: db4f7928c9f9f633475337d8405f4e1497bd3f26dc3dd1f4828411cdbfc718ed

Contents?: true

Size: 1.02 KB

Versions: 37

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true
module Licensed
  module Commands
    class List < Command
      # Returns the default reporter to use during the command run
      #
      # options - The options the command was run with
      #
      # Returns a Licensed::Reporters::ListReporter
      def default_reporter(options)
        Licensed::Reporters::ListReporter.new
      end

      protected

      # Listing dependencies requires no extra work.
      #
      # app - The application configuration for the dependency
      # source - The dependency source enumerator for the dependency
      # dependency - An application dependency
      # report - A report hash for the command to provide extra data for the report output.
      #
      # Returns true.
      def evaluate_dependency(app, source, dependency, report)
        report["dependency"] = dependency.name
        report["version"] = dependency.version

        if options[:licenses]
          report["license"] = dependency.license_key
        end

        true
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
licensed-5.0.3 lib/licensed/commands/list.rb
licensed-5.0.2 lib/licensed/commands/list.rb
licensed-5.0.1 lib/licensed/commands/list.rb
licensed-5.0.0 lib/licensed/commands/list.rb
licensed-4.5.0 lib/licensed/commands/list.rb
licensed-4.4.0 lib/licensed/commands/list.rb
licensed-4.3.1 lib/licensed/commands/list.rb
licensed-4.3.0 lib/licensed/commands/list.rb
licensed-4.2.0 lib/licensed/commands/list.rb
licensed-4.1.0 lib/licensed/commands/list.rb
licensed-4.0.4 lib/licensed/commands/list.rb
licensed-4.0.3 lib/licensed/commands/list.rb
licensed-4.0.2 lib/licensed/commands/list.rb
licensed-4.0.1 lib/licensed/commands/list.rb
licensed-4.0.0 lib/licensed/commands/list.rb
licensed-3.9.1 lib/licensed/commands/list.rb
licensed-3.9.0 lib/licensed/commands/list.rb
licensed-3.8.0 lib/licensed/commands/list.rb
licensed-3.7.5 lib/licensed/commands/list.rb
licensed-3.7.4 lib/licensed/commands/list.rb