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

Add Ruby 3.0 support and replace Travis CI with GitHub Actions #249

Merged
merged 18 commits into from
Feb 6, 2021

Conversation

dentarg
Copy link
Contributor

@dentarg dentarg commented Feb 3, 2021

Close #245
Close #246
Close #247 (included in this PR, but didn't work on Ruby < 2.7)

dentarg and others added 18 commits February 3, 2021 10:18
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
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/
@dentarg
Copy link
Contributor Author

dentarg commented Feb 3, 2021

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
Copy link
Contributor Author

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

Copy link
Collaborator

@hennevogel hennevogel left a 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! 💐

@hennevogel hennevogel merged commit b8217c4 into InfluxCommunity:master Feb 6, 2021
@dentarg dentarg deleted the actions branch February 6, 2021 18:55
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.

Support Ruby 3.0
3 participants