Support file structure of ruby core repository.#6743
Conversation
|
I will add another commits later. |
| require File.expand_path("../lib/bundler/version", __FILE__) | ||
| rescue LoadError | ||
| # for Ruby core repository | ||
| require File.expand_path("../bundler/version", __FILE__) |
There was a problem hiding this comment.
Is there a way to avoid this? Using a rescue to support Ruby core does not seem nice.
There was a problem hiding this comment.
lib/bundler/version string was used the other example directory. This string can be only once in gemspec.
There was a problem hiding this comment.
|
I'm still working this. After merging #6742, I will rebase and test with the current ruby core HEAD. |
They are replaced build binary on ruby core repository.
The ruby core repository couldn't invoke its examples.
them after finished bundler rspec.
3bb9fdb to
6d2c0d2
Compare
|
I finished to fix or skip failing examples on ruby core repository. the all of examples is working fine on ruby core repository with ruby/ruby#1991. |
| require File.expand_path("../lib/bundler/version", __FILE__) | ||
| rescue LoadError | ||
| # for Ruby core repository | ||
| require File.expand_path("../bundler/version", __FILE__) |
|
|
||
| config.before :suite do | ||
| if ENV["BUNDLE_RUBY"] | ||
| @orig_ruby = Gem.ruby |
There was a problem hiding this comment.
could we use around to avoid needing an ivar?
| # Pretend bundler root is rubygems root | ||
| before do | ||
| # Backing up rubygems ceriticates | ||
| FileUtils.mv(rubygems_certs_dir, rubygems_certs_dir + ".back") if ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"] |
There was a problem hiding this comment.
can this use the helper method for the conditional?
| args = %("#{args}") | ||
| end | ||
| sys_exec("#{Gem.ruby} -rrubygems -S gem --backtrace #{command} #{args}") | ||
| gem = ENV["BUNDLE_GEM"] || "#{Gem.ruby} -rrubygems -S gem --backtrace" |
There was a problem hiding this comment.
when won't ruby -rrubygems -S gem invoke ruby gems?
There was a problem hiding this comment.
ENV["BUNDLE_GEM"] was stored $(srcdir)/bin/gem from ruby source repository. In ruby core repository, It needs to works working directory without source directory.
…e/setup_spec.rb:896
|
@segiddins @colby-swandale Do you have additional comments or feedback? I will merge this a few days later. |
|
@bundlerbot r+ |
6743: Support file structure of ruby core repository. r=hsbt a=hsbt ### What was the end-user problem that led to this PR? In the ruby core repository, I put bundler executable and bundler libraries under the `bin` and `lib` directories. It breaks the current behavior. ### What is your fix for the problem, implemented in this PR? Support the structure of ruby core repository. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
Build succeeded |
|
Ah, sorry i didn't reply @hsbt, i missed the ping 🙇. I had no more issues, so i'm happy to see this merged. |
#6743 was failed with ruby core repository and ignored working example. Fixed them.
6743: Support file structure of ruby core repository. r=hsbt a=hsbt In the ruby core repository, I put bundler executable and bundler libraries under the `bin` and `lib` directories. It breaks the current behavior. Support the structure of ruby core repository. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 172ec59)
6743: Support file structure of ruby core repository. r=hsbt a=hsbt In the ruby core repository, I put bundler executable and bundler libraries under the `bin` and `lib` directories. It breaks the current behavior. Support the structure of ruby core repository. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org> (cherry picked from commit 172ec59) (cherry picked from commit 02cd169)
What was the end-user problem that led to this PR?
In the ruby core repository, I put bundler executable and bundler libraries under the
binandlibdirectories. It breaks the current behavior.What is your fix for the problem, implemented in this PR?
Support the structure of ruby core repository.