зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Make test env resilient to ruby version changes
We use pre-existence of `rake_path` to decide whether we need to regenerate dummy test gems in `tmp`. When changing rubies, the previous implementation will believe that the correct `rake_path` exists and avoids regenerating dummy gems, given an error like the following when specs are run: ``` (...) Could not find rubygems-generate_index lib directory in /path/to/rubygems/bundler/tmp/1/gems/base/ruby/3.2.0 # ./spec/support/builders.rb:253:in `block in update_repo' # ./spec/support/helpers.rb:337:in `block in with_gem_path_as' # ./spec/support/helpers.rb:351:in `without_env_side_effects' # ./spec/support/helpers.rb:332:in `with_gem_path_as' # ./spec/support/builders.rb:251:in `update_repo' # ./spec/support/builders.rb:228:in `build_repo' # ./spec/support/builders.rb:197:in `build_repo4' # ./spec/commands/lock_spec.rb:103:in `block (2 levels) in <top (required)>' (...) ``` To fix this, fix the part of the path that depends on the implementation and the Ruby version so that we don't give false positives. https://github.com/rubygems/rubygems/commit/fafacfa210
This commit is contained in:
Родитель
71dec15a70
Коммит
7feccb123a
|
@ -266,7 +266,7 @@ module Spec
|
|||
end
|
||||
|
||||
def rake_path
|
||||
Dir["#{base_system_gems}/**/rake*.gem"].first
|
||||
Dir["#{base_system_gems}/#{Bundler.ruby_scope}/**/rake*.gem"].first
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Загрузка…
Ссылка в новой задаче