Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Updates from rspec-dev (2015-08-11) #2057

Merged
merged 1 commit into from
Aug 13, 2015

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Aug 11, 2015

These are some updates, generated from rspec-dev's rake tasks.

@JonRowe
Copy link
Member Author

JonRowe commented Aug 11, 2015

Seeing if rspec/rspec-dev#116 is fixed

@JonRowe JonRowe force-pushed the update-travis-build-scripts-2015-08-11-for-master branch 2 times, most recently from f105158 to 9c38b66 Compare August 11, 2015 22:21
@JonRowe
Copy link
Member Author

JonRowe commented Aug 12, 2015

I'm not quite sure why this is broken now, I don't think this effects JRuby anymore right?

@JonRowe JonRowe force-pushed the update-travis-build-scripts-2015-08-11-for-master branch from 9c38b66 to cff6161 Compare August 12, 2015 08:24
@@ -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
Copy link
Member

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.

@myronmarston
Copy link
Member

I'm not quite sure why this is broken now, I don't think this effects JRuby anymore right?

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=""
Copy link
Member

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?

Copy link
Member Author

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)

Copy link
Member

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.

Copy link
Member

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).

Copy link
Member

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

Copy link
Member

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

@JonRowe JonRowe force-pushed the update-travis-build-scripts-2015-08-11-for-master branch from cff6161 to 4051612 Compare August 13, 2015 09:22
JonRowe added a commit that referenced this pull request Aug 13, 2015
…08-11-for-master

Updates from rspec-dev (2015-08-11)
@JonRowe JonRowe merged commit bd99647 into master Aug 13, 2015
@JonRowe JonRowe deleted the update-travis-build-scripts-2015-08-11-for-master branch August 13, 2015 09:38
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this pull request Oct 30, 2020
…2015-08-11-for-master

Updates from rspec-dev (2015-08-11)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants