Skip to content

Commit 95cf84a

Browse files
committed
Rubocop: Bump TargetRubyVersion & fix offenses
1 parent 6a9262f commit 95cf84a

8 files changed

Lines changed: 39 additions & 40 deletions

File tree

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins:
77
- rubocop-thread_safety
88

99
AllCops:
10-
TargetRubyVersion: 3.1
10+
TargetRubyVersion: 3.2
1111
NewCops: enable
1212
SuggestExtensions: false
1313
Exclude:

bin/init-cluster

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
require "set"
1918
require "optparse"
2019

2120
class Object

bin/jenkins/repackage-extension.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
require "rubygems/installer"
99
require "rubygems/package"
1010

11-
def run(*args) # rubocop:disable Naming/PredicateMethod
12-
_, status = Open3.capture2e(*args)
11+
def run(*) # rubocop:disable Naming/PredicateMethod
12+
_, status = Open3.capture2e(*)
1313
status.success?
1414
end
1515

@@ -96,7 +96,7 @@ def repackage(gemspec)
9696
gemspec.platform.version = nil
9797
gemspec.original_platform = gemspec.platform
9898
end
99-
gemspec.required_ruby_version = "> 3.1"
99+
gemspec.required_ruby_version = "> 3.2"
100100

101101
# build new gem
102102
output_gem = nil

couchbase.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
2727
spec.description = "Modern SDK for Couchbase Server"
2828
spec.homepage = "https://www.couchbase.com"
2929
spec.license = "Apache-2.0"
30-
spec.required_ruby_version = "> 3.1"
30+
spec.required_ruby_version = "> 3.2"
3131

3232
spec.metadata = {
3333
"homepage_uri" => "https://docs.couchbase.com/ruby-sdk/current/hello-world/start-using-sdk.html",

lib/active_support/cache/couchbase_store.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ def deserialize_entry(payload, raw: false, **)
180180
end
181181
end
182182

183-
def serialize_entry(entry, raw: false, **options)
183+
def serialize_entry(entry, raw: false, **)
184184
if raw
185185
entry.value.to_s
186186
else
187-
super(entry, **options)
187+
super(entry, **)
188188
end
189189
end
190190

@@ -195,8 +195,8 @@ def serialize_entries(entries, **options)
195195
end
196196

197197
# Reads an entry from the cache
198-
def read_entry(key, **options)
199-
deserialize_entry(read_serialized_entry(key, **options), **options)
198+
def read_entry(key, **)
199+
deserialize_entry(read_serialized_entry(key, **), **)
200200
end
201201

202202
def read_serialized_entry(key, **)
@@ -228,8 +228,8 @@ def read_multi_entries(names, **options)
228228
end
229229

230230
# Writes an entry to the cache
231-
def write_entry(key, entry, raw: false, **options)
232-
write_serialized_entry(key, serialize_entry(entry, raw: raw, **options), raw: raw, **options)
231+
def write_entry(key, entry, raw: false, **)
232+
write_serialized_entry(key, serialize_entry(entry, raw: raw, **), raw: raw, **)
233233
end
234234

235235
def write_serialized_entry(key, payload, expires_in: nil, race_condition_ttl: nil, raw: false, **)

lib/couchbase/diagnostics.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def initialize
4747
yield self if block_given?
4848
end
4949

50-
def to_json(*args)
50+
def to_json(*)
5151
data = {
5252
id: @id,
5353
state: @state,
@@ -56,7 +56,7 @@ def to_json(*args)
5656
}
5757
data[:details] = @details if @details
5858
data[:last_activity_us] = @last_activity_us if @last_activity_us
59-
data.to_json(*args)
59+
data.to_json(*)
6060
end
6161
end
6262

@@ -88,13 +88,13 @@ def initialize
8888
# @return [Integer] version
8989
attr_accessor :version
9090

91-
def to_json(*args)
91+
def to_json(*)
9292
{
9393
version: @version,
9494
id: @id,
9595
sdk: @sdk,
9696
services: @services,
97-
}.to_json(*args)
97+
}.to_json(*)
9898
end
9999
end
100100

@@ -130,7 +130,7 @@ def initialize
130130
yield self if block_given?
131131
end
132132

133-
def to_json(*args)
133+
def to_json(*)
134134
data = {
135135
id: @id,
136136
state: @state,
@@ -139,7 +139,7 @@ def to_json(*args)
139139
latency: @latency,
140140
}
141141
data[:error] = @error if @error
142-
data.to_json(*args)
142+
data.to_json(*)
143143
end
144144
end
145145

@@ -171,13 +171,13 @@ def initialize
171171
# @return [Integer] version
172172
attr_accessor :version
173173

174-
def to_json(*args)
174+
def to_json(*)
175175
{
176176
version: @version,
177177
id: @id,
178178
sdk: @sdk,
179179
services: @services,
180-
}.to_json(*args)
180+
}.to_json(*)
181181
end
182182
end
183183
end

lib/couchbase/search_options.rb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def to_h
8484
end
8585

8686
# @return [String]
87-
def to_json(*args)
88-
to_h.to_json(*args)
87+
def to_json(*)
88+
to_h.to_json(*)
8989
end
9090

9191
# Prepare {MatchQuery} body
@@ -1128,8 +1128,8 @@ def to_h
11281128
end
11291129

11301130
# @api private
1131-
def to_json(*args)
1132-
to_h.to_json(*args)
1131+
def to_json(*)
1132+
to_h.to_json(*)
11331133
end
11341134
end
11351135

@@ -1173,8 +1173,8 @@ def initialize
11731173
end
11741174

11751175
# @api private
1176-
def to_json(*args)
1177-
{by: :score, desc: desc}.to_json(*args)
1176+
def to_json(*)
1177+
{by: :score, desc: desc}.to_json(*)
11781178
end
11791179
end
11801180

@@ -1189,8 +1189,8 @@ def initialize
11891189
end
11901190

11911191
# @api private
1192-
def to_json(*args)
1193-
{by: :id, desc: desc}.to_json(*args)
1192+
def to_json(*)
1193+
{by: :id, desc: desc}.to_json(*)
11941194
end
11951195
end
11961196

@@ -1219,8 +1219,8 @@ def initialize(field)
12191219
end
12201220

12211221
# @api private
1222-
def to_json(*args)
1223-
{by: :field, field: field, desc: desc, type: type, missing: missing, mode: mode}.to_json(*args)
1222+
def to_json(*)
1223+
{by: :field, field: field, desc: desc, type: type, missing: missing, mode: mode}.to_json(*)
12241224
end
12251225
end
12261226

@@ -1253,8 +1253,8 @@ def initialize(field, longitude, latitude)
12531253
end
12541254

12551255
# @api private
1256-
def to_json(*args)
1257-
{by: :geo_distance, field: field, desc: desc, location: [longitude, latitude], unit: unit}.to_json(*args)
1256+
def to_json(*)
1257+
{by: :geo_distance, field: field, desc: desc, location: [longitude, latitude], unit: unit}.to_json(*)
12581258
end
12591259
end
12601260
end
@@ -1292,8 +1292,8 @@ def initialize(field)
12921292
end
12931293

12941294
# @api private
1295-
def to_json(*args)
1296-
{field: field, size: size}.to_json(*args)
1295+
def to_json(*)
1296+
{field: field, size: size}.to_json(*)
12971297
end
12981298
end
12991299

@@ -1319,8 +1319,8 @@ def add(name, min, max)
13191319
end
13201320

13211321
# @api private
1322-
def to_json(*args)
1323-
{field: field, size: size, numeric_ranges: @ranges}.to_json(*args)
1322+
def to_json(*)
1323+
{field: field, size: size, numeric_ranges: @ranges}.to_json(*)
13241324
end
13251325
end
13261326

@@ -1351,8 +1351,8 @@ def add(name, start_time, end_time)
13511351
end
13521352

13531353
# @api private
1354-
def to_json(*args)
1355-
{field: field, size: size, date_ranges: @ranges}.to_json(*args)
1354+
def to_json(*)
1355+
{field: field, size: size, date_ranges: @ranges}.to_json(*)
13561356
end
13571357
end
13581358
end

test/utils/tracing.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def assert_compound_http_span(
129129
scope_name: nil,
130130
collection_name: nil,
131131
statement: nil,
132-
&block
132+
&
133133
)
134134
assert_span env, span, op_name, parent
135135

@@ -163,7 +163,7 @@ def assert_compound_http_span(
163163

164164
assert_equal child_count, span.children.size unless child_count.nil?
165165

166-
span.children.each_with_index(&block)
166+
span.children.each_with_index(&)
167167
end
168168

169169
def assert_http_span(

0 commit comments

Comments
 (0)