Sha256: 3113e08987b61e38b53da8c721085faa50b4ddf4c968a7109055bede71f13733

Contents?: true

Size: 967 Bytes

Versions: 42

Compression:

Stored size: 967 Bytes

Contents

require 'aruba/api'

module Aruba
  module Api
    # The original version installs bundle and doesn't check if the gemset is clean, so we can't use it
    alias_method :orig_use_clean_gemset, :use_clean_gemset unless method_defined?(:orig_use_clean_gemset)

    def use_clean_gemset(gemset)
      unset_bundler_env_vars
      #      orig_use_clean_gemset gemset
      run_simple(%{rvm gemset create "#{gemset}"}, true)
      if all_stdout =~ /'#{gemset}' gemset created \((.*)\)\./
        gem_home = $1
        set_env('GEM_HOME', gem_home)
        set_env('GEM_PATH', gem_home)
        set_env('BUNDLE_PATH', gem_home)

        paths = (ENV['PATH'] || "").split(File::PATH_SEPARATOR)
        paths.unshift(File.join(gem_home, 'bin'))
        set_env('PATH', paths.uniq.join(File::PATH_SEPARATOR))
      else
        raise "I didn't understand rvm's output: #{all_stdout}"
      end

      run_simple(%{rvm --force gemset empty "#{gemset}"}, true)
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
fwtoolkit-2.6.4 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.6.3 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.6.2 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.6.1 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.6.0 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.5.0 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.4.0 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.6 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.5 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.4 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.3 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.2 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.1 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.3.0 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.2.4 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.2.3 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.2.2 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.2.1 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.2.0 features/support/lib_test/aruba_mod.rb
fwtoolkit-2.1.10 features/support/lib_test/aruba_mod.rb