Skip to content

Minimal update for Ruby testing on El Capitan #1838

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

Merged
merged 1 commit into from
Jan 8, 2016

Conversation

jqr
Copy link
Contributor

@jqr jqr commented Jan 7, 2016

This PR addresses running the Ruby integration tests on El Capitan

One of the development dependencies of the generated Ruby client is autotest-fsevent. It's used to detect file system changes and re-run the tests automatically. Building the clients works fine, but when attempting to run the integration tests for Ruby with the latest OS X (El Capitan) it errors out with this message:

Installing autotest-fsevent 0.2.10 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/autotest-fsevent-0.2.10/ext/fsevent
/usr/local/var/rbenv/versions/2.3.0/bin/ruby -r ./siteconf20160107-72766-a9grd3.rb extconf.rb
extconf.rb:24:in `<main>': Darwin 15 is not (yet) supported (RuntimeError)

extconf failed, exit code 1

Gem files will remain installed in /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/autotest-fsevent-0.2.10 for inspection.
Results logged to /usr/local/var/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/autotest-fsevent-0.2.10/gem_make.out
Using typhoeus 0.7.1
Using webmock 1.21.0
Using rspec 3.2.0
An error occurred while installing autotest-fsevent (0.2.10), and Bundler cannot
continue.
Make sure that `gem install autotest-fsevent -v '0.2.10'` succeeds before

The issue is fixed in the latest version of autotest-fsevent, v0.2.11, see CHANGELOG.

We could fix this in two ways:

  1. Adjust the version locked in samples/client/petstore/ruby/Gemfile.lock. Typically Gemfile.lock files are not actually checked in on Ruby gems, so either updating the version to 0.2.11 or removing the file entirely would be workable.
  2. Adjust the development dependency to include latest version.

I opted for 2 because it seemed like a much simpler change and more in-line with how the project was being managed. I'm happy to do the work to handle 1 if you prefer.

@jqr
Copy link
Contributor Author

jqr commented Jan 7, 2016

I think the TravisCI failure here is unrelated (stall detected) and I don't see how changing the gem version would cause this. Almost all PRs in the last 24hrs have this problem.

@fehguy
Copy link
Contributor

fehguy commented Jan 7, 2016

thanks. Fixing the travis issue now...

@fehguy
Copy link
Contributor

fehguy commented Jan 7, 2016

Hi, please rebase with master. The .travis.yml file needs to be updated for the PR to pass.

@jqr jqr force-pushed the ruby-el-capitan branch from da9276a to c0da950 Compare January 7, 2016 23:17
@jqr
Copy link
Contributor Author

jqr commented Jan 8, 2016

Failure seems to be on a single field, only in oraclejdk7. Not even sure how that could be related. Is this a known issue?

[INFO] --- exec-maven-plugin:1.2.1:exec (bundle-test) @ RubyPetstoreClientTests ---
...........................F............
Failures:
  1) Pet pet methods should fetch a pet object
     Failure/Error: pet.tags[0].name.should == "tag test"
     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/pet_spec.rb:49:in `block (3 levels) in <top (required)>'

@fehguy
Copy link
Contributor

fehguy commented Jan 8, 2016

Travis has been mad lately. Some of it's my fault--I've retriggered the build.

@wing328
Copy link
Contributor

wing328 commented Jan 8, 2016

@jqr the change looks good to me and I'll merge later today.

wing328 added a commit that referenced this pull request Jan 8, 2016
Minimal update for Ruby testing on El Capitan
@wing328 wing328 merged commit 8bd7640 into swagger-api:master Jan 8, 2016
@jqr jqr deleted the ruby-el-capitan branch January 15, 2016 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants