Skip to content

Commit 0a8ed97

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Helper for hax file
ruby/rubygems@8b7ddf8a07
1 parent c115e3d commit 0a8ed97

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

spec/bundler/support/helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def build_ruby_cmd(options = {})
172172
requires << "#{Path.spec_dir}/support/artifice/#{artifice}.rb"
173173
end
174174

175-
requires << "#{Path.spec_dir}/support/hax.rb"
175+
requires << hax
176176

177177
require_option = requires.map {|r| "-r#{r}" }
178178

@@ -186,7 +186,7 @@ def gembin(cmd, options = {})
186186

187187
def gem_command(command, options = {})
188188
env = options[:env] || {}
189-
env["RUBYOPT"] = opt_add(opt_add("-r#{spec_dir}/support/hax.rb", env["RUBYOPT"]), ENV["RUBYOPT"])
189+
env["RUBYOPT"] = opt_add(opt_add("-r#{hax}", env["RUBYOPT"]), ENV["RUBYOPT"])
190190
options[:env] = env
191191

192192
# Sometimes `gem install` commands hang at dns resolution, which has a

spec/bundler/support/path.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def man_dir
7575
@man_dir ||= lib_dir.join("bundler/man")
7676
end
7777

78+
def hax
79+
@hax ||= spec_dir.join("support/hax.rb")
80+
end
81+
7882
def tracked_files
7983
@tracked_files ||= git_ls_files(tracked_files_glob)
8084
end

0 commit comments

Comments
 (0)