Sha256: fdaae35b817e3b023ca30efc28dc165b5c260b19e6f865080a00270f8277efdb
Contents?: true
Size: 1.56 KB
Versions: 3
Compression:
Stored size: 1.56 KB
Contents
# frozen_string_literal: true module Licensed module Commands class List < Command # Create a reporter to use during a command run # # options - The options the command was run with # # Returns a Licensed::Reporters::ListReporter def create_reporter(options) Licensed::Reporters::ListReporter.new end protected # Run the command for all enumerated dependencies found in a dependency source, # recording results in a report. # Enumerating dependencies in the source is skipped if a :sources option # is provided and the evaluated `source.class.type` is not in the :sources values # # app - The application configuration for the source # source - A dependency source enumerator # # Returns whether the command succeeded for the dependency source enumerator def run_source(app, source) super do |report| next if Array(options[:sources]).empty? next if options[:sources].include?(source.class.type) report.warnings << "skipped source" :skip end end # 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) true end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
licensed-2.12.2 | lib/licensed/commands/list.rb |
licensed-2.12.1 | lib/licensed/commands/list.rb |
licensed-2.12.0 | lib/licensed/commands/list.rb |