-
Notifications
You must be signed in to change notification settings - Fork 44
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
Make graphlient run on Ruby 3.0 #81
Conversation
- Ruby <= 2.4 is EOL - Ruby 3.0 is most recent ruby as of yesterday
GraphQL fixed a Ruby 3.0-issue in a more recent release, see: - rmosolgo/graphql-ruby@ec52695 - rmosolgo/graphql-ruby@0398808
It now says: Net::ReadTimeout with "Message"
@@ -15,7 +15,7 @@ before_install: | |||
|
|||
matrix: | |||
include: | |||
- rvm: 2.3.6 | |||
- rvm: 2.7.2 |
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.
This could arguably be 3.0… but I'm not sure I wanted to risk it :D
@@ -91,7 +91,7 @@ | |||
expect do | |||
client.execute(query, id: '42') | |||
end.to raise_error Graphlient::Errors::GraphQLError do |e| | |||
expect(e.to_s).to eq 'Variable id of type Int was provided invalid value' | |||
expect(e.to_s).to eq 'Variable $id of type Int was provided invalid value' |
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.
This is due to allowing a newer graphql version, which was required for Ruby 3.0-compatibility.
AllCops: | ||
TargetRubyVersion: 2.3 | ||
|
||
Lint/SplatKeywordArguments: |
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.
This is an old cop that has long since been removed.
@@ -1,3 +1,9 @@ | |||
AllCops: | |||
TargetRubyVersion: 2.3 |
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.
We could definitely use a newer version here (this used to be picked up from .ruby-version
), but that generated new cop warnings so I decided against it.
👍 |
Just cut a new release |
Upon trying graphlient on Ruby 3.0 I noticed a few issues, one of them being critical: effbf5d
All the other commits were made to get either CI to pass, tests to pass, or rubocop to pass. 😄