Skip to content

Commit

Permalink
Update minimum Ruby version from 3.1 -> 3.2
Browse files Browse the repository at this point in the history
Also update gems.

Note: We update from `identify(*args, **kwargs)` -> `identify(...)`
because Rubocop for Ruby v3.1+ prefers `*` vs `*args` and `**` vs
`**kwargs` for anonymous forwarding. However, `...` (for all argument
forwarding) has been supported since Ruby 2.7, and I just missed this
update in the past.
  • Loading branch information
pdobb committed Jan 4, 2025
1 parent 5b69d59 commit d57b7c7
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["3.1", "3.2", "3.3"]
ruby-version: ["3.2", "3.3", "3.4"]

steps:
- name: Checkout code
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3.6"
ruby-version: "3.4.1"
bundler-cache: true # runs `bundle install` and caches installed gems automatically

- name: Run rubocop
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inherit_gem:
gemwork: lib/rubocop/.rubocop-gems.yml

AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2

Performance/OpenStruct:
Enabled: false # Reconsider later.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]

- Update minimum Ruby version from 3.1 -> 3.2

### 0.9.0 - 2024-11-22

- Just use #inspect instead of #inspect_lit. Remove #inspect_lit from core extensions on: BigDecimal, Symbol, String, and Object.
Expand Down
50 changes: 27 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ GEM
ansi (1.5.0)
ast (2.4.2)
benchmark-ips (2.14.0)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
builder (3.3.0)
concurrent-ruby (1.3.4)
debug (1.9.2)
date (3.4.1)
debug (1.10.0)
irb (~> 1.10)
reline (>= 0.3.8)
docile (1.4.1)
Expand All @@ -24,7 +25,7 @@ GEM
logger
zeitwerk (~> 2.6)
dry-inflector (1.1.0)
dry-initializer (3.1.1)
dry-initializer (3.2.0)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
Expand All @@ -44,7 +45,7 @@ GEM
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
gemwork (0.7.2)
gemwork (0.7.4)
debug
irb
minitest
Expand All @@ -57,14 +58,14 @@ GEM
rubocop-rake
simplecov
yard
io-console (0.7.2)
irb (1.14.1)
io-console (0.8.0)
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.8.2)
json (2.9.1)
language_server-protocol (3.17.0.3)
logger (1.6.1)
minitest (5.25.2)
logger (1.6.4)
minitest (5.25.4)
minitest-reporters (1.7.1)
ansi
builder
Expand All @@ -75,38 +76,39 @@ GEM
parser (3.3.6.0)
ast (~> 2.4.1)
racc
psych (5.2.0)
psych (5.2.2)
date
stringio
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.8.1)
rdoc (6.10.0)
psych (>= 4.0.0)
reek (6.3.0)
dry-schema (~> 1.13.0)
parser (~> 3.3.0)
rainbow (>= 2.0, < 4.0)
rexml (~> 3.1)
regexp_parser (2.9.2)
reline (0.5.11)
regexp_parser (2.10.0)
reline (0.6.0)
io-console (~> 0.5)
rexml (3.3.9)
rubocop (1.68.0)
rexml (3.4.0)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.36.1)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-minitest (0.36.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.23.0)
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
Expand All @@ -119,9 +121,11 @@ GEM
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
stringio (3.1.2)
unicode-display_width (2.6.0)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
yard (0.9.37)
zeitwerk (2.6.18)
zeitwerk (2.7.1)

PLATFORMS
arm64-darwin-23
Expand All @@ -135,4 +139,4 @@ DEPENDENCIES
rake

BUNDLED WITH
2.3.27
2.6.2
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ Or install it yourself as:

Tested MRI Ruby Versions:

- 3.1
- 3.2
- 3.3
- 3.4

Note: For Ruby 2.7 or 3.1 support, install object_identifier gem version 0.7.0.
Note: For Ruby 2.7 support, install object_identifier gem version 0.7.0.

```ruby
gem "object_identifier", "0.7.0"
```

For Ruby 3.1 support, install object_identifier gem version 0.9.0.

```ruby
gem "object_identifier", "0.7.0"
Expand Down
4 changes: 2 additions & 2 deletions lib/core_ext/object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Object
#
# (1..10).to_a.identify(:to_f, limit: 2)
# # => "Integer[to_f:1.0], Integer[to_f:2.0], ... (8 more)"
def identify(*args, **kwargs)
ObjectIdentifier.(self, *args, **kwargs)
def identify(...)
ObjectIdentifier.(self, ...)
end
end
1 change: 0 additions & 1 deletion lib/object_identifier/object_identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def self.call(
*attributes,
formatter_class: default_formatter_class,
**formatter_options)

parameters =
ObjectIdentifier::Parameters.build(
attributes: attributes,
Expand Down
2 changes: 1 addition & 1 deletion object_identifier.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "Object Identifier allows quick, easy, and uniform identification of an object by inspecting its class name and outputting any desirable attributes/methods. It is great for logging, sending descriptive notification messages, etc."
spec.homepage = "https://github.com/pdobb/object_identifier"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.1"
spec.required_ruby_version = ">= 3.2"

spec.metadata = {
"bug_tracker_uri" => "https://github.com/pdobb/object_identifier/issues",
Expand Down

0 comments on commit d57b7c7

Please sign in to comment.