couchbase 3.5.3-arm64-darwin → 3.5.5-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b278cb8f05bf34460152e0b864bdac60416355ab7ede5e0260c23ef7cbfa8ac
4
- data.tar.gz: '0817c8b382f3c11e006468e5cc260f4b5fc292088d0ccfaf240149434666cd36'
3
+ metadata.gz: bef8e1bdb22618fed13f994996d18cf46f9274edcc380a6494c1b1b1e0bc9bec
4
+ data.tar.gz: c223d2e3375ebae530037b48d3b136d3a2dff2a44a508df1eaf0e147d1ac25fa
5
5
  SHA512:
6
- metadata.gz: cc3d0889d8ebeb74fa0c91d3f023d9cda5d952426b5d5977dcf95289280770c3af3c5ffa725c33fd59af30ce9bf428ebe15668ecc7bb78a7e24a1784d3de6287
7
- data.tar.gz: d387f4db737187655ba21143b9517d92bb30f965b7dc3dc57c793590253ef04f8a5767fb1e9dc2e35f7eadadf691956611977de7006ae08c612412891fc02974
6
+ metadata.gz: a3264674efa1c5fb6e586abacd15536b33285ecbf71ab2b3e40175064bbbaa3160a91c91c10c5a035c2780aa9c669882a7442190ede546d1ea8b195b5992d4b4
7
+ data.tar.gz: c687a0c4586959435dc9c62abc8d433b5b7207ae6dd02630ec1bf67f3802f26a1d091f632e466cba07f48774c802eacbe31ef8cb2b6063e991be1f8704c1f1d0
data/README.md CHANGED
@@ -23,7 +23,7 @@ The library has been tested with MRI 3.1, 3.2 and 3.3. Supported platforms are L
23
23
  Add this line to your application's Gemfile:
24
24
 
25
25
  ```ruby
26
- gem "couchbase", "3.5.3"
26
+ gem "couchbase", "3.5.5"
27
27
  ```
28
28
 
29
29
  And then execute:
@@ -233,7 +233,7 @@ module ActiveSupport
233
233
  end
234
234
 
235
235
  def write_serialized_entry(key, payload, expires_in: nil, race_condition_ttl: nil, raw: false, **)
236
- if race_condition_ttl && expires_in && expires_in.positive? && !raw
236
+ if race_condition_ttl && expires_in&.positive? && !raw
237
237
  # Add few minutes to expiry in the future to support race condition TTLs on read
238
238
  expires_in += 5.minutes
239
239
  end
@@ -250,7 +250,7 @@ module ActiveSupport
250
250
  return super if local_cache
251
251
 
252
252
  expires_in = options[:expires_in]
253
- if options[:race_condition_ttl] && expires_in && expires_in.positive?
253
+ if options[:race_condition_ttl] && expires_in&.positive?
254
254
  # Add few minutes to expiry in the future to support race condition TTLs on read
255
255
  expires_in += 5.minutes
256
256
  end
Binary file
Binary file
Binary file
@@ -46,7 +46,7 @@ module Couchbase
46
46
 
47
47
  # Return logger associated with the library
48
48
  def self.logger
49
- @logger # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
49
+ @logger # rubocop:disable ThreadSafety/ClassInstanceVariable
50
50
  end
51
51
 
52
52
  # Associate logger with the library
@@ -67,8 +67,8 @@ module Couchbase
67
67
  #
68
68
  # @since 3.4.0
69
69
  def self.set_logger(logger, adapter_class: nil, verbose: false, level: :info)
70
- @logger = logger # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
71
- if @logger.nil? # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
70
+ @logger = logger # rubocop:disable ThreadSafety/ClassInstanceVariable
71
+ if @logger.nil? # rubocop:disable ThreadSafety/ClassInstanceVariable
72
72
  Backend.install_logger_shim(nil)
73
73
  return
74
74
  end
@@ -237,10 +237,14 @@ module Couchbase
237
237
  # Options for {Collection#get_all_replicas}
238
238
  class GetAllReplicas < Base
239
239
  attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
240
+ attr_accessor :read_preference # @return [Symbol]
240
241
 
