-
-
Notifications
You must be signed in to change notification settings - Fork 753
Updates from rspec-dev (2015-08-11) #2057
Updates from rspec-dev (2015-08-11) #2057
Conversation
Seeing if rspec/rspec-dev#116 is fixed |
f105158
to
9c38b66
Compare
I'm not quite sure why this is broken now, I don't think this effects JRuby anymore right? |
9c38b66
to
cff6161
Compare
@@ -23,6 +23,18 @@ function is_mri_192 { | |||
fi | |||
} | |||
|
|||
function is_mri_192_plus { | |||
if is_mri; then | |||
if ruby -e "exit(RUBY_VERSION.to_f > 1.9)"; 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.
This conditional isn't right. It returns false
on 1.9.2 and 1.9.3. You need RUBY_VERSION.to_f >= 1.9
or RUBY_VERSION.to_f > 1.8
to have it return true on 1.9.2 and 1.9.3.
No idea. Travis won't even let me see the build details right now :(. It tells me the repo is in active. |
if is_mri_192_plus; then | ||
export RUBYOPT="--disable=gem" | ||
else | ||
export RUBYOPT="" |
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 believe this line might be causing the JRuby failures -- perhaps on JRuby the RUBYOPT
env var already has a value? Here you are clearing it. Is this line necessary?
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 added this as a latter attempt thinking the same thing (that the RUBYOPT
already had a value and was poisioning the environment on line 60)
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.
In case you haven't found it yet, here's the list of default Travis environment vars set: http://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
I couldn't find a specific reference to RUBYOPT
in their docs.
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.
While travis might not set RUBYOPT
, I wonder if RVM does (which I believe travis uses).
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.
Doesn't look like it. I ran a quick test on Travis for my open rspec-support PR. I dumped env
from the travis config via bundle_install
and in script/run_build
using bundle exec ruby -rpp -e 'pp ENV'
. I don't see RUBYOPT
set anywhere by CI.
You can see the output (I only ran Ruby 1.8.7, 2.2, and JRuby): https://travis-ci.org/rspec/rspec-support/builds/75377043
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.
So I decided to dump ruby --help
: https://travis-ci.org/rspec/rspec-support/builds/75378049
Seems JRuby doesn't have a --disable=gem
but it does have a --disable-gems
. While it's not in ruby --help
output, it seems MRI also responds to --diable-gems
, see: https://travis-ci.org/rspec/rspec-support/builds/75378414
I didn't echo it in the output, but the script runs ruby --disable-gems -e 'gem "rake"'
after running ruby --help
. From what I can tell only 1.8.7 and REE don't support this opt so you'll see:
ruby: invalid option --disable-gems (-h will show valid options)
Otherwise MRI will show:
-e:1:in `<main>': undefined method `gem' for main:Object (NoMethodError)
and JRuby (including JRuby in 1.8.7 mode) will show:
NoMethodError: undefined method `gem' for main:Object
cff6161
to
4051612
Compare
…08-11-for-master Updates from rspec-dev (2015-08-11)
…2015-08-11-for-master Updates from rspec-dev (2015-08-11)
These are some updates, generated from rspec-dev's rake tasks.