Sha256: 60f5afe180e6a9fbabb13a93a93e510bb849abb075ed5e3886afe90a2dc88934

Contents?: true

Size: 622 Bytes

Versions: 3

Compression:

Stored size: 622 Bytes

Contents

# frozen_string_literal: true

require_relative '../command'

module Spandx
  module Commands
    class Build < Spandx::Command
      def initialize(options)
        @options = options
      end

      def execute(output: $stdout)
        index = Spandx::Index.new(directory: @options[:directory])
        gateways.each do |gateway|
          gateway.update!(index)
        end
        output.puts 'OK'
      end

      private

      def catalogue
        Spandx::Catalogue.from_git
      end

      def gateways
        [
          Spandx::Gateways::Nuget.new(catalogue: catalogue)
        ]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spandx-0.5.0 lib/spandx/commands/build.rb
spandx-0.4.1 lib/spandx/commands/build.rb
spandx-0.4.0 lib/spandx/commands/build.rb