-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates from rspec-dev (2019-01-03) #2061
Updates from rspec-dev (2019-01-03) #2061
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
41001bb
to
e5d7cb2
Compare
Yes, again, this wasn't the WIP repo, so it got updated last. |
Once I had rspec/rspec-support#362 working the changes got backported |
8830e4a
to
6d370ad
Compare
It seems the CI install multiple version of Bundler. I saw that your task install bundler then try to uninstall bundler if Rails version is under 5 then install bundler 1.17.3. Reading : https://travis-ci.org/rspec/rspec-rails/jobs/475443754
I count 3 versions before running RSpec test suite. Why did you prefer to add a specific uninstall script rather than installing bundler at the right version first in |
source script/functions.sh | ||
|
||
if is_ruby_23_plus; then | ||
if ruby -e "exit(!(ENV['RAILS_VERSION'].to_f < 5))"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a mistake. We don't need the bang.
With:
set -e
ruby -v
echo $RAILS_VERSION
function is_ruby_23_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
return 0
else
return 1
fi
}
if is_ruby_23_plus; then
if ruby -e "exit(ENV['RAILS_VERSION'].to_f < 5)"; then
# On Rails versions less than 5, Bundler 2.0 is not supported
echo "Warning dowgrading to older version of Bundler"
gem uninstall bundler
gem install bundler -v '1.17.3'
else
echo "Rails >= 5"
fi
fi
output
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
~> 4.2.0
Warning dowgrading to older version of Bundler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes a typo from a half way though
if is_ruby_23_plus; then | ||
if ruby -e "exit(!(ENV['RAILS_VERSION'].to_f < 5))"; then | ||
# On Rails versions less than 5, Bundler 2.0 is not supported | ||
echo "Warning dowgrading to older version of Bundler" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups "downgrading" 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
6d370ad
to
9462508
Compare
@benoittgt I want to leave the current rspec-dev as is given rspec-rails is different, this is the easiest fix for older Rails, when rspec-rails 4 is release I expect this will go away quite quickly, as it drops older Rails in line with Rails |
The CI is failing on few versions. It seems we are getting bundler from the image/cache. https://travis-ci.org/rspec/rspec-rails/jobs/476497133 Maybe in downgrading bundler version we should uninstall all versions then install 1.7.3 |
I just saw that you do it.. |
946e792
to
1e26b28
Compare
Maybe we should add logs to see $ gem info -a bundler [17:51:45]
*** LOCAL GEMS ***
bundler (1.17.3, 1.17.2)
Authors: André Arko, Samuel Giddins, Colby Swandale, Hiroshi
Shibata, David Rodríguez, Grey Baker, Stephanie Morillo, Chris
Morris, James Wen, Tim Moore, André Medeiros, Jessica Lynn Suttles,
Terence Lee, Carl Lerche, Yehuda Katz
Homepage: http://bundler.io
License: MIT
Installed at (1.17.3, default): /Users/benoit.tigeot/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0
(1.17.2): /Users/benoit.tigeot/.rvm/gems/ruby-2.5.1
The best way to manage your application's dependencies |
No more blocking on my side. We need change CI state
1a9661d
to
bf41d9c
Compare
Thanks for the patch. I am wondering if it is related to:
But we don't have Gemfile.lock.. Other scenario could be to declare the bundler version we want to use with |
I believe it's because Travis uses rvm and it has bundler 2 on Ruby 2.3 by default as a globally installed gem, picking the bundler version manually should also work but I'd rather actually uninstall it if I can |
Ok it seems it is not working. Maybe we can try this ugly hack 😞 Edit1: I saw some people moving from what you did to |
bf41d9c
to
b64cd41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sound good for the moment. Congratulations Jon!
These are some updates, generated from rspec-dev's rake tasks.