Sha256: 7ba26ff2667e6fff0ec800aa2c7af2fce6781a60d9c7d0f95230f9a701a6467b

Contents?: true

Size: 754 Bytes

Versions: 89

Compression:

Stored size: 754 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'eac_ruby_utils/ruby/command'
require 'delegate'

module EacRubyGemsUtils
  class Gem
    class Command < ::EacRubyUtils::Ruby::Command
      attr_reader :gem

      def initialize(gem, command_args, extra_options = {})
        @gem = gem
        super(command_args, extra_options.merge(host_env: gem.host_env))
      end

      # Changes current directory to the gem's directory.
      def chdir_root
        chdir(gem.root.to_path)
      end

      def envvar_gemfile
        envvar('BUNDLE_GEMFILE', gem.gemfile_path.to_path)
      end

      protected

      def duplicate(command, extra_options)
        self.class.new(gem, command, extra_options)
      end
    end
  end
end

Version data entries

89 entries across 89 versions & 3 rubygems

Version Path
avm-tools-0.102.1 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.4 lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.102.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.101.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.100.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.99.1 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.3 lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.99.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.98.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.2 lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.97.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.96.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.1 lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.95.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.94.3 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.0 lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.94.2 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.94.1 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.94.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.93.0 vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb