Skip to content

Commit d548600

Browse files
committed
Update to latest rails main
- Drop Rails 7.0 and 7.1 tests, add separate 7.2 tests - Update behaviour tests from main - Add instrumentation for increment and decrement - Don't lock the gemfiles
1 parent b610333 commit d548600

37 files changed

+271
-2056
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.bundle/
22
/doc/
3+
/gemfiles/*.gemfile.lock
34
/log/*.log
45
/pkg/
56
/tmp/

gemfiles/rails_7_2.gemfile.lock

Lines changed: 0 additions & 236 deletions
This file was deleted.

gemfiles/rails_main.gemfile.lock

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
GIT
22
remote: https://github.com/rails/rails.git
3-
revision: abc4538300e8a2897f350611666d7e64021e6d16
3+
revision: 8bac99ad7a403ef52a5c97e7afa73c7bbcc67110
44
branch: main
55
specs:
66
actionpack (8.0.0.alpha)
77
actionview (= 8.0.0.alpha)
88
activesupport (= 8.0.0.alpha)
99
nokogiri (>= 1.8.5)
10-
racc
1110
rack (>= 2.2.4)
1211
rack-session (>= 1.0.1)
1312
rack-test (>= 0.6.3)
@@ -86,11 +85,11 @@ GEM
8685
reline (>= 0.4.2)
8786
json (2.7.2)
8887
language_server-protocol (3.17.0.3)
89-
logger (1.6.0)
88+
logger (1.6.1)
9089
loofah (2.22.0)
9190
crass (~> 1.0.2)
9291
nokogiri (>= 1.12.0)
93-
minitest (5.24.1)
92+
minitest (5.25.1)
9493
mocha (2.4.5)
9594
ruby2_keywords (>= 0.0.5)
9695
msgpack (1.7.2)
@@ -107,7 +106,7 @@ GEM
107106
racc (~> 1.4)
108107
nokogiri (1.16.7-x86_64-linux)
109108
racc (~> 1.4)
110-
parallel (1.26.2)
109+
parallel (1.26.3)
111110
parser (3.3.4.2)
112111
ast (~> 2.4.1)
113112
racc
@@ -137,35 +136,32 @@ GEM
137136
regexp_parser (2.9.2)
138137
reline (0.5.9)
139138
io-console (~> 0.5)
140-
rexml (3.3.5)
141-
strscan
142-
rubocop (1.65.1)
139+
rubocop (1.66.0)
143140
json (~> 2.3)
144141
language_server-protocol (>= 3.17.0)
145142
parallel (~> 1.10)
146143
parser (>= 3.3.0.2)
147144
rainbow (>= 2.2.2, < 4.0)
148145
regexp_parser (>= 2.4, < 3.0)
149-
rexml (>= 3.2.5, < 4.0)
150-
rubocop-ast (>= 1.31.1, < 2.0)
146+
rubocop-ast (>= 1.32.1, < 2.0)
151147
ruby-progressbar (~> 1.7)
152148
unicode-display_width (>= 2.4.0, < 3.0)
153-
rubocop-ast (1.32.0)
149+
rubocop-ast (1.32.1)
154150
parser (>= 3.3.1.0)
155151
rubocop-md (1.2.2)
156152
rubocop (>= 1.0)
157-
rubocop-minitest (0.35.1)
153+
rubocop-minitest (0.36.0)
158154
rubocop (>= 1.61, < 2.0)
159155
rubocop-ast (>= 1.31.1, < 2.0)
160156
rubocop-packaging (0.5.2)
161157
rubocop (>= 1.33, < 2.0)
162158
rubocop-performance (1.21.1)
163159
rubocop (>= 1.48.1, < 2.0)
164160
rubocop-ast (>= 1.31.1, < 2.0)
165-
rubocop-rails (2.25.1)
161+
rubocop-rails (2.26.0)
166162
activesupport (>= 4.2.0)
167163
rack (>= 1.1)
168-
rubocop (>= 1.33.0, < 2.0)
164+
rubocop (>= 1.52.0, < 2.0)
169165
rubocop-ast (>= 1.31.1, < 2.0)
170166
ruby-progressbar (1.13.0)
171167
ruby2_keywords (0.0.5)
@@ -177,19 +173,18 @@ GEM
177173
actionpack (>= 6.1)
178174
activesupport (>= 6.1)
179175
sprockets (>= 3.0.0)
180-
sqlite3 (2.0.3-aarch64-linux-gnu)
181-
sqlite3 (2.0.3-aarch64-linux-musl)
182-
sqlite3 (2.0.3-arm-linux-gnu)
183-
sqlite3 (2.0.3-arm-linux-musl)
184-
sqlite3 (2.0.3-arm64-darwin)
185-
sqlite3 (2.0.3-x86-linux-gnu)
186-
sqlite3 (2.0.3-x86-linux-musl)
187-
sqlite3 (2.0.3-x86_64-darwin)
188-
sqlite3 (2.0.3-x86_64-linux-gnu)
189-
sqlite3 (2.0.3-x86_64-linux-musl)
176+
sqlite3 (2.0.4-aarch64-linux-gnu)
177+
sqlite3 (2.0.4-aarch64-linux-musl)
178+
sqlite3 (2.0.4-arm-linux-gnu)
179+
sqlite3 (2.0.4-arm-linux-musl)
180+
sqlite3 (2.0.4-arm64-darwin)
181+
sqlite3 (2.0.4-x86-linux-gnu)
182+
sqlite3 (2.0.4-x86-linux-musl)
183+
sqlite3 (2.0.4-x86_64-darwin)
184+
sqlite3 (2.0.4-x86_64-linux-gnu)
185+
sqlite3 (2.0.4-x86_64-linux-musl)
190186
stringio (3.1.1)
191-
strscan (3.1.0)
192-
thor (1.3.1)
187+
thor (1.3.2)
193188
timeout (0.4.1)
194189
tzinfo (2.0.6)
195190
concurrent-ruby (~> 1.0)

lib/solid_cache/store/api.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,21 @@ def initialize(options = {})
1515
end
1616

1717
def increment(name, amount = 1, options = nil)
18-
adjust(name, amount, options)
18+
options = merged_options(options)
19+
key = normalize_key(name, options)
20+
21+
instrument :increment, key, amount: amount do
22+
adjust(name, amount, options)
23+
end
1924
end
2025

2126
def decrement(name, amount = 1, options = nil)
22-
adjust(name, -amount, options)
27+
options = merged_options(options)
28+
key = normalize_key(name, options)
29+
30+
instrument :decrement, key, amount: amount do
31+
adjust(name, -amount, options)
32+
end
2333
end
2434

2535
def cleanup(options = nil)

0 commit comments

Comments
 (0)