google-cloud-bigtable 2.3.0 → 2.4.0

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: ceb71908240117b3c3e98f009a6be24f4ae9ca510523414b91720aab576f925a
4
- data.tar.gz: 15c5a7c7617184eac62271c0ba4b2de71b4f9d643c25751dcef0de98dde7d67c
3
+ metadata.gz: f1f99712143906255ee1d2632c445d1c1bdacb1a407c5a63a3e26bbf4446212e
4
+ data.tar.gz: 8371b2372d45334f65a625271d78fe8ea5bf3dc8448cdbd0827908925b2a7d2d
5
5
  SHA512:
6
- metadata.gz: 00155edefe171f720de9af636a6a8be2844f889c1750af57a851de83c567e6fc746ce1dbf2f05515d73f0424acade2566874d096f867af1b8c1f5b99e132e81c
7
- data.tar.gz: e8a2f9731e9d43897c213ace6810f3a4dcc86a9f5d71eefcf802143c34ca6a151b23e2649081779932c03244e4f3c1ca182f214f122e82b76cbc3a0404d3e54f
6
+ metadata.gz: 0a3aa85a0322a4182e01152ded9445f0b5442a69a63a47c338a7137a2e170f2ad62a37badf7e2079e3e8ee75080a6ff0a0022314ae73021a01439833d585f3d5
7
+ data.tar.gz: 13e017d3992738213ca3ac3d50cdc91ce954c5326956f7b814f441f69fee876c8d97e922a2d85c931e7c620d0f51b37ed2c0b5b0ada8afeaf26e229751adec36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Release History
2
2
 
3
+ ### 2.4.0 / 2021-03-10
4
+
5
+ #### Features
6
+
7
+ * Drop support for Ruby 2.4 and add support for Ruby 3.0
8
+
9
+ #### Documentation
10
+
11
+ * Add link to Garbage collection docs
12
+
3
13
  ### 2.3.0 / 2021-02-04
4
14
 
5
15
  #### Features
data/CONTRIBUTING.md CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
24
24
  In order to use the google-cloud-bigtable console and run the project's tests,
25
25
  there is a small amount of setup:
26
26
 
27
- 1. Install Ruby. google-cloud-bigtable requires Ruby 2.4+. You may choose to
27
+ 1. Install Ruby. google-cloud-bigtable requires Ruby 2.5+. You may choose to
28
28
  manage your Ruby and gem installations with [RVM](https://rvm.io/),
29
29
  [rbenv](https://github.com/rbenv/rbenv), or
30
30
  [chruby](https://github.com/postmodern/chruby).
data/LOGGING.md CHANGED
@@ -3,7 +3,7 @@
3
3
  To enable logging for this library, set the logger for the underlying
4
4
  [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger
5
5
  that you set may be a Ruby stdlib
6
- [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as
6
+ [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as
7
7
  shown below, or a
8
8
  [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
9
9
  that will write logs to [Stackdriver
@@ -122,12 +122,12 @@ module Google
122
122
  # app_profile.name
123
123
  # end
124
124
  #
125
- def all
125
+ def all &block
126
126
  return enum_for :all unless block_given?
127
127
 
128
128
  results = self
129
129
  loop do
130
- results.each { |r| yield r }
130
+ results.each(&block)
131
131
  break unless next?
132
132
  grpc.next_page
133
133
  results = self.class.from_grpc grpc, service
@@ -124,12 +124,12 @@ module Google
124
124
  # backup.backup_id
125
125
  # end
126
126
  #
127
- def all
127
+ def all &block
128
128
  return enum_for :all unless block_given?
129
129
 
130
130
  results = self
131
131
  loop do
132
- results.each { |r| yield r }
132
+ results.each(&block)
133
133
  break unless next?
134
134
  grpc.next_page
135
135
  results = self.class.from_grpc grpc, service
@@ -57,11 +57,12 @@ module Google
57
57
 
58
58
  raise_if chunk.value_size.positive?, "Commit rows cannot have a non-zero value_size." if chunk.commit_row
59
59
 
60
- if state == NEW_ROW
60
+ case state
61
+ when NEW_ROW
61
62
  process_new_row
62
- elsif state == CELL_IN_PROGRESS
63
+ when CELL_IN_PROGRESS
63
64
  process_cell_in_progress
64
- elsif state == ROW_IN_PROGRESS
65
+ when ROW_IN_PROGRESS
65
66
  process_row_in_progress
66
67
  end
67
68
  end
@@ -129,12 +129,12 @@ module Google
129
129
  # puts cluster.cluster_id
130
130
  # end
131
131
  #
132
- def all
132
+ def all &block
133
133
  return enum_for :all unless block_given?
134
134
 
135
135
  results = self
136
136
  loop do
137
- results.each { |r| yield r }
137
+ results.each(&block)
138
138
  break unless results.next?
139
139
  results = results.next
140
140
  end
@@ -45,7 +45,11 @@ module Google
45
45
  ##
46
46
  # The garbage collection rule to be used for the column family.
47
47
  # Optional. The service default value will be used when not specified.
48
+ #
49
+ # @see https://cloud.google.com/bigtable/docs/garbage-collection Garbage collection
50
+ #
48
51
  # @return [Google::Cloud::Bigtable::GcRule, nil]
52
+ #
49
53
  attr_accessor :gc_rule
50
54
 
51
55
  # @private
@@ -222,6 +222,8 @@ module Google
222
222
  ##
223
223
  # Updates an existing column family in the table.
224
224
  #
225
+ # @see https://cloud.google.com/bigtable/docs/garbage-collection Garbage collection
226
+ #
225
227
  # @param name [String] Column family name.
226
228
  # @param gc_rule [Google::Cloud::Bigtable::GcRule] The new garbage
227
229
  # collection rule to be used for the column family. Optional. The
@@ -28,6 +28,8 @@ module Google
28
28
  # so it is possible for reads to return a cell even if it matches the
29
29
  # active GC expression for its column family.
30
30
  #
31
+ # @see https://cloud.google.com/bigtable/docs/garbage-collection Garbage collection
32
+ #
31
33
  # GC Rule types:
32
34
  # * `max_num_versions` - A garbage-collection rule that explicitly
33
35
  # states the maximum number of cells to keep for all columns in a
@@ -126,12 +126,12 @@ module Google
126
126
  # puts instance.instance_id
127
127
  # end
128
128
  #
129
- def all
129
+ def all &block
130
130
  return enum_for :all unless block_given?
131
131
 
132
132
  results = self
133
133
  loop do
134
- results.each { |r| yield r }
134
+ results.each(&block)
135
135
  break unless results.next?
136
136
  results = results.next
137
137
  end
@@ -335,7 +335,8 @@ module Google
335
335
  # end
336
336
  #
337
337
  class Response
338
- attr_reader :index, :status
338
+ attr_reader :index
339
+ attr_reader :status
339
340
 
340
341
  ##
341
342
  # @private Creates a MutationEntry::Response object.
@@ -54,7 +54,8 @@ module Google
54
54
  # policy.roles["roles/viewer"] = ["allUsers"]
55
55
  #
56
56
  class Policy
57
- attr_reader :etag, :roles
57
+ attr_reader :etag
58
+ attr_reader :roles
58
59
 
59
60
  # Creates a Policy instance.
60
61
  # @param etag [String]
@@ -141,7 +141,8 @@ module Google
141
141
  # Default value is false.
142
142
  #
143
143
  class SingleClusterRouting < RoutingPolicy
144
- attr_reader :cluster_id, :allow_transactional_writes
144
+ attr_reader :cluster_id
145
+ attr_reader :allow_transactional_writes
145
146
 
146
147
  ##
147
148
  # Creates a new single-cluster routing policy.
@@ -155,6 +156,7 @@ module Google
155
156
  # Default value is false.
156
157
  #
157
158
  def initialize cluster_id, allow_transactional_writes
159
+ super()
158
160
  @cluster_id = cluster_id
159
161
  @allow_transactional_writes = allow_transactional_writes
160
162
  end
@@ -30,7 +30,11 @@ module Google
30
30
  # Row cell built from data chunks.
31
31
  #
32
32
  class Cell
33
- attr_reader :family, :qualifier, :value, :labels, :timestamp
33
+ attr_reader :family
34
+ attr_reader :qualifier
35
+ attr_reader :value
36
+ attr_reader :labels
37
+ attr_reader :timestamp
34
38
 
35
39
  ##
36
40
  # Creates a row cell instance.
@@ -170,10 +170,10 @@ module Google
170
170
  # @return [Boolean]
171
171
  #
172
172
  def start_key_read? range
173
- start_key = if !range.start_key_closed.empty?
174
- range.start_key_closed
175
- else
173
+ start_key = if range.start_key_closed.empty?
176
174
  range.start_key_open
175
+ else
176
+ range.start_key_closed
177
177
  end
178
178
 
179
179
  start_key.empty? || last_key >= start_key
@@ -186,10 +186,10 @@ module Google
186
186
  # @return [Boolean]
187
187
  #
188
188
  def end_key_read? range
189
- end_key = if !range.end_key_closed.empty?
190
- range.end_key_closed
191
- else
189
+ end_key = if range.end_key_closed.empty?
192
190
  range.end_key_open
191
+ else
192
+ range.end_key_closed
193
193
  end
194
194
 
195
195
  end_key && end_key <= last_key
@@ -47,7 +47,10 @@ module Google
47
47
  # end
48
48
  #
49
49
  class Status
50
- attr_reader :code, :description, :message, :details
50
+ attr_reader :code
51
+ attr_reader :description
52
+ attr_reader :message
53
+ attr_reader :details
51
54
 
52
55
  ##
53
56
  # @private Creates a Status object.
@@ -155,6 +155,8 @@ module Google
155
155
  # updated with the changes, and the updated column families will be
156
156
  # returned.
157
157
  #
158
+ # @see https://cloud.google.com/bigtable/docs/garbage-collection Garbage collection
159
+ #
158
160
  # @yield [column_families] A block for modifying the table's column
159
161
  # families. Applies multiple column modifications. Performs a series
160
162
  # of column family modifications on the specified table. Either all or
@@ -114,12 +114,12 @@ module Google
114
114
  # puts table.table_id
115
115
  # end
116
116
  #
117
- def all
117
+ def all &block
118
118
  return enum_for :all unless block_given?
119
119
 
120
120
  results = self
121
121
  loop do
122
- results.each { |r| yield r }
122
+ results.each(&block)
123
123
  break unless next?
124
124
  grpc.next_page
125
125
  results = self.class.from_grpc grpc, service
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigtable
19
- VERSION = "2.3.0".freeze
19
+ VERSION = "2.4.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-04 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-bigtable-admin-v2
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.24.0
61
+ version: 1.25.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.24.0
68
+ version: 1.25.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -241,14 +241,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
241
  requirements:
242
242
  - - ">="
243
243
  - !ruby/object:Gem::Version
244
- version: '2.4'
244
+ version: '2.5'
245
245
  required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  requirements:
247
247
  - - ">="
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.2.6
251
+ rubygems_version: 3.2.13
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: API Client library for Cloud Bigtable API