aws-record 2.13.4 → 2.15.0

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: 2bef51be84e19db7f5f609bbe75363201b34c405bd5f136f07bfa8395aa33516
4
- data.tar.gz: 3cfef628a1c38497e0f4d947dbc5c552648217b39f86fda65b9b02a122f75846
3
+ metadata.gz: 7748befa5a0647fb0e4204c665743d0592768fda095cc58d15ea9fe4955faa50
4
+ data.tar.gz: a4d1d268612ed098dd2596611a4e7400d6cd3cbba27e56d64f0c53cb456d6c9a
5
5
  SHA512:
6
- metadata.gz: c24c82a76920c67e0898b6013bfe66f3511b94ebaa0787fc007a2142649263adbe44d9dbaa31096fba277172fe47682862d63113e713fdaa7a6ec2e4a800133b
7
- data.tar.gz: 3eeffd1656ca69b36afe0e708aedd4f6fd4e4874f1133507012fae78f0a5741a8f244d8ec4c89e0986914ed48489f1949c9b131949e90da28130088f52802d3f
6
+ metadata.gz: c8483cc8cbf30b13b2d1a799d6ccba144be4db21297419ba8890d9aba86c5432816d20177a55d8eade6da0ceb3acb05c279409c47e43431f25087e76bacf2bfb
7
+ data.tar.gz: '042018bb4576939f825857963ca035dd14651306cd3a26fbb3080e25f91e6a0df040f5057762400da3256d70e50fcb70769bc566ab83ee517ae1f27682867bae'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ 2.15.0 (2026-04-20)
2
+ ------------------
3
+
4
+ * Feature - Add `ostruct` as a dependency to support Ruby 4.0.
5
+
6
+ 2.14.0 (2025-06-04)
7
+ ------------------
8
+
9
+ * Feature - Drop Ruby runtime support for 2.5 and 2.6.
10
+
1
11
  2.13.4 (2025-05-21)
2
12
  ------------------
3
13
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.13.4
1
+ 2.15.0
@@ -37,8 +37,8 @@ module Aws
37
37
  # See {Batch.read} for example usage.
38
38
  # @return [Array] an array of unordered new items
39
39
  def execute!
40
- operation_keys = unprocessed_keys[0..BATCH_GET_ITEM_LIMIT - 1]
41
- @unprocessed_keys = unprocessed_keys[BATCH_GET_ITEM_LIMIT..-1] || []
40
+ operation_keys = unprocessed_keys[0..(BATCH_GET_ITEM_LIMIT - 1)]
41
+ @unprocessed_keys = unprocessed_keys[BATCH_GET_ITEM_LIMIT..] || []
42
42
 
43
43
  operations = build_operations(operation_keys)
44
44
  result = @client.batch_get_item(request_items: operations)
@@ -244,7 +244,7 @@ module Aws
244
244
  end
245
245
  end
246
246
 
247
- def _perform_save(opts)
247
+ def _perform_save(opts) # rubocop:disable Naming/PredicateMethod
248
248
  force = opts.delete(:force)
249
249
  expect_new = expect_new_item?
250
250
  if force
@@ -59,7 +59,7 @@ module Aws
59
59
  end
60
60
 
61
61
  def _check_if_reserved(name)
62
- return unless @model_class.instance_methods.include?(name)
62
+ return unless @model_class.method_defined?(name)
63
63
 
64
64
  raise Errors::ReservedName, "Cannot name an attribute #{name}, that would collide with an " \
65
65
  'existing instance method.'
@@ -244,7 +244,7 @@ module Aws
244
244
  # we will only alter TTL status if we have a TTL attribute defined. We
245
245
  # may someday support explicit TTL deletion, but we do not yet do this.
246
246
  return unless @ttl_attribute
247
- return if _ttl_compatibility_check
247
+ return if ttl_compatibility_check?
248
248
 
249
249
  client.update_time_to_live(
250
250
  table_name: @model_class.table_name,
@@ -268,7 +268,7 @@ module Aws
268
268
  # @return [Boolean] true if remote is compatible, false otherwise.
269
269
  def compatible?
270
270
  resp = @client.describe_table(table_name: @model_class.table_name)
271
- _compatible_check(resp) && _ttl_compatibility_check
271
+ _compatible_check(resp) && ttl_compatibility_check?
272
272
  rescue DynamoDB::Errors::ResourceNotFoundException
273
273
  false
274
274
  end
@@ -285,14 +285,14 @@ module Aws
285
285
  _keys_equal(resp) &&
286
286
  _ad_equal(resp) &&
287
287
  _gsi_equal(resp) &&
288
- _ttl_match_check
288
+ ttl_match_check?
289
289
  rescue DynamoDB::Errors::ResourceNotFoundException
290
290
  false
291
291
  end
292
292
 
293
293
  private
294
294
 
295
- def _ttl_compatibility_check
295
+ def ttl_compatibility_check?
296
296
  if @ttl_attribute
297
297
  ttl_status = @client.describe_time_to_live(
298
298
  table_name: @model_class.table_name
@@ -305,7 +305,7 @@ module Aws
305
305
  end
306
306
  end
307
307
 
308
- def _ttl_match_check
308
+ def ttl_match_check?
309
309
  ttl_status = @client.describe_time_to_live(
310
310
  table_name: @model_class.table_name
311
311
  )
@@ -347,7 +347,7 @@ module Aws
347
347
  opts
348
348
  end
349
349
 
350
- def _add_global_secondary_index_throughput(opts, resp_gsis)
350
+ def _add_global_secondary_index_throughput(opts, resp_gsis) # rubocop:disable Naming/PredicateMethod
351
351
  gsis = resp_gsis.map(&:index_name)
352
352
  gsi_updates = []
353
353
  gsis.each do |index_name|
@@ -17,7 +17,7 @@ module Aws
17
17
  # class. If this option is not included, a client will be constructed for
18
18
  # you with default parameters.
19
19
  def initialize(model, opts = {})
20
- _assert_model_valid(model)
20
+ valid_model?(model)
21
21
  @model = model
22
22
  @client = opts[:client] || model.dynamodb_client || Aws::DynamoDB::Client.new
23
23
  @client.config.user_agent_frameworks << 'aws-record'
@@ -130,7 +130,7 @@ module Aws
130
130
 
131
131
  private
132
132
 
133
- def _assert_model_valid(model)
133
+ def valid_model?(model)
134
134
  _assert_required_include(model)
135
135
  model.model_valid?
136
136
  end
metadata CHANGED
@@ -1,15 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.4
4
+ version: 2.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-05-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ostruct
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: aws-sdk-dynamodb
15
28
  requirement: !ruby/object:Gem::Requirement
@@ -76,9 +89,8 @@ files:
76
89
  - lib/aws-record/record/version.rb
77
90
  homepage: https://github.com/aws/aws-sdk-ruby-record
78
91
  licenses:
79
- - Apache 2.0
92
+ - Apache-2.0
80
93
  metadata: {}
81
- post_install_message:
82
94
  rdoc_options: []
83
95
  require_paths:
84
96
  - lib
@@ -86,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
98
  requirements:
87
99
  - - ">="
88
100
  - !ruby/object:Gem::Version
89
- version: '2.3'
101
+ version: '2.7'
90
102
  required_rubygems_version: !ruby/object:Gem::Requirement
91
103
  requirements:
92
104
  - - ">="
93
105
  - !ruby/object:Gem::Version
94
106
  version: '0'
95
107
  requirements: []
96
- rubygems_version: 3.4.19
97
- signing_key:
108
+ rubygems_version: 4.0.3
98
109
  specification_version: 4
99
110
  summary: AWS Record library for Amazon DynamoDB
100
111
  test_files: []