Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Support file structure of ruby core repository.#6743

Merged
20 commits merged intomasterfrom
support-structure-of-ruby-core
Nov 16, 2018
Merged

Support file structure of ruby core repository.#6743
20 commits merged intomasterfrom
support-structure-of-ruby-core

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented Oct 16, 2018

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.

@hsbt hsbt changed the title Support file structure of ruby core repository. [WIP] Support file structure of ruby core repository. Oct 16, 2018
@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Oct 16, 2018

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__)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to avoid this? Using a rescue to support Ruby core does not seem nice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no solution yet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use File.file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/bundler/version string was used the other example directory. This string can be only once in gemspec.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Oct 17, 2018

I'm still working this. After merging #6742, I will rebase and test with the current ruby core HEAD.

@hsbt hsbt force-pushed the support-structure-of-ruby-core branch from 3bb9fdb to 6d2c0d2 Compare October 20, 2018 11:01
@colby-swandale colby-swandale added this to the 2.0.0 milestone Oct 29, 2018
@colby-swandale colby-swandale removed this from the 2.0.0 milestone Oct 30, 2018
@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Nov 1, 2018

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.

@hsbt hsbt changed the title [WIP] Support file structure of ruby core repository. Support file structure of ruby core repository. Nov 1, 2018
@hsbt hsbt added this to the 2.0.0 milestone Nov 3, 2018
require File.expand_path("../lib/bundler/version", __FILE__)
rescue LoadError
# for Ruby core repository
require File.expand_path("../bundler/version", __FILE__)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use File.file?


config.before :suite do
if ENV["BUNDLE_RUBY"]
@orig_ruby = Gem.ruby
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when won't ruby -rrubygems -S gem invoke ruby gems?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Nov 12, 2018

@segiddins @colby-swandale Do you have additional comments or feedback? I will merge this a few days later.

@hsbt
Copy link
Copy Markdown
Member Author

hsbt commented Nov 16, 2018

@bundlerbot r+

ghost pushed a commit that referenced this pull request Nov 16, 2018
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>
@ghost
Copy link
Copy Markdown

ghost commented Nov 16, 2018

Build succeeded

@ghost ghost merged commit 2aa84b2 into master Nov 16, 2018
@colby-swandale
Copy link
Copy Markdown
Member

Ah, sorry i didn't reply @hsbt, i missed the ping 🙇. I had no more issues, so i'm happy to see this merged.

@deivid-rodriguez deivid-rodriguez deleted the support-structure-of-ruby-core branch November 16, 2018 10:16
hsbt added a commit that referenced this pull request Nov 16, 2018
  #6743 was failed with ruby core repository and ignored working example.
  Fixed them.
@hsbt hsbt mentioned this pull request Nov 16, 2018
ghost pushed a commit that referenced this pull request Nov 16, 2018
6786: Followed up #6743 r=hsbt a=hsbt

### What was the end-user problem that led to this PR?

#6743 was failed with ruby core repository and ignored working example.

I fixed them.


Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
hsbt added a commit that referenced this pull request Nov 16, 2018
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)
hsbt added a commit that referenced this pull request Nov 16, 2018
6786: Followed up #6743 r=hsbt a=hsbt

I fixed them.

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 9cfe9bd)
hsbt added a commit that referenced this pull request Dec 11, 2018
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)
hsbt added a commit that referenced this pull request Dec 11, 2018
6786: Followed up #6743 r=hsbt a=hsbt

I fixed them.

Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
(cherry picked from commit 9cfe9bd)
(cherry picked from commit a7207e1)
colby-swandale pushed a commit that referenced this pull request Dec 11, 2018
* 1-17-stable:
  Version 1.17.2 with changelog
  Merge #6798
  Merge #6818
  Merge #6786
  Merge #6743
  Merge #6742
  Merge #6740
  Merge #6834
  Merge pull request #6752 from bundler/indirect/backport-6737
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants