couchbase 3.5.4-x86_64-linux-musl → 3.5.5-x86_64-linux-musl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d05e1dd1dc8a71d28519d279d577fc3b47c166a740888566cbe07476b92a9c3
4
- data.tar.gz: 233b54f3306fddb36f249fcef59037c7f4ab08a08fcd0d8be468cba9e3f70c0a
3
+ metadata.gz: 06ee350a362fd362e298aadb5c226b1d6e7feec5f5aa04fa75dea85d530cf97b
4
+ data.tar.gz: 7b145e3a260bf954cfac7b8883f40d7179ff8429637bfddf852c1b08e4f60faf
5
5
  SHA512:
6
- metadata.gz: 2614429482ff1d3e180a90837f80624f0a50d108a3605289f79695fafe96ea1facfc4091ece751e5f8057a096b1fb06c255c6fb0abe16aa176279685a78e9a28
7
- data.tar.gz: c94b832312f2b0971cd4f695c50f7d9a1c370f5071062bddd003c3d088fc6624adf09eeac8b6b030732c24d523485b3dec0396704b55ce458942ffca55426059
6
+ metadata.gz: 2d89f6f7ee4591afab0efcabe2cbf32436c4f7f3ce2ff2bb90487b3b680884c5bc3c961889908a65e251ff845a60f00f9f01f3d49d4077c8e21285a8b0f235dc
7
+ data.tar.gz: 4adf26e02ed9e619e8bae5d26718c3456b6764422edc8d171e5d90e41bf8c3478416e73ddb1443ecd6a0f7f27505d6fa18ab10c7c02ce4894b72e3ded3f9ec47
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.4"
26
+ gem "couchbase", "3.5.5"
27
27
  ```
28
28
 
29
29
  And then execute:
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.4")
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.4
4
+ version: 3.5.5
5
5
  platform: x86_64-linux-musl
6
6
  authors:
7
7
  - Sergey Avseyev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-22 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
@@ -161,9 +161,9 @@ metadata:
161
161
  homepage_uri: https://docs.couchbase.com/ruby-sdk/current/hello-world/start-using-sdk.html
162
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.4
165
- changelog_uri: https://github.com/couchbase/couchbase-ruby-client/releases/tag/3.5.4
166
- documentation_uri: https://docs.couchbase.com/sdk-api/couchbase-ruby-client-3.5.4/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: