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

[RIS-1225] Move to Ruby 3.0.x #52

Merged
merged 5 commits into from
Feb 6, 2024
Merged

[RIS-1225] Move to Ruby 3.0.x #52

merged 5 commits into from
Feb 6, 2024

Conversation

trooney-himama
Copy link
Contributor

@trooney-himama trooney-himama commented Feb 5, 2024

Ruby 2.7.7 is EOL. Bumping to 3.0.x.

  • Updating minimum Ruby version to Ruby 3.0.5
  • Add test support for Ruby 3.1, 3.2, 3.3
  • Updated Rubocop to enforce 3.0.x conventions
  • Linting fixes

Post-merge:

  • Publish v0.7.0 tag
  • Publish to Rubgems

RIS-1225

@trooney-himama trooney-himama self-assigned this Feb 5, 2024
@@ -103,3 +103,6 @@ Security/YAMLLoad:

Style/RegexpLiteral:
Enabled: false

Naming/VariableNumber:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling this rule as it appears to apply to keys returned from the bambora API.

Comment on lines +49 to +54
spec.add_development_dependency 'pry'
spec.add_development_dependency 'pry-byebug'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
spec.add_development_dependency 'rubocop', '~> 0.74.0'
spec.add_development_dependency 'rubocop', '~> 1.12.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum version bumps required to successfully run under Ruby 3.0

@@ -8,7 +8,7 @@ def to_h
parsed_response = super
return error_response if parsed_response.values.flatten.empty? # We didn't get a query string back.

parsed_response.each_with_object({}) { |(key, val), obj| obj[key] = val.length == 1 ? val.first : val }
parsed_response.transform_values { |val| val.length == 1 ? val.first : val }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting changes from the Rubocop change moving us to 3.0 compatibility. These were all from their "auto-correct" package.

@@ -2,6 +2,6 @@

module Bambora
class Client
VERSION = '0.6.0'
VERSION = '0.7.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version bump. Last time I forgot to create a tag and release to ruby-gems but this time I have the power! ⚔️

Comment on lines +1 to +10
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
# Indent with 2 spaces
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being a good citizen 🖖

CHANGELOG.md Outdated
Comment on lines 1 to 8
## 0.7.0 (2024-02-05)

- Updating minimum Ruby version to Ruby 3.0.5
- Add test support for Ruby 3.1, 3.2, 3.3
- Updated Rubocop to enforce 3.0.x conventions
- Linting fixes

## Unreleased (2023-12-01)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge this with the Unreleased items below? Also, can we more explicitly call out breaking change here, of removing support for Ruby 2.7.7. This library I believe is used by groups that are not just us anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the wording. Keep in mind downstream clients can leverage Gemfile to sort out any issues with our released changes.

Copy link
Member

@harrylewis harrylewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update, looks good to me. Merge when you are ready!

@trooney-himama trooney-himama merged commit 0f5019e into main Feb 6, 2024
5 checks passed
@trooney-himama trooney-himama deleted the RIS-1225/ruby-3.0.5 branch February 6, 2024 14:21
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.

3 participants