Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins:
- rubocop-thread_safety

AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2
NewCops: enable
SuggestExtensions: false
Exclude:
Expand Down
1 change: 0 additions & 1 deletion bin/init-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require "set"
require "optparse"

class Object
Expand Down
6 changes: 3 additions & 3 deletions bin/jenkins/repackage-extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion couchbase.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions lib/active_support/cache/couchbase_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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, **)
Expand Down Expand Up @@ -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, **)
Expand Down
16 changes: 8 additions & 8 deletions lib/couchbase/diagnostics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def initialize
yield self if block_given?
end

def to_json(*args)
def to_json(*)
data = {
id: @id,
state: @state,
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -130,7 +130,7 @@ def initialize
yield self if block_given?
end

def to_json(*args)
def to_json(*)
data = {
id: @id,
state: @state,
Expand All @@ -139,7 +139,7 @@ def to_json(*args)
latency: @latency,
}
data[:error] = @error if @error
data.to_json(*args)
data.to_json(*)
end
end

Expand Down Expand Up @@ -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
36 changes: 18 additions & 18 deletions lib/couchbase/search_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/utils/tracing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand Down
Loading