241
242
  # Creates an instance of options for {Collection#get_all_replicas}
242
243
  #
243
244
  # @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
245
+ # @param [Symbol] read_preference decides how the replica nodes will be selected.
246
+ # +:no_preference+:: no preference and will select any available replica. This is the default
247
+ # +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
244
248
  #
245
249
  # @param [Integer, #in_milliseconds, nil] timeout
246
250
  # @param [Proc, nil] retry_strategy the custom retry strategy, if set
@@ -249,12 +253,14 @@ module Couchbase
249
253
  #
250
254
  # @yieldparam [GetAllReplicas] self
251
255
  def initialize(transcoder: JsonTranscoder.new,
256
+ read_preference: :no_preference,
252
257
  timeout: nil,
253
258
  retry_strategy: nil,
254
259
  client_context: nil,
255
260
  parent_span: nil)
256
261
  super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
257
262
  @transcoder = transcoder
263
+ @read_preference = read_preference
258
264
  yield self if block_given?
259
265
  end
260
266
 
@@ -262,6 +268,7 @@ module Couchbase
262
268
  def to_backend
263
269
  {
264
270
  timeout: Utils::Time.extract_duration(@timeout),
271
+ read_preference: @read_preference,
265
272
  }
266
273
  end
267
274
 
@@ -272,10 +279,14 @@ module Couchbase
272
279
  # Options for {Collection#get_any_replica}
273
280
  class GetAnyReplica < Base
274
281
  attr_accessor :transcoder # @return [JsonTranscoder, #decode(String, Integer)]
282
+ attr_accessor :read_preference # @return [Symbol]
275
283
 
276
284
  # Creates an instance of options for {Collection#get_any_replica}
277
285
  #
278
286
  # @param [JsonTranscoder, #decode(String, Integer)] transcoder used for decoding
287
+ # @param [Symbol] read_preference decides how the replica nodes will be selected.
288
+ # +:no_preference+:: no preference and will select any available replica. This is the default
289
+ # +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
279
290
  #
280
291
  # @param [Integer, #in_milliseconds, nil] timeout
281
292
  # @param [Proc, nil] retry_strategy the custom retry strategy, if set
@@ -284,12 +295,14 @@ module Couchbase
284
295
  #
285
296
  # @yieldparam [GetAnyReplica] self
286
297
  def initialize(transcoder: JsonTranscoder.new,
298
+ read_preference: :no_preference,
287
299
  timeout: nil,
288
300
  retry_strategy: nil,
289
301
  client_context: nil,
290
302
  parent_span: nil)
291
303
  super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
292
304
  @transcoder = transcoder
305
+ @read_preference = read_preference
293
306
  yield self if block_given?
294
307
  end
295
308
 
@@ -297,6 +310,7 @@ module Couchbase
297
310
  def to_backend
298
311
  {
299
312
  timeout: Utils::Time.extract_duration(@timeout),
313
+ read_preference: @read_preference,
300
314
  }
301
315
  end
302
316
 
@@ -1032,10 +1046,14 @@ module Couchbase
1032
1046
  # Options for {Collection#lookup_in_any_replica}
1033
1047
  class LookupInAnyReplica < Base
1034
1048
  attr_accessor :transcoder # @return [JsonTranscoder, #decode(String)]
1049
+ attr_accessor :read_preference # @return [Symbol]
1035
1050
 
1036
1051
  # Creates an instance of options for {Collection#lookup_in_any_replica}
1037
1052
  #
1038
1053
  # @param [JsonTranscoder, #decode(String)] transcoder used for encoding
1054
+ # @param [Symbol] read_preference decides how the replica nodes will be selected.
1055
+ # +:no_preference+:: no preference and will select any available replica. This is the default
1056
+ # +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
1039
1057
  #
1040
1058
  # @param [Integer, #in_milliseconds, nil] timeout
1041
1059
  # @param [Proc, nil] retry_strategy the custom retry strategy, if set
@@ -1044,12 +1062,14 @@ module Couchbase
1044
1062
  #
1045
1063
  # @yieldparam [LookupIn] self
