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.120.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.119.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.118.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.117.3 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.117.2 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.117.1 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.117.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.116.2 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.10 lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.116.1 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.116.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.115.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.114.2 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.114.1 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.114.0 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.113.6 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.113.5 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.113.4 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
avm-tools-0.113.3 sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/command.rb
eac_ruby_gems_utils-0.9.9 lib/eac_ruby_gems_utils/gem/command.rb