Sha256: ebe36176b12f9036e0480440274b2b642bccf43d12eaa8b2c933459221476850

Contents?: true

Size: 1.06 KB

Versions: 24

Compression:

Stored size: 1.06 KB

Contents

module Steep
  module Drivers
    class Vendor
      attr_reader :stdout
      attr_reader :stderr
      attr_reader :stdin

      attr_accessor :vendor_dir
      attr_accessor :clean_before

      def initialize(stdout:, stderr:, stdin:)
        @stdout = stdout
        @stderr = stderr
        @stdin = stdin

        @clean_before = false
        @vendor_dir = nil
      end

      def run
        stdout.puts "Vendoring into #{vendor_dir}..."

        vendorer = RBS::Vendorer.new(vendor_dir: vendor_dir)

        if clean_before
          stdout.puts "  Cleaning directory..."
          vendorer.clean!
        end

        stdout.puts "  Vendoring standard libraries..."
        vendorer.stdlib!

        if defined?(Bundler)
          Bundler.locked_gems.specs.each do |spec|
            if RBS::EnvironmentLoader.gem_sig_path(spec.name, spec.version.to_s).directory?
              stdout.puts "  Vendoring rubygem: #{spec.full_name}..."
              vendorer.gem! spec.name, spec.version.to_s
            end
          end
        end

        0
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
steep-0.34.0 lib/steep/drivers/vendor.rb
steep-0.33.0 lib/steep/drivers/vendor.rb
steep-0.32.0 lib/steep/drivers/vendor.rb
steep-0.31.1 lib/steep/drivers/vendor.rb
steep-0.31.0 lib/steep/drivers/vendor.rb
steep-0.30.0 lib/steep/drivers/vendor.rb
steep-0.29.0 lib/steep/drivers/vendor.rb
steep-0.28.0 lib/steep/drivers/vendor.rb
steep-0.27.0 lib/steep/drivers/vendor.rb
steep-0.25.0 lib/steep/drivers/vendor.rb
steep-0.24.0 lib/steep/drivers/vendor.rb
steep-0.23.0 lib/steep/drivers/vendor.rb
steep-0.22.0 lib/steep/drivers/vendor.rb
steep-0.21.0 lib/steep/drivers/vendor.rb
steep-0.20.0 lib/steep/drivers/vendor.rb
steep-0.19.0 lib/steep/drivers/vendor.rb
steep-0.18.0 lib/steep/drivers/vendor.rb
steep-0.17.1 lib/steep/drivers/vendor.rb
steep-0.17.0 lib/steep/drivers/vendor.rb
steep-0.16.3 lib/steep/drivers/vendor.rb