diff --git a/.rubocop.yml b/.rubocop.yml index 4fd04536..d1ea73a5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,7 +7,7 @@ plugins: - rubocop-thread_safety AllCops: - TargetRubyVersion: 3.1 + TargetRubyVersion: 3.2 NewCops: enable SuggestExtensions: false Exclude: diff --git a/bin/init-cluster b/bin/init-cluster index 09c17710..3f8ae90b 100755 --- a/bin/init-cluster +++ b/bin/init-cluster @@ -15,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -require "set" require "optparse" class Object diff --git a/bin/jenkins/repackage-extension.rb b/bin/jenkins/repackage-extension.rb index 04ab7a23..f63fb73a 100755 --- a/bin/jenkins/repackage-extension.rb +++ b/bin/jenkins/repackage-extension.rb @@ -8,8 +8,8 @@ require "rubygems/installer" require "rubygems/package" -def run(*args) # rubocop:disable Naming/PredicateMethod - _, status = Open3.capture2e(*args) +def run(*) # rubocop:disable Naming/PredicateMethod + _, status = Open3.capture2e(*) status.success? end @@ -96,7 +96,7 @@ def repackage(gemspec) gemspec.platform.version = nil gemspec.original_platform = gemspec.platform end - gemspec.required_ruby_version = "> 3.1" + gemspec.required_ruby_version = "> 3.2" # build new gem output_gem = nil diff --git a/couchbase.gemspec b/couchbase.gemspec index 1eef7c2d..3f2c680f 100644 --- a/couchbase.gemspec +++ b/couchbase.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.description = "Modern SDK for Couchbase Server" spec.homepage = "https://www.couchbase.com" spec.license = "Apache-2.0" - spec.required_ruby_version = "> 3.1" + spec.required_ruby_version = "> 3.2" spec.metadata = { "homepage_uri" => "https://docs.couchbase.com/ruby-sdk/current/hello-world/start-using-sdk.html", diff --git a/lib/active_support/cache/couchbase_store.rb b/lib/active_support/cache/couchbase_store.rb index 514885bc..1e985cf5 100644 --- a/lib/active_support/cache/couchbase_store.rb +++ b/lib/active_support/cache/couchbase_store.rb @@ -180,11 +180,11 @@ def deserialize_entry(payload, raw: false, **) end end - def serialize_entry(entry, raw: false, **options) + def serialize_entry(entry, raw: false, **) if raw entry.value.to_s else - super(entry, **options) + super(entry, **) end end @@ -195,8 +195,8 @@ def serialize_entries(entries, **options) end # Reads an entry from the cache - def read_entry(key, **options) - deserialize_entry(read_serialized_entry(key, **options), **options) + def read_entry(key, **) + deserialize_entry(read_serialized_entry(key, **), **) end def read_serialized_entry(key, **) @@ -228,8 +228,8 @@ def read_multi_entries(names, **options) end # Writes an entry to the cache - def write_entry(key, entry, raw: false, **options) - write_serialized_entry(key, serialize_entry(entry, raw: raw, **options), raw: raw, **options) + def write_entry(key, entry, raw: false, **) + write_serialized_entry(key, serialize_entry(entry, raw: raw, **), raw: raw, **) end def write_serialized_entry(key, payload, expires_in: nil, race_condition_ttl: nil, raw: false, **) diff --git a/lib/couchbase/diagnostics.rb b/lib/couchbase/diagnostics.rb index dc4c58ea..83a89287 100644 --- a/lib/couchbase/diagnostics.rb +++ b/lib/couchbase/diagnostics.rb @@ -47,7 +47,7 @@ def initialize yield self if block_given? end - def to_json(*args) + def to_json(*) data = { id: @id, state: @state, @@ -56,7 +56,7 @@ def to_json(*args) } data[:details] = @details if @details data[:last_activity_us] = @last_activity_us if @last_activity_us - data.to_json(*args) + data.to_json(*) end end @@ -88,13 +88,13 @@ def initialize # @return [Integer] version attr_accessor :version - def to_json(*args) + def to_json(*) { version: @version, id: @id, sdk: @sdk, services: @services, - }.to_json(*args) + }.to_json(*) end end @@ -130,7 +130,7 @@ def initialize yield self if block_given? end - def to_json(*args) + def to_json(*) data = { id: @id, state: @state, @@ -139,7 +139,7 @@ def to_json(*args) latency: @latency, } data[:error] = @error if @error - data.to_json(*args) + data.to_json(*) end end @@ -171,13 +171,13 @@ def initialize # @return [Integer] version attr_accessor :version - def to_json(*args) + def to_json(*) { version: @version, id: @id, sdk: @sdk, services: @services, - }.to_json(*args) + }.to_json(*) end end end diff --git a/lib/couchbase/search_options.rb b/lib/couchbase/search_options.rb index 6c5df820..2d6edacc 100644 --- a/lib/couchbase/search_options.rb +++ b/lib/couchbase/search_options.rb @@ -84,8 +84,8 @@ def to_h end # @return [String] - def to_json(*args) - to_h.to_json(*args) + def to_json(*) + to_h.to_json(*) end # Prepare {MatchQuery} body @@ -1128,8 +1128,8 @@ def to_h end # @api private - def to_json(*args) - to_h.to_json(*args) + def to_json(*) + to_h.to_json(*) end end @@ -1173,8 +1173,8 @@ def initialize end # @api private - def to_json(*args) - {by: :score, desc: desc}.to_json(*args) + def to_json(*) + {by: :score, desc: desc}.to_json(*) end end @@ -1189,8 +1189,8 @@ def initialize end # @api private - def to_json(*args) - {by: :id, desc: desc}.to_json(*args) + def to_json(*) + {by: :id, desc: desc}.to_json(*) end end @@ -1219,8 +1219,8 @@ def initialize(field) end # @api private - def to_json(*args) - {by: :field, field: field, desc: desc, type: type, missing: missing, mode: mode}.to_json(*args) + def to_json(*) + {by: :field, field: field, desc: desc, type: type, missing: missing, mode: mode}.to_json(*) end end @@ -1253,8 +1253,8 @@ def initialize(field, longitude, latitude) end # @api private - def to_json(*args) - {by: :geo_distance, field: field, desc: desc, location: [longitude, latitude], unit: unit}.to_json(*args) + def to_json(*) + {by: :geo_distance, field: field, desc: desc, location: [longitude, latitude], unit: unit}.to_json(*) end end end @@ -1292,8 +1292,8 @@ def initialize(field) end # @api private - def to_json(*args) - {field: field, size: size}.to_json(*args) + def to_json(*) + {field: field, size: size}.to_json(*) end end @@ -1319,8 +1319,8 @@ def add(name, min, max) end # @api private - def to_json(*args) - {field: field, size: size, numeric_ranges: @ranges}.to_json(*args) + def to_json(*) + {field: field, size: size, numeric_ranges: @ranges}.to_json(*) end end @@ -1351,8 +1351,8 @@ def add(name, start_time, end_time) end # @api private - def to_json(*args) - {field: field, size: size, date_ranges: @ranges}.to_json(*args) + def to_json(*) + {field: field, size: size, date_ranges: @ranges}.to_json(*) end end end diff --git a/test/utils/tracing.rb b/test/utils/tracing.rb index c09af20b..77d45c51 100644 --- a/test/utils/tracing.rb +++ b/test/utils/tracing.rb @@ -129,7 +129,7 @@ def assert_compound_http_span( scope_name: nil, collection_name: nil, statement: nil, - &block + & ) assert_span env, span, op_name, parent @@ -163,7 +163,7 @@ def assert_compound_http_span( assert_equal child_count, span.children.size unless child_count.nil? - span.children.each_with_index(&block) + span.children.each_with_index(&) end def assert_http_span(