1046
1064
  def initialize(transcoder: JsonTranscoder.new,
1065
+ read_preference: :no_preference,
1047
1066
  timeout: nil,
1048
1067
  retry_strategy: nil,
1049
1068
  client_context: nil,
1050
1069
  parent_span: nil)
1051
1070
  super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
1052
1071
  @transcoder = transcoder
1072
+ @read_preference = read_preference
1053
1073
  yield self if block_given?
1054
1074
  end
1055
1075
 
@@ -1057,6 +1077,7 @@ module Couchbase
1057
1077
  def to_backend
1058
1078
  {
1059
1079
  timeout: Utils::Time.extract_duration(@timeout),
1080
+ read_preference: @read_preference,
1060
1081
  }
1061
1082
  end
1062
1083
 
@@ -1071,10 +1092,14 @@ module Couchbase
1071
1092
  # Options for {Collection#lookup_in_all_replicas}
1072
1093
  class LookupInAllReplicas < Base
1073
1094
  attr_accessor :transcoder # @return [JsonTranscoder, #decode(String)]
1095
+ attr_accessor :read_preference # @return [Symbol]
1074
1096
 
1075
1097
  # Creates an instance of options for {Collection#lookup_in_all_replicas}
1076
1098
  #
1077
1099
  # @param [JsonTranscoder, #decode(String)] transcoder used for encoding
1100
+ # @param [Symbol] read_preference decides how the replica nodes will be selected.
1101
+ # +:no_preference+:: no preference and will select any available replica. This is the default
1102
+ # +:selected_server_group+:: restrict to nodes in {Cluster#preferred_server_group}
1078
1103
  #
1079
1104
  # @param [Integer, #in_milliseconds, nil] timeout
1080
1105
  # @param [Proc, nil] retry_strategy the custom retry strategy, if set
@@ -1083,12 +1108,14 @@ module Couchbase
1083
1108
  #
1084
1109
  # @yieldparam [LookupInAllReplicas] self
1085
1110
  def initialize(transcoder: JsonTranscoder.new,
1111
+ read_preference: :no_preference,
1086
1112
  timeout: nil,
1087
1113
  retry_strategy: nil,
1088
1114
  client_context: nil,
1089
1115
  parent_span: nil)
1090
1116
  super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
1091
1117
  @transcoder = transcoder
1118
+ @read_preference = read_preference
1092
1119
  yield self if block_given?
1093
1120
  end
1094
1121
 
@@ -1096,6 +1123,7 @@ module Couchbase
1096
1123
  def to_backend
1097
1124
  {
1098
1125
  timeout: Utils::Time.extract_duration(@timeout),
1126
+ read_preference: @read_preference,
1099
1127
  }
1100
1128
  end
1101
1129
 
@@ -1646,6 +1674,8 @@ module Couchbase
1646
1674
  class Cluster
1647
1675
  attr_accessor :authenticator # @return [PasswordAuthenticator, CertificateAuthenticator]
1648
1676
 
1677
+ attr_accessor :preferred_server_group # @return [String]
1678
+
1649
1679
  attr_accessor :enable_metrics # @return [Boolean]
1650
1680
  attr_accessor :metrics_emit_interval # @return [nil, Integer, #in_milliseconds]
1651
1681
  attr_accessor :enable_tracing # @return [Boolean]
@@ -1679,6 +1709,7 @@ module Couchbase
1679
1709
  # Creates an instance of options for {Couchbase::Cluster.connect}
1680
1710
  #
1681
1711
  # @param [PasswordAuthenticator, CertificateAuthenticator] authenticator
1712
+ # @param [String] preferred_server_group the server group to use for replica APIs e.g. {Collection#get_all_replicas}
1682
1713
  # @param [nil, Integer, #in_milliseconds] key_value_timeout default timeout for Key/Value operations, e.g. {Collection#get}
1683
1714
  # @param [nil, Integer, #in_milliseconds] view_timeout default timeout for View query
1684
1715
  # @param [nil, Integer, #in_milliseconds] query_timeout default timeout for N1QL query
@@ -1690,6 +1721,7 @@ module Couchbase
1690
1721
  #
1691
1722
  # @yieldparam [Cluster] self
1692
1723
  def initialize(authenticator: nil,
1724
+ preferred_server_group: nil,
1693
1725
  enable_metrics: nil,
1694
1726
  metrics_emit_interval: nil,
1695
1727
  enable_tracing: nil,
@@ -1719,6 +1751,7 @@ module Couchbase
1719
1751
  config_idle_redial_timeout: nil,
1720
1752
  idle_http_connection_timeout: nil)
1721
1753
  @authenticator = authenticator
1754
+ @preferred_server_group = preferred_server_group
1722
1755
  @enable_metrics = enable_metrics
1723
1756
  @metrics_emit_interval = metrics_emit_interval
1724
1757
  @enable_tracing = enable_tracing
@@ -1765,6 +1798,7 @@ module Couchbase
1765
1798
  def to_backend
1766
1799
  {
1767
1800
  enable_metrics: @enable_metrics,
1801
+ preferred_server_group: @preferred_server_group,
1768
1802
  metrics_emit_interval: Utils::Time.extract_duration(@metrics_emit_interval),
1769
1803
  enable_tracing: @enable_tracing,
1770
1804
  orphaned_emit_interval: Utils::Time.extract_duration(@orphaned_emit_interval),
@@ -2841,6 +2875,20 @@ module Couchbase
2841
2875
  Scan.new(**args)
2842
2876
  end
2843
2877
 
2878
+ # Construct {LookupInAnyReplica} options for {Collection#lookup_in_any_replica}
2879
+ #
2880
+ # @return [LookupInAnyReplica]
2881
+ def LookupInAnyReplica(**args)
2882
+ LookupInAnyReplica.new(**args)
2883
+ end
2884
+
2885
+ # Construct {LookupInAllReplics} options for {Collection#lookup_in_all_replicas}
2886
+ #
2887
+ # @return [LookupInAllReplicas]
2888
+ def LookupInAllReplicas(**args)
2889
+ LookupInAllReplicas.new(**args)
2890
+ end
2891
+
2844
2892
  # rubocop:enable Naming/MethodName
2845
2893
  end
2846
2894
  end
@@ -21,5 +21,5 @@ module Couchbase
21
21
  # $ ruby -rcouchbase -e 'pp Couchbase::VERSION'
22
22
  # {:sdk=>"3.4.0", :ruby_abi=>"3.1.0", :revision=>"416fe68e6029ec8a4c40611cf6e6b30d3b90d20f"}
23
23
  VERSION = {} unless defined?(VERSION) # rubocop:disable Style/MutableConstant
24
- VERSION.update(:sdk => "3.5.3")
24
+ VERSION.update(:sdk => "3.5.5")
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.3
4
+ version: 3.5.5
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Sergey Avseyev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-27 00:00:00.000000000 Z
11
+ date: 2025-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -159,11 +159,11 @@ licenses:
159
159
  - Apache-2.0
160
160
  metadata:
161
161
  homepage_uri: https://docs.couchbase.com/ruby-sdk/current/hello-world/start-using-sdk.html
162
- bug_tracker_uri: https://issues.couchbase.com/browse/RCBC
162
+ bug_tracker_uri: https://jira.issues.couchbase.com/browse/RCBC
163
163
  mailing_list_uri: https://www.couchbase.com/forums/c/ruby-sdk
164
- source_code_uri: https://github.com/couchbase/couchbase-ruby-client/tree/3.5.3
165
- changelog_uri: https://github.com/couchbase/couchbase-ruby-client/releases/tag/3.5.3
166
- documentation_uri: https://docs.couchbase.com/sdk-api/couchbase-ruby-client-3.5.3/index.html
164
+ source_code_uri: https://github.com/couchbase/couchbase-ruby-client/tree/3.5.5
165
+ changelog_uri: https://github.com/couchbase/couchbase-ruby-client/releases/tag/3.5.5
166
+ documentation_uri: https://docs.couchbase.com/sdk-api/couchbase-ruby-client-3.5.5/index.html
167
167
  github_repo: https://github.com/couchbase/couchbase-ruby-client
168
168
  rubygems_mfa_required: 'true'
169
169
  post_install_message: