Sha256: 8d024c83c16adb01a6a557e65e46419922f91ba987515ee1068cadf4eed2cda3
Contents?: true
Size: 608 Bytes
Versions: 9
Compression:
Stored size: 608 Bytes
Contents
# frozen_string_literal: true module Spandx module Commands class Scan < Spandx::Command attr_reader :lockfile def initialize(lockfile, options) @lockfile = lockfile ? ::Pathname.new(File.expand_path(lockfile)) : nil @options = options end def execute(output: $stdout) if lockfile.nil? output.puts 'OK' else report = Report.new Parsers.for(lockfile).parse(lockfile).each do |dependency| report.add(dependency) end output.puts report.to_json end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems