-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add Ruby 3.0 support and replace Travis CI with GitHub Actions #249
Conversation
Fails like this with rspec-mocks >=3.10.1 because we set logger to false, and false is frozen. 1) InfluxDB::Logging when logging is disabled does not log Failure/Error: expect(InfluxDB::Logging.logger).not_to receive(:debug) ArgumentError: Cannot proxy frozen objects, rspec-mocks relies on proxies for method stubbing and expectations. # ./spec/influxdb/logging_spec.rb:42:in `block (3 levels) in <top (required)>' # ./spec/influxdb/logging_spec.rb:19:in `block (2 levels) in <top (required)>' Related links - rspec/rspec-mocks#1357 - https://github.com/rspec/rspec-mocks/blob/v3.10.2/Changelog.md
CI is always set to true in GitHub Actions: https://docs.github.com/en/actions/reference/environment-variables
Pretty standard fixes that were warnings in Ruby 2.7. The only interesting part was in Config spec, I had to split the args array into kwargs manually. Further reading: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
I think you need to click some button to enable GitHub Actions for this repo 🤔 You can see that the run, https://github.com/dentarg/influxdb-ruby/actions/runs/535074223, completed successfully in my fork |
@@ -1,3 +1,7 @@ | |||
inherit_mode: | |||
merge: | |||
- Exclude |
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.
Added this because otherwise rubocop picks up rules from some gem in our cache, background in ruby/setup-ruby#136
You can see example of the failure at https://github.com/dentarg/influxdb-ruby/runs/1825374738?check_suite_focus=true#step:5:9
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.
Awesome stuff @dentarg. Thank you so much! 💐
Close #245
Close #246
Close #247 (included in this PR, but didn't work on Ruby < 2.7)