Skip to content

Commit f38ba40

Browse files
josecolellaclaude
andauthored
feat!: add Ruby 4.0 support, require minimum Ruby 3.4 (#217)
Signed-off-by: Jose Colella <jose.colella@gusto.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 67b9796 commit f38ba40

File tree

8 files changed

+68
-53
lines changed

8 files changed

+68
-53
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ jobs:
1717
# - macos-latest
1818
# - windows-latest
1919
ruby:
20-
- "3.3"
21-
- "3.2"
22-
- "3.1"
20+
- "4.0"
21+
- "3.4"
2322
env:
2423
BUNDLE_GEMFILE: Gemfile
2524

@@ -46,7 +45,7 @@ jobs:
4645
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4746
- uses: ruby/setup-ruby@v1
4847
with:
49-
ruby-version: 3.4.8
48+
ruby-version: "3.4"
5049
- run: bundle install
5150
- name: Standard
5251
run: bundle exec rake standard

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.8
1+
4.0.1

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.4.8
1+
ruby 4.0.1

Gemfile.lock

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,46 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
ast (2.4.2)
10-
debug (1.9.2)
9+
ast (2.4.3)
10+
date (3.5.1)
11+
debug (1.11.1)
1112
irb (~> 1.10)
1213
reline (>= 0.3.8)
13-
diff-lcs (1.5.1)
14-
docile (1.4.0)
15-
io-console (0.7.2)
16-
irb (1.12.0)
17-
rdoc
14+
diff-lcs (1.6.2)
15+
docile (1.4.1)
16+
erb (6.0.2)
17+
io-console (0.8.2)
18+
irb (1.17.0)
19+
pp (>= 0.6.0)
20+
prism (>= 1.3.0)
21+
rdoc (>= 4.0.0)
1822
reline (>= 0.4.2)
19-
json (2.7.1)
20-
language_server-protocol (3.17.0.3)
23+
json (2.18.1)
24+
language_server-protocol (3.17.0.5)
2125
lint_roller (1.1.0)
22-
markly (0.10.0)
23-
parallel (1.24.0)
24-
parser (3.3.0.5)
26+
markly (0.15.2)
27+
parallel (1.27.0)
28+
parser (3.3.10.2)
2529
ast (~> 2.4.1)
2630
racc
27-
psych (5.1.2)
31+
pp (0.6.3)
32+
prettyprint
33+
prettyprint (0.2.0)
34+
prism (1.9.0)
35+
psych (5.3.1)
36+
date
2837
stringio
29-
racc (1.7.3)
38+
racc (1.8.1)
3039
rainbow (3.1.1)
31-
rake (13.1.0)
32-
rdoc (6.6.3.1)
40+
rake (13.3.1)
41+
rdoc (7.2.0)
42+
erb
3343
psych (>= 4.0.0)
34-
regexp_parser (2.9.0)
35-
reline (0.5.0)
44+
tsort
45+
regexp_parser (2.11.3)
46+
reline (0.6.3)
3647
io-console (~> 0.5)
37-
rexml (3.3.6)
38-
strscan
48+
rexml (3.4.4)
3949
rspec (3.12.0)
4050
rspec-core (~> 3.12.0)
4151
rspec-expectations (~> 3.12.0)
@@ -49,54 +59,59 @@ GEM
4959
diff-lcs (>= 1.2.0, < 2.0)
5060
rspec-support (~> 3.12.0)
5161
rspec-support (3.12.2)
52-
rubocop (1.62.1)
62+
rubocop (1.84.2)
5363
json (~> 2.3)
54-
language_server-protocol (>= 3.17.0)
64+
language_server-protocol (~> 3.17.0.2)
65+
lint_roller (~> 1.1.0)
5566
parallel (~> 1.10)
5667
parser (>= 3.3.0.2)
5768
rainbow (>= 2.2.2, < 4.0)
58-
regexp_parser (>= 1.8, < 3.0)
59-
rexml (>= 3.2.5, < 4.0)
60-
rubocop-ast (>= 1.31.1, < 2.0)
69+
regexp_parser (>= 2.9.3, < 3.0)
70+
rubocop-ast (>= 1.49.0, < 2.0)
6171
ruby-progressbar (~> 1.7)
62-
unicode-display_width (>= 2.4.0, < 3.0)
63-
rubocop-ast (1.31.2)
64-
parser (>= 3.3.0.4)
65-
rubocop-performance (1.20.2)
66-
rubocop (>= 1.48.1, < 2.0)
67-
rubocop-ast (>= 1.30.0, < 2.0)
72+
unicode-display_width (>= 2.4.0, < 4.0)
73+
rubocop-ast (1.49.0)
74+
parser (>= 3.3.7.2)
75+
prism (~> 1.7)
76+
rubocop-performance (1.26.1)
77+
lint_roller (~> 1.1)
78+
rubocop (>= 1.75.0, < 2.0)
79+
rubocop-ast (>= 1.47.1, < 2.0)
6880
ruby-progressbar (1.13.0)
6981
simplecov (0.22.0)
7082
docile (~> 1.1)
7183
simplecov-html (~> 0.11)
7284
simplecov_json_formatter (~> 0.1)
73-
simplecov-cobertura (2.1.0)
85+
simplecov-cobertura (3.1.0)
7486
rexml
7587
simplecov (~> 0.19)
76-
simplecov-html (0.12.3)
88+
simplecov-html (0.13.2)
7789
simplecov_json_formatter (0.1.4)
78-
standard (1.35.1)
90+
standard (1.54.0)
7991
language_server-protocol (~> 3.17.0.2)
8092
lint_roller (~> 1.0)
81-
rubocop (~> 1.62.0)
93+
rubocop (~> 1.84.0)
8294
standard-custom (~> 1.0.0)
83-
standard-performance (~> 1.3)
95+
standard-performance (~> 1.8)
8496
standard-custom (1.0.2)
8597
lint_roller (~> 1.0)
8698
rubocop (~> 1.50)
87-
standard-performance (1.3.1)
99+
standard-performance (1.9.0)
88100
lint_roller (~> 1.1)
89-
rubocop-performance (~> 1.20.2)
90-
stringio (3.1.0)
91-
strscan (3.1.0)
101+
rubocop-performance (~> 1.26.0)
102+
stringio (3.2.0)
92103
timecop (0.9.10)
93-
unicode-display_width (2.5.0)
104+
tsort (0.2.0)
105+
unicode-display_width (3.2.0)
106+
unicode-emoji (~> 4.1)
107+
unicode-emoji (4.2.0)
94108

95109
PLATFORMS
96110
arm64-darwin-21
97111
arm64-darwin-22
98112
arm64-darwin-23
99113
arm64-darwin-24
114+
arm64-darwin-25
100115
x64-mingw-ucrt
101116
x64-mingw32
102117
x86_64-darwin-19
@@ -111,7 +126,7 @@ DEPENDENCIES
111126
rake (~> 13.0)
112127
rspec (~> 3.12.0)
113128
simplecov (~> 0.22.0)
114-
simplecov-cobertura (~> 2.1.0)
129+
simplecov-cobertura (~> 3.0)
115130
standard
116131
standard-performance
117132
timecop (~> 0.9.10)

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838

3939
| Supported Ruby Version | OS |
4040
| ------------ | --------------------- |
41-
| Ruby 3.1.4 | Windows, MacOS, Linux |
42-
| Ruby 3.2.3 | Windows, MacOS, Linux |
43-
| Ruby 3.3.0 | Windows, MacOS, Linux |
41+
| Ruby 3.4.x | Windows, MacOS, Linux |
42+
| Ruby 4.0.x | Windows, MacOS, Linux |
4443

4544
### Install
4645

openfeature-sdk.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
1212
spec.description = "Ruby SDK for an the specifications for the open standard of feature flag management"
1313
spec.homepage = "https://github.com/open-feature/openfeature-ruby"
1414
spec.license = "Apache-2.0"
15-
spec.required_ruby_version = ">= 3.1"
15+
spec.required_ruby_version = ">= 3.4"
1616

1717
spec.metadata["homepage_uri"] = spec.homepage
1818
spec.metadata["source_code_uri"] = "https://github.com/open-feature/openfeature-ruby"
@@ -38,6 +38,6 @@ Gem::Specification.new do |spec|
3838
spec.add_development_dependency "standard"
3939
spec.add_development_dependency "standard-performance"
4040
spec.add_development_dependency "simplecov", "~> 0.22.0"
41-
spec.add_development_dependency "simplecov-cobertura", "~> 2.1.0"
41+
spec.add_development_dependency "simplecov-cobertura", "~> 3.0"
4242
spec.add_development_dependency "timecop", "~> 0.9.10"
4343
end

spec/open_feature/sdk/hooks/hook_executor_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def before(hook_context:, hints:)
155155

156156
hook2_class = Class.new do
157157
include OpenFeature::SDK::Hooks::Hook
158+
158159
define_method(:initialize) { |log| @log = log }
159160

160161
define_method(:before) do |hook_context:, hints:|

spec/support/recording_hook_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module RecordingHookHelper
44
def recording_hook(name, call_log)
55
Class.new do
66
include OpenFeature::SDK::Hooks::Hook
7+
78
define_method(:hook_name) { name }
89

910
define_method(:before) do |hook_context:, hints:|

0 commit comments

Comments
 (0)