dynamo-record 1.4.2 → 2.0.0.rc1
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 +4 -4
- data/LICENSE.txt +21 -0
- data/lib/dynamo/record/marshalers.rb +2 -2
- data/lib/dynamo/record/model.rb +1 -1
- data/lib/dynamo/record/model_existence_validator.rb +1 -1
- data/lib/dynamo/record/task_helpers/migration_runner.rb +1 -1
- data/lib/dynamo/record/version.rb +1 -1
- data/lib/dynamo/record.rb +1 -0
- data/spec/gemfiles/{rails-5.2.gemfile → rails-7.1.gemfile} +1 -1
- data/spec/spec_helper.rb +3 -3
- metadata +28 -51
- data/spec/gemfiles/rails-6.0.gemfile +0 -7
- data/spec/gemfiles/rails-6.1.gemfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e7004f14e0eef3abddcf32bc09a52fdebcc684c64489d965d74e19a1bede687
|
4
|
+
data.tar.gz: 22d131f7cdd7d09824cf70e91270244648784da9ddc25b45a1cb37f6fc8f1282
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0978ad6b8d7dc2046a3306729e6601096ec833233f5953b3590dee1d0d61f51c4ed612484ed7fbb394a2d8cb6a2aed7c033f252cb990ea2a6b9a2b90d76a714
|
7
|
+
data.tar.gz: bbf39b630c8e7b8016713946181c62b94dad0181537f4862aa018fcde74dd809b63641beee9b4604c0767099dc8fd4b6b623a604b6a2ddb3857f3ea504c99329
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Instructure, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -7,7 +7,7 @@ module Dynamo
|
|
7
7
|
|
8
8
|
def self.included(sub_class)
|
9
9
|
sub_class.extend(ClassMethods)
|
10
|
-
super
|
10
|
+
super
|
11
11
|
end
|
12
12
|
|
13
13
|
module ClassMethods
|
@@ -27,7 +27,7 @@ module Dynamo
|
|
27
27
|
opts[:dynamodb_type] = 'S'
|
28
28
|
|
29
29
|
# It is very unfortunate that Aws::Record used `attr`
|
30
|
-
attr(name, Aws::Record::Marshalers::StringMarshaler.new(opts), opts)
|
30
|
+
attr(name, Aws::Record::Marshalers::StringMarshaler.new(opts), opts) # rubocop:disable Style/Attr
|
31
31
|
end
|
32
32
|
|
33
33
|
def define_readers(name, parts, cast_function)
|
data/lib/dynamo/record/model.rb
CHANGED
@@ -6,7 +6,7 @@ module Dynamo
|
|
6
6
|
def validate_each(record, attribute, value)
|
7
7
|
return if options[:model].exists? value
|
8
8
|
|
9
|
-
record.errors[attribute] << (options[:message] || "#{attribute}:#{value} is not a valid #{options[:model]}")
|
9
|
+
record.errors[attribute] << (options[:message] || "#{attribute}:#{value} is not a valid #{options[:model]}") # rubocop:disable Rails/DeprecatedActiveModelErrorsMethods
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -9,7 +9,7 @@ module Dynamo
|
|
9
9
|
filename_regexp = /\A([0-9]+)_([_a-z0-9]*)\.?([_a-z0-9]*)?\.rb\z/
|
10
10
|
|
11
11
|
# Sorts the files located in `db/dynamo_migrate` to ensure order is preserved
|
12
|
-
|
12
|
+
Rails.root.glob("#{path}/*.rb").sort.each do |file|
|
13
13
|
migration = migration(file, filename_regexp, constants)
|
14
14
|
|
15
15
|
# starts the migration
|
data/lib/dynamo/record.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Limit coverage reporting to one build:
|
4
|
-
if /^2
|
4
|
+
if /^3\.2/ =~ RUBY_VERSION && /7\.1/ =~ ENV.fetch('BUNDLE_GEMFILE', nil)
|
5
5
|
require 'simplecov'
|
6
6
|
|
7
7
|
SimpleCov.start do
|
@@ -20,7 +20,7 @@ Combustion.initialize! do
|
|
20
20
|
config.dynamo = { 'prefix' => 'test' }
|
21
21
|
end
|
22
22
|
|
23
|
-
Dir['./spec/support/**/*.rb'].
|
23
|
+
Dir['./spec/support/**/*.rb'].each { |f| require f }
|
24
24
|
|
25
25
|
RSpec.configure do |config|
|
26
26
|
# Enable flags like --only-failures and --next-failure
|
@@ -32,7 +32,7 @@ RSpec.configure do |config|
|
|
32
32
|
end
|
33
33
|
|
34
34
|
Aws.config.update(
|
35
|
-
dynamodb: { endpoint: ENV
|
35
|
+
dynamodb: { endpoint: ENV.fetch('DYNAMO_ENDPOINT', nil) }
|
36
36
|
)
|
37
37
|
|
38
38
|
WebMock.disable_net_connect!(allow: ['dynamo:8000'])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamo-record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Slaughter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '7.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-record
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,54 +50,54 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '7.1'
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
56
|
+
version: '7.2'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
63
|
+
version: '7.1'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '7.2'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: activesupport
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
73
|
+
version: '7.1'
|
74
74
|
- - "<"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '7.2'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '7.1'
|
84
84
|
- - "<"
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: '
|
86
|
+
version: '7.2'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: bundler
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
91
|
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: 2.4.22
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
100
|
+
version: 2.4.22
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: byebug
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,28 +160,28 @@ dependencies:
|
|
160
160
|
requirements:
|
161
161
|
- - "~>"
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
version: 1.
|
163
|
+
version: 1.75.2
|
164
164
|
type: :development
|
165
165
|
prerelease: false
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - "~>"
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: 1.
|
170
|
+
version: 1.75.2
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
name: rubocop-rails
|
173
173
|
requirement: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
175
|
- - "~>"
|
176
176
|
- !ruby/object:Gem::Version
|
177
|
-
version: 2.
|
177
|
+
version: 2.31.0
|
178
178
|
type: :development
|
179
179
|
prerelease: false
|
180
180
|
version_requirements: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
182
|
- - "~>"
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: 2.
|
184
|
+
version: 2.31.0
|
185
185
|
- !ruby/object:Gem::Dependency
|
186
186
|
name: simplecov
|
187
187
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,6 +231,7 @@ executables: []
|
|
231
231
|
extensions: []
|
232
232
|
extra_rdoc_files: []
|
233
233
|
files:
|
234
|
+
- LICENSE.txt
|
234
235
|
- README.md
|
235
236
|
- lib/dynamo/record.rb
|
236
237
|
- lib/dynamo/record/batch_get.rb
|
@@ -249,9 +250,7 @@ files:
|
|
249
250
|
- lib/dynamo/record/task_helpers/scale.rb
|
250
251
|
- lib/dynamo/record/version.rb
|
251
252
|
- lib/tasks/dynamo.rake
|
252
|
-
- spec/gemfiles/rails-
|
253
|
-
- spec/gemfiles/rails-6.0.gemfile
|
254
|
-
- spec/gemfiles/rails-6.1.gemfile
|
253
|
+
- spec/gemfiles/rails-7.1.gemfile
|
255
254
|
- spec/internal/app/models/model1.rb
|
256
255
|
- spec/internal/app/models/model2.rb
|
257
256
|
- spec/internal/config/database.yml
|
@@ -275,7 +274,8 @@ files:
|
|
275
274
|
homepage: https://github.com/instructure/dynamo-record
|
276
275
|
licenses:
|
277
276
|
- MIT
|
278
|
-
metadata:
|
277
|
+
metadata:
|
278
|
+
rubygems_mfa_required: 'true'
|
279
279
|
post_install_message:
|
280
280
|
rdoc_options: []
|
281
281
|
require_paths:
|
@@ -284,38 +284,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
284
284
|
requirements:
|
285
285
|
- - ">="
|
286
286
|
- !ruby/object:Gem::Version
|
287
|
-
version: '
|
287
|
+
version: '3.1'
|
288
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
|
-
- - "
|
290
|
+
- - ">"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version:
|
292
|
+
version: 1.3.1
|
293
293
|
requirements: []
|
294
294
|
rubygems_version: 3.4.10
|
295
295
|
signing_key:
|
296
296
|
specification_version: 4
|
297
297
|
summary: Extensions to Aws::Record for working with DynamoDB.
|
298
|
-
test_files:
|
299
|
-
- spec/gemfiles/rails-5.2.gemfile
|
300
|
-
- spec/gemfiles/rails-6.0.gemfile
|
301
|
-
- spec/gemfiles/rails-6.1.gemfile
|
302
|
-
- spec/internal/app/models/model1.rb
|
303
|
-
- spec/internal/app/models/model2.rb
|
304
|
-
- spec/internal/config/database.yml
|
305
|
-
- spec/internal/db/dynamo_migrate/20170402163638_create_model_1.rb
|
306
|
-
- spec/internal/db/dynamo_migrate/20170402163639_create_model_2.rb
|
307
|
-
- spec/internal/db/invalid_dynamo_migrate/add_model_1_stream.rb
|
308
|
-
- spec/lib/dynamo/record/batch_get_spec.rb
|
309
|
-
- spec/lib/dynamo/record/batch_write_spec.rb
|
310
|
-
- spec/lib/dynamo/record/model_existence_vaildator_spec.rb
|
311
|
-
- spec/lib/dynamo/record/model_spec.rb
|
312
|
-
- spec/lib/dynamo/record/table_migration_spec.rb
|
313
|
-
- spec/lib/dynamo/record/task_helpers/cleanup_spec.rb
|
314
|
-
- spec/lib/dynamo/record/task_helpers/drop_all_tables_spec.rb
|
315
|
-
- spec/lib/dynamo/record/task_helpers/drop_table_spec.rb
|
316
|
-
- spec/lib/dynamo/record/task_helpers/list_tables_spec.rb
|
317
|
-
- spec/lib/dynamo/record/task_helpers/migration_runner_spec.rb
|
318
|
-
- spec/lib/dynamo/record/task_helpers/scale_spec.rb
|
319
|
-
- spec/lib/dynamo/record/version_spec.rb
|
320
|
-
- spec/spec_helper.rb
|
321
|
-
- spec/support/shared_contexts/with_dummy_model.rb
|
298
|
+
test_files: []
|