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

Gemspec: Move development deps to Gemfile #248

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Sep 21, 2016

This PR moves the development dependencies out of the gemspec and into groups in the Gemfile.

It also moves the version-dependent activesupport dependency into separated Gemfiles, so that the Travis build matrix targets can choose which activesupport version is for them.

By trying to leverage Bundler's platform support, we can get away from weird hacks in the gemspec.

In the Travis build matrix each Ruby version gets its dependencies pointed out to it using the gemfile: travis.yml feature. A gemfiles/ folder is supplied.

@michaelklishin
Copy link
Member

What's the benefit of this?

@olleolleolle
Copy link
Contributor Author

After this, we can make more Gemfiles, to be able to run them next to each other, in the test platform matrix in Travis.

"You get an old ActiveSupport, you get a newer one."

All chosen via Gemfile versions, all appropriate to the versions we are testing.

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Sep 21, 2016

In travis.yml, we can include an env variable BUNDLE_GEMFILE=gemfiles/Gemfile.activesupport-4 for the build targets that need it.

And then, get rid of the weird RUBY_VERSION > '2.3' thing in the gemspec.

(Update: This turned out to be almost right. Below, we mention the gemfile Travis directive.)

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Sep 21, 2016

I could push on, in that direction, in this PR, to see if the changes bear out the promise.

Or, we could try taking it a step at a time.

@michaelklishin
Copy link
Member

Please take your idea as far as you feel necessary.

@olleolleolle
Copy link
Contributor Author

@michaelklishin Here's what the overview looks like when using the gemfile directive in the Travis build matrix https://travis-ci.org/gocardless/hutch/builds/161750953

@olleolleolle
Copy link
Contributor Author

@jensnockert Does this work around #244?

@olleolleolle olleolleolle force-pushed the feature/change-development-deps-into-bundler-groups branch from df5d7d2 to a11f540 Compare September 21, 2016 21:13
@olleolleolle
Copy link
Contributor Author

(Squashed to 1 commit: most learning Travis is best kept out of the long-term commit log.)

@michaelklishin
Copy link
Member

This no longer merges cleanly.

@michaelklishin
Copy link
Member

@olleolleolle thank you, I like this solution.

@olleolleolle olleolleolle force-pushed the feature/change-development-deps-into-bundler-groups branch from a11f540 to ea5c746 Compare September 21, 2016 22:27
@olleolleolle olleolleolle force-pushed the feature/change-development-deps-into-bundler-groups branch from ea5c746 to 950cab8 Compare September 21, 2016 22:45
@olleolleolle
Copy link
Contributor Author

@michaelklishin Rebased. Thanks for the encouragement.

@michaelklishin michaelklishin merged commit 7144496 into ruby-amqp:master Sep 21, 2016
@olleolleolle olleolleolle deleted the feature/change-development-deps-into-bundler-groups branch September 21, 2016 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants