-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Support Ruby >=2.4 #1876
Support Ruby >=2.4 #1876
Conversation
97fea4d
to
bcc57d9
Compare
Travis does not seem to properly check out the latest commit... |
The push build is getting back to normal but the pr build is not, removing the cache and seeing if it works. |
0a42836
to
739bdd8
Compare
All green, finally! And the conflicts are easy to resolve. |
Awesome work! Can you bump the ruby version in the docker images? I would like to test the Twitter Agents for a few days. |
@dsander Done! |
Thanks! Looks good so far. |
Nice! I'll get a test deploy out to my system as well. |
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.
My instance is working well. 👍
@knu Do you think we should update the manual installation guide to ruby 2.4 as well?
Right, a note similar that should probably be enough https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/8.15-to-8.16.md#3-update-ruby. The first version of the manual installation guide used ruby |
Sorry, I use the |
@cantino Ideally the gem should completely remove its version constraints on the json gem, but in the meantime you could locally bundle update the json gem to 1.8.6 to fix the problem. |
Do you think we should wait for Rails 5.1 so that some of these deprecations go away?
|
Gemfile
Outdated
@@ -48,12 +48,12 @@ gem 'hypdf', '~> 1.0.10' # PDFInfoAgent | |||
gem 'weibo_2', github: 'dsander/weibo_2', branch: 'master' | |||
|
|||
# GoogleCalendarPublishAgent | |||
gem "google-api-client", require: 'google/api_client' | |||
gem "google-api-client", '~> 0.7.1', require: 'google/api_client' |
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 was looking into this a little for (#1874) While latest brings in 'breaking changes', it seems to be a minimal fix.
It's not updated in the migrating notes in master yet, but see:
- Update README / release notes to mention 0.10.0 googleapis/google-api-ruby-client#548
- Update MIGRATING.md googleapis/google-api-ruby-client#541
I changed to the following, and inital tests (aka, installation) seemed like it might work ok:
gem "google-api-client", require: 'google/apis'
Gemfile
Outdated
@@ -107,7 +107,7 @@ gem 'httparty', '~> 0.13' | |||
gem 'httmultiparty', '~> 0.3.16' | |||
gem 'jquery-rails', '~> 4.2.1' | |||
gem 'huginn_agent', '~> 0.4.0' | |||
gem 'json', '~> 1.8.1' | |||
gem 'json' |
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 had this changed to gem 'json', '~> 1.8.5'
in #1874, but if this works, even better!
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.
Looks good to me! A couple of minor inline comments.
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.
See inline comments. Not 100% if they are required/best to implement now.
- google-api-client
I only tested the docker image before, the deprecation warnings are a bit annoying when developing locally. Also running rake seems to be broken:
If rails 5.0.1 does not officially support ruby 2.4 I think we should wait for 5.1. |
Unsure of offical 2.4 support in 5.0.1, though found the following: This implies rails master is 2.4 compatible. 4.2.8 was the first 4.2.x version to add support for 2.4:
In reading the 5.1-beta notes, came across this snippet:
So perhaps we could run the beta version if it truly only landed in 5.1? (See also: #1912) Also, there appears to be a 5.0.2 now, it's tested against 2.4.0, and has a couple of merges specifically mentioning 2.4.0: Worth a try? |
At first I thought it was not related to changes in this PR but this test fails for me both on
After bisecting I found this commit to be the cause:
My
Works both for Maybe we should additionally set |
@dsander I updated the mock. Hopefully it's fixed now... |
@knu Yes, thanks looks good now. Can you re enable the |
@dsander Done, but one of the image builds failed... |
@knu Thanks, I fixed the build. The status did not update, but the image was build and pushed successfully: https://huginnbuilder.dsander.de/repositories/2/builds/571 Everyhing looks good to me |
Great! I'll merge this soon. |
Nice! 👏 |
Awesome! |
I know that the json gem version 1.8.6 was released the other day which supports ruby >=2.4, but there are other gems that need to be updated for ruby >=2.4, and I think this is a good opportunity for us to check on existing dependencies and move forward.