Skip to content
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

Travis CI support #11

Merged
merged 5 commits into from Oct 12, 2016
Merged

Travis CI support #11

merged 5 commits into from Oct 12, 2016

Conversation

@cromwellryan
Copy link
Contributor

cromwellryan commented Oct 12, 2016

  • Include Gemfile so Travis installs the necessary test gems (minitest)
  • .travis.yml (if necessary)
  • Build badge

relates #10

Our Gemfile delegates to the gemspec so that development uses
appropriate gems. We do not commit the Gemfile.lock because it's not
relavent to the gem.
@cromwellryan cromwellryan mentioned this pull request Oct 12, 2016
@agriffis

This comment has been minimized.

Copy link
Collaborator

agriffis commented Oct 12, 2016

Thanks! Any thoughts on why the build is failing? It runs locally for me with just rake (which is different from Travis running with bundle exec rake)

$ rake
Ignoring ffi-1.9.14 because its extensions are not built.  Try: gem pristine ffi --version 1.9.14
Ignoring json-2.0.1 because its extensions are not built.  Try: gem pristine json --version 2.0.1
/usr/bin/ruby test/rubypants_test.rb
Ignoring ffi-1.9.14 because its extensions are not built.  Try: gem pristine ffi --version 1.9.14
Ignoring json-2.0.1 because its extensions are not built.  Try: gem pristine json --version 2.0.1
Run options: --seed 33836

# Running:

...........

Finished in 0.034897s, 315.2169 runs/s, 3753.9473 assertions/s.

11 runs, 131 assertions, 0 failures, 0 errors, 0 skips
@agriffis

This comment has been minimized.

Copy link
Collaborator

agriffis commented Oct 12, 2016

Hmm, it seems to be because lib/rubypants/version.rb has

class RubyPants

and lib/rubypants/core.rb has

class RubyPants < String

and when running with bundle exec rake then these conflict. I don't know the best practice for resolving this, though.

README.rdoc Outdated
@@ -2,6 +2,8 @@

{<img src="https://img.shields.io/gem/v/rubypants.svg?style=plastic">}[https://rubygems.org/gems/rubypants]

{<img src="https://travis-ci.org/jmcnevin/rubypants.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/jmcnevin/rubypants]

This comment has been minimized.

Copy link
@agriffis

agriffis Oct 12, 2016

Collaborator

Let's use the shields.io badge with ?style=plastic so it matches the other one, and get them to render on the same line (however that works in rdoc)

This comment has been minimized.

Copy link
@cromwellryan

cromwellryan Oct 12, 2016

Author Contributor

Totes!

@cromwellryan

This comment has been minimized.

Copy link
Contributor Author

cromwellryan commented Oct 12, 2016

RE class RubyPants < String
I'll take a look and submit back. If it's impactful and something you'd rather do in another PR, we can override the test command for Travis in the .travis.yml to just use rake vs bundle exec rake.

@cromwellryan cromwellryan force-pushed the cromwellryan:travis-ci branch from 4e98195 to 77660a2 Oct 12, 2016
@cromwellryan

This comment has been minimized.

Copy link
Contributor Author

cromwellryan commented Oct 12, 2016

At first glance, I think this might be outside the realm of this particular PR.

The common pattern would be to use a top level module of RubyPants which would expose the version. Here are a few examples:

I think the best approach for this particular PR is to override the testing task for travis until this adjustment is made.

Thoughts?

@agriffis

This comment has been minimized.

Copy link
Collaborator

agriffis commented Oct 12, 2016

Thanks for the research. I agree regarding fixing the superclass mismatch in a separate PR.

Thanks for helping out!

@agriffis agriffis merged commit efad658 into jmcnevin:master Oct 12, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@agriffis agriffis mentioned this pull request Oct 12, 2016
@cromwellryan cromwellryan changed the title wip: Travis CI support Travis CI support Oct 13, 2016
@cromwellryan cromwellryan deleted the cromwellryan:travis-ci branch Oct 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.