dynamoid 3.2.0 → 3.6.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 +4 -4
- data/CHANGELOG.md +111 -1
- data/README.md +580 -241
- data/lib/dynamoid.rb +2 -0
- data/lib/dynamoid/adapter.rb +15 -15
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3.rb +82 -102
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/batch_get_item.rb +108 -0
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/create_table.rb +29 -16
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/item_updater.rb +3 -2
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb +2 -2
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/limit.rb +2 -3
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/start_key.rb +2 -2
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/query.rb +15 -6
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/scan.rb +15 -5
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/table.rb +1 -0
- data/lib/dynamoid/adapter_plugin/aws_sdk_v3/until_past_table_status.rb +5 -3
- data/lib/dynamoid/application_time_zone.rb +1 -0
- data/lib/dynamoid/associations.rb +182 -19
- data/lib/dynamoid/associations/association.rb +4 -2
- data/lib/dynamoid/associations/belongs_to.rb +2 -1
- data/lib/dynamoid/associations/has_and_belongs_to_many.rb +2 -1
- data/lib/dynamoid/associations/has_many.rb +2 -1
- data/lib/dynamoid/associations/has_one.rb +2 -1
- data/lib/dynamoid/associations/many_association.rb +65 -22
- data/lib/dynamoid/associations/single_association.rb +28 -1
- data/lib/dynamoid/components.rb +8 -3
- data/lib/dynamoid/config.rb +16 -3
- data/lib/dynamoid/config/backoff_strategies/constant_backoff.rb +1 -0
- data/lib/dynamoid/config/backoff_strategies/exponential_backoff.rb +1 -0
- data/lib/dynamoid/config/options.rb +1 -0
- data/lib/dynamoid/criteria.rb +2 -1
- data/lib/dynamoid/criteria/chain.rb +418 -46
- data/lib/dynamoid/criteria/ignored_conditions_detector.rb +3 -3
- data/lib/dynamoid/criteria/key_fields_detector.rb +109 -32
- data/lib/dynamoid/criteria/nonexistent_fields_detector.rb +3 -2
- data/lib/dynamoid/criteria/overwritten_conditions_detector.rb +1 -1
- data/lib/dynamoid/dirty.rb +239 -32
- data/lib/dynamoid/document.rb +130 -251
- data/lib/dynamoid/dumping.rb +9 -0
- data/lib/dynamoid/dynamodb_time_zone.rb +1 -0
- data/lib/dynamoid/fields.rb +246 -20
- data/lib/dynamoid/finders.rb +69 -32
- data/lib/dynamoid/identity_map.rb +6 -0
- data/lib/dynamoid/indexes.rb +76 -17
- data/lib/dynamoid/loadable.rb +31 -0
- data/lib/dynamoid/log/formatter.rb +26 -0
- data/lib/dynamoid/middleware/identity_map.rb +1 -0
- data/lib/dynamoid/persistence.rb +592 -122
- data/lib/dynamoid/persistence/import.rb +73 -0
- data/lib/dynamoid/persistence/save.rb +64 -0
- data/lib/dynamoid/persistence/update_fields.rb +63 -0
- data/lib/dynamoid/persistence/upsert.rb +60 -0
- data/lib/dynamoid/primary_key_type_mapping.rb +1 -0
- data/lib/dynamoid/railtie.rb +1 -0
- data/lib/dynamoid/tasks.rb +3 -1
- data/lib/dynamoid/tasks/database.rb +1 -0
- data/lib/dynamoid/type_casting.rb +12 -2
- data/lib/dynamoid/undumping.rb +8 -0
- data/lib/dynamoid/validations.rb +2 -0
- data/lib/dynamoid/version.rb +1 -1
- metadata +49 -71
- data/.coveralls.yml +0 -1
- data/.document +0 -5
- data/.gitignore +0 -74
- data/.rspec +0 -2
- data/.rubocop.yml +0 -71
- data/.rubocop_todo.yml +0 -55
- data/.travis.yml +0 -41
- data/Appraisals +0 -28
- data/Gemfile +0 -8
- data/Rakefile +0 -46
- data/Vagrantfile +0 -29
- data/docker-compose.yml +0 -7
- data/dynamoid.gemspec +0 -57
- data/gemfiles/rails_4_2.gemfile +0 -11
- data/gemfiles/rails_5_0.gemfile +0 -10
- data/gemfiles/rails_5_1.gemfile +0 -10
- data/gemfiles/rails_5_2.gemfile +0 -10
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'securerandom'
|
4
|
+
|
5
|
+
module Dynamoid
|
6
|
+
module Persistence
|
7
|
+
# @private
|
8
|
+
class Import
|
9
|
+
def self.call(model_class, array_of_attributes)
|
10
|
+
new(model_class, array_of_attributes).call
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(model_class, array_of_attributes)
|
14
|
+
@model_class = model_class
|
15
|
+
@array_of_attributes = array_of_attributes
|
16
|
+
end
|
17
|
+
|
18
|
+
def call
|
19
|
+
models = @array_of_attributes.map(&method(:build_model))
|
20
|
+
|
21
|
+
unless Dynamoid.config.backoff
|
22
|
+
import(models)
|
23
|
+
else
|
24
|
+
import_with_backoff(models)
|
25
|
+
end
|
26
|
+
|
27
|
+
models.each { |d| d.new_record = false }
|
28
|
+
models
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def build_model(attributes)
|
34
|
+
attrs = attributes.symbolize_keys
|
35
|
+
|
36
|
+
if @model_class.timestamps_enabled?
|
37
|
+
time_now = DateTime.now.in_time_zone(Time.zone)
|
38
|
+
attrs[:created_at] ||= time_now
|
39
|
+
attrs[:updated_at] ||= time_now
|
40
|
+
end
|
41
|
+
|
42
|
+
@model_class.build(attrs).tap do |model|
|
43
|
+
model.hash_key = SecureRandom.uuid if model.hash_key.blank?
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def import_with_backoff(models)
|
48
|
+
backoff = nil
|
49
|
+
table_name = @model_class.table_name
|
50
|
+
items = array_of_dumped_attributes(models)
|
51
|
+
|
52
|
+
Dynamoid.adapter.batch_write_item(table_name, items) do |has_unprocessed_items|
|
53
|
+
if has_unprocessed_items
|
54
|
+
backoff ||= Dynamoid.config.build_backoff
|
55
|
+
backoff.call
|
56
|
+
else
|
57
|
+
backoff = nil
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def import(models)
|
63
|
+
Dynamoid.adapter.batch_write_item(@model_class.table_name, array_of_dumped_attributes(models))
|
64
|
+
end
|
65
|
+
|
66
|
+
def array_of_dumped_attributes(models)
|
67
|
+
models.map do |m|
|
68
|
+
Dumping.dump_attributes(m.attributes, @model_class.attributes)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dynamoid
|
4
|
+
module Persistence
|
5
|
+
# @private
|
6
|
+
class Save
|
7
|
+
def self.call(model)
|
8
|
+
new(model).call
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(model)
|
12
|
+
@model = model
|
13
|
+
end
|
14
|
+
|
15
|
+
def call
|
16
|
+
@model.hash_key = SecureRandom.uuid if @model.hash_key.blank?
|
17
|
+
|
18
|
+
# Add an optimistic locking check if the lock_version column exists
|
19
|
+
if @model.class.attributes[:lock_version]
|
20
|
+
@model.lock_version = (@model.lock_version || 0) + 1
|
21
|
+
end
|
22
|
+
|
23
|
+
attributes_dumped = Dumping.dump_attributes(@model.attributes, @model.class.attributes)
|
24
|
+
Dynamoid.adapter.write(@model.class.table_name, attributes_dumped, conditions_for_write)
|
25
|
+
|
26
|
+
@model.new_record = false
|
27
|
+
true
|
28
|
+
rescue Dynamoid::Errors::ConditionalCheckFailedException => e
|
29
|
+
if @model.new_record?
|
30
|
+
raise Dynamoid::Errors::RecordNotUnique.new(e, @model)
|
31
|
+
else
|
32
|
+
raise Dynamoid::Errors::StaleObjectError.new(@model, 'persist')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
# Should be called after incrementing `lock_version` attribute
|
39
|
+
def conditions_for_write
|
40
|
+
conditions = {}
|
41
|
+
|
42
|
+
# Add an 'exists' check to prevent overwriting existing records with new ones
|
43
|
+
if @model.new_record?
|
44
|
+
conditions[:unless_exists] = [@model.class.hash_key]
|
45
|
+
if @model.range_key
|
46
|
+
conditions[:unless_exists] << @model.range_key
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Add an optimistic locking check if the lock_version column exists
|
51
|
+
if @model.class.attributes[:lock_version]
|
52
|
+
# Uses the original lock_version value from Dirty API
|
53
|
+
# in case user changed 'lock_version' manually
|
54
|
+
if @model.changes[:lock_version][0]
|
55
|
+
conditions[:if] ||= {}
|
56
|
+
conditions[:if][:lock_version] = @model.changes[:lock_version][0]
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
conditions
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dynamoid
|
4
|
+
module Persistence
|
5
|
+
# @private
|
6
|
+
class UpdateFields
|
7
|
+
def self.call(*args)
|
8
|
+
new(*args).call
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(model_class, partition_key:, sort_key:, attributes:, conditions:)
|
12
|
+
@model_class = model_class
|
13
|
+
@partition_key = partition_key
|
14
|
+
@sort_key = sort_key
|
15
|
+
@attributes = attributes.symbolize_keys
|
16
|
+
@conditions = conditions
|
17
|
+
end
|
18
|
+
|
19
|
+
def call
|
20
|
+
if Dynamoid::Config.timestamps
|
21
|
+
@attributes[:updated_at] ||= DateTime.now.in_time_zone(Time.zone)
|
22
|
+
end
|
23
|
+
|
24
|
+
raw_attributes = update_item
|
25
|
+
@model_class.new(undump_attributes(raw_attributes))
|
26
|
+
rescue Dynamoid::Errors::ConditionalCheckFailedException
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def update_item
|
32
|
+
Dynamoid.adapter.update_item(@model_class.table_name, @partition_key, options_to_update_item) do |t|
|
33
|
+
@attributes.each do |k, v|
|
34
|
+
value_casted = TypeCasting.cast_field(v, @model_class.attributes[k])
|
35
|
+
value_dumped = Dumping.dump_field(value_casted, @model_class.attributes[k])
|
36
|
+
t.set(k => value_dumped)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def undump_attributes(attributes)
|
42
|
+
Undumping.undump_attributes(attributes, @model_class.attributes)
|
43
|
+
end
|
44
|
+
|
45
|
+
def options_to_update_item
|
46
|
+
options = {}
|
47
|
+
|
48
|
+
if @model_class.range_key
|
49
|
+
value_casted = TypeCasting.cast_field(@sort_key, @model_class.attributes[@model_class.range_key])
|
50
|
+
value_dumped = Dumping.dump_field(value_casted, @model_class.attributes[@model_class.range_key])
|
51
|
+
options[:range_key] = value_dumped
|
52
|
+
end
|
53
|
+
|
54
|
+
conditions = @conditions.deep_dup
|
55
|
+
conditions[:if_exists] ||= {}
|
56
|
+
conditions[:if_exists][@model_class.hash_key] = @partition_key
|
57
|
+
options[:conditions] = conditions
|
58
|
+
|
59
|
+
options
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dynamoid
|
4
|
+
module Persistence
|
5
|
+
# @private
|
6
|
+
class Upsert
|
7
|
+
def self.call(*args)
|
8
|
+
new(*args).call
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(model_class, partition_key:, sort_key:, attributes:, conditions:)
|
12
|
+
@model_class = model_class
|
13
|
+
@partition_key = partition_key
|
14
|
+
@sort_key = sort_key
|
15
|
+
@attributes = attributes.symbolize_keys
|
16
|
+
@conditions = conditions
|
17
|
+
end
|
18
|
+
|
19
|
+
def call
|
20
|
+
if Dynamoid::Config.timestamps
|
21
|
+
@attributes[:updated_at] ||= DateTime.now.in_time_zone(Time.zone)
|
22
|
+
end
|
23
|
+
|
24
|
+
raw_attributes = update_item
|
25
|
+
@model_class.new(undump_attributes(raw_attributes))
|
26
|
+
rescue Dynamoid::Errors::ConditionalCheckFailedException
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def update_item
|
32
|
+
Dynamoid.adapter.update_item(@model_class.table_name, @partition_key, options_to_update_item) do |t|
|
33
|
+
@attributes.each do |k, v|
|
34
|
+
value_casted = TypeCasting.cast_field(v, @model_class.attributes[k])
|
35
|
+
value_dumped = Dumping.dump_field(value_casted, @model_class.attributes[k])
|
36
|
+
|
37
|
+
t.set(k => value_dumped)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def options_to_update_item
|
43
|
+
options = {}
|
44
|
+
|
45
|
+
if @model_class.range_key
|
46
|
+
value_casted = TypeCasting.cast_field(@sort_key, @model_class.attributes[@model_class.range_key])
|
47
|
+
value_dumped = Dumping.dump_field(value_casted, @model_class.attributes[@model_class.range_key])
|
48
|
+
options[:range_key] = value_dumped
|
49
|
+
end
|
50
|
+
|
51
|
+
options[:conditions] = @conditions
|
52
|
+
options
|
53
|
+
end
|
54
|
+
|
55
|
+
def undump_attributes(raw_attributes)
|
56
|
+
Undumping.undump_attributes(raw_attributes, @model_class.attributes)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/dynamoid/railtie.rb
CHANGED
data/lib/dynamoid/tasks.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Dynamoid
|
4
|
+
# @private
|
4
5
|
module TypeCasting
|
5
6
|
def self.cast_attributes(attributes, attributes_options)
|
6
7
|
{}.tap do |h|
|
@@ -35,6 +36,7 @@ module Dynamoid
|
|
35
36
|
when :raw then RawTypeCaster
|
36
37
|
when :serialized then SerializedTypeCaster
|
37
38
|
when :boolean then BooleanTypeCaster
|
39
|
+
when :binary then BinaryTypeCaster
|
38
40
|
when Class then CustomTypeCaster
|
39
41
|
end
|
40
42
|
|
@@ -215,8 +217,6 @@ module Dynamoid
|
|
215
217
|
value.to_hash
|
216
218
|
elsif value.respond_to? :to_h
|
217
219
|
value.to_h
|
218
|
-
else
|
219
|
-
nil
|
220
220
|
end
|
221
221
|
end
|
222
222
|
end
|
@@ -285,6 +285,16 @@ module Dynamoid
|
|
285
285
|
end
|
286
286
|
end
|
287
287
|
|
288
|
+
class BinaryTypeCaster < Base
|
289
|
+
def process(value)
|
290
|
+
if value.is_a? String
|
291
|
+
value.dup
|
292
|
+
else
|
293
|
+
value.to_s
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
288
298
|
class CustomTypeCaster < Base
|
289
299
|
end
|
290
300
|
end
|
data/lib/dynamoid/undumping.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Dynamoid
|
4
|
+
# @private
|
4
5
|
module Undumping
|
5
6
|
def self.undump_attributes(attributes, attributes_options)
|
6
7
|
{}.tap do |h|
|
@@ -38,6 +39,7 @@ module Dynamoid
|
|
38
39
|
when :raw then RawUndumper
|
39
40
|
when :serialized then SerializedUndumper
|
40
41
|
when :boolean then BooleanUndumper
|
42
|
+
when :binary then BinaryUndumper
|
41
43
|
when Class then CustomTypeUndumper
|
42
44
|
end
|
43
45
|
|
@@ -262,6 +264,12 @@ module Dynamoid
|
|
262
264
|
end
|
263
265
|
end
|
264
266
|
|
267
|
+
class BinaryUndumper < Base
|
268
|
+
def process(value)
|
269
|
+
Base64.strict_decode64(value)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
265
273
|
class CustomTypeUndumper < Base
|
266
274
|
def process(value)
|
267
275
|
field_class = @options[:type]
|
data/lib/dynamoid/validations.rb
CHANGED
@@ -10,6 +10,7 @@ module Dynamoid
|
|
10
10
|
|
11
11
|
# Override save to provide validation support.
|
12
12
|
#
|
13
|
+
# @private
|
13
14
|
# @since 0.2.0
|
14
15
|
def save(options = {})
|
15
16
|
options.reverse_merge!(validate: true)
|
@@ -28,6 +29,7 @@ module Dynamoid
|
|
28
29
|
|
29
30
|
# Raise an error unless this object is valid.
|
30
31
|
#
|
32
|
+
# @private
|
31
33
|
# @since 0.2.0
|
32
34
|
def save!
|
33
35
|
raise Dynamoid::Errors::DocumentNotValid, self unless valid?
|
data/lib/dynamoid/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Symonds
|
@@ -19,9 +19,9 @@ authors:
|
|
19
19
|
- Peter Boling
|
20
20
|
- Andrew Konchin
|
21
21
|
autorequire:
|
22
|
-
bindir:
|
22
|
+
bindir: bin
|
23
23
|
cert_chain: []
|
24
|
-
date:
|
24
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
25
25
|
dependencies:
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activemodel
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '1'
|
46
|
+
version: '1.0'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1'
|
53
|
+
version: '1.0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: concurrent-ruby
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -65,34 +65,20 @@ dependencies:
|
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '1.0'
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
|
-
name: null-logger
|
70
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
75
|
-
type: :runtime
|
76
|
-
prerelease: false
|
77
|
-
version_requirements: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
68
|
- !ruby/object:Gem::Dependency
|
83
69
|
name: appraisal
|
84
70
|
requirement: !ruby/object:Gem::Requirement
|
85
71
|
requirements:
|
86
|
-
- - "
|
72
|
+
- - "~>"
|
87
73
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
74
|
+
version: '2.2'
|
89
75
|
type: :development
|
90
76
|
prerelease: false
|
91
77
|
version_requirements: !ruby/object:Gem::Requirement
|
92
78
|
requirements:
|
93
|
-
- - "
|
79
|
+
- - "~>"
|
94
80
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
81
|
+
version: '2.2'
|
96
82
|
- !ruby/object:Gem::Dependency
|
97
83
|
name: bundler
|
98
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,58 +97,58 @@ dependencies:
|
|
111
97
|
name: coveralls
|
112
98
|
requirement: !ruby/object:Gem::Requirement
|
113
99
|
requirements:
|
114
|
-
- - "
|
100
|
+
- - "~>"
|
115
101
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
102
|
+
version: '0.8'
|
117
103
|
type: :development
|
118
104
|
prerelease: false
|
119
105
|
version_requirements: !ruby/object:Gem::Requirement
|
120
106
|
requirements:
|
121
|
-
- - "
|
107
|
+
- - "~>"
|
122
108
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
109
|
+
version: '0.8'
|
124
110
|
- !ruby/object:Gem::Dependency
|
125
111
|
name: pry
|
126
112
|
requirement: !ruby/object:Gem::Requirement
|
127
113
|
requirements:
|
128
|
-
- - "
|
114
|
+
- - "~>"
|
129
115
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
116
|
+
version: 0.12.0
|
131
117
|
type: :development
|
132
118
|
prerelease: false
|
133
119
|
version_requirements: !ruby/object:Gem::Requirement
|
134
120
|
requirements:
|
135
|
-
- - "
|
121
|
+
- - "~>"
|
136
122
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
123
|
+
version: 0.12.0
|
138
124
|
- !ruby/object:Gem::Dependency
|
139
125
|
name: rake
|
140
126
|
requirement: !ruby/object:Gem::Requirement
|
141
127
|
requirements:
|
142
|
-
- - "
|
128
|
+
- - "~>"
|
143
129
|
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
130
|
+
version: '13.0'
|
145
131
|
type: :development
|
146
132
|
prerelease: false
|
147
133
|
version_requirements: !ruby/object:Gem::Requirement
|
148
134
|
requirements:
|
149
|
-
- - "
|
135
|
+
- - "~>"
|
150
136
|
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
137
|
+
version: '13.0'
|
152
138
|
- !ruby/object:Gem::Dependency
|
153
139
|
name: rspec
|
154
140
|
requirement: !ruby/object:Gem::Requirement
|
155
141
|
requirements:
|
156
|
-
- - "
|
142
|
+
- - "~>"
|
157
143
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
144
|
+
version: '3.9'
|
159
145
|
type: :development
|
160
146
|
prerelease: false
|
161
147
|
version_requirements: !ruby/object:Gem::Requirement
|
162
148
|
requirements:
|
163
|
-
- - "
|
149
|
+
- - "~>"
|
164
150
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
151
|
+
version: '3.9'
|
166
152
|
- !ruby/object:Gem::Dependency
|
167
153
|
name: rubocop
|
168
154
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,65 +167,48 @@ dependencies:
|
|
181
167
|
name: wwtd
|
182
168
|
requirement: !ruby/object:Gem::Requirement
|
183
169
|
requirements:
|
184
|
-
- - "
|
170
|
+
- - "~>"
|
185
171
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
172
|
+
version: '1.4'
|
187
173
|
type: :development
|
188
174
|
prerelease: false
|
189
175
|
version_requirements: !ruby/object:Gem::Requirement
|
190
176
|
requirements:
|
191
|
-
- - "
|
177
|
+
- - "~>"
|
192
178
|
- !ruby/object:Gem::Version
|
193
|
-
version: '
|
179
|
+
version: '1.4'
|
194
180
|
- !ruby/object:Gem::Dependency
|
195
181
|
name: yard
|
196
182
|
requirement: !ruby/object:Gem::Requirement
|
197
183
|
requirements:
|
198
|
-
- - "
|
184
|
+
- - "~>"
|
199
185
|
- !ruby/object:Gem::Version
|
200
|
-
version: '0'
|
186
|
+
version: '0.9'
|
201
187
|
type: :development
|
202
188
|
prerelease: false
|
203
189
|
version_requirements: !ruby/object:Gem::Requirement
|
204
190
|
requirements:
|
205
|
-
- - "
|
191
|
+
- - "~>"
|
206
192
|
- !ruby/object:Gem::Version
|
207
|
-
version: '0'
|
193
|
+
version: '0.9'
|
208
194
|
description: Dynamoid is an ORM for Amazon's DynamoDB that supports offline development,
|
209
195
|
associations, querying, and everything else you'd expect from an ActiveRecord-style
|
210
196
|
replacement.
|
211
197
|
email:
|
212
198
|
- peter.boling@gmail.com
|
213
199
|
- brian@stellaservice.com
|
200
|
+
- andry.konchin@gmail.com
|
214
201
|
executables: []
|
215
202
|
extensions: []
|
216
|
-
extra_rdoc_files:
|
217
|
-
- LICENSE.txt
|
218
|
-
- README.md
|
203
|
+
extra_rdoc_files: []
|
219
204
|
files:
|
220
|
-
- ".coveralls.yml"
|
221
|
-
- ".document"
|
222
|
-
- ".gitignore"
|
223
|
-
- ".rspec"
|
224
|
-
- ".rubocop.yml"
|
225
|
-
- ".rubocop_todo.yml"
|
226
|
-
- ".travis.yml"
|
227
|
-
- Appraisals
|
228
205
|
- CHANGELOG.md
|
229
|
-
- Gemfile
|
230
206
|
- LICENSE.txt
|
231
207
|
- README.md
|
232
|
-
- Rakefile
|
233
|
-
- Vagrantfile
|
234
|
-
- docker-compose.yml
|
235
|
-
- dynamoid.gemspec
|
236
|
-
- gemfiles/rails_4_2.gemfile
|
237
|
-
- gemfiles/rails_5_0.gemfile
|
238
|
-
- gemfiles/rails_5_1.gemfile
|
239
|
-
- gemfiles/rails_5_2.gemfile
|
240
208
|
- lib/dynamoid.rb
|
241
209
|
- lib/dynamoid/adapter.rb
|
242
210
|
- lib/dynamoid/adapter_plugin/aws_sdk_v3.rb
|
211
|
+
- lib/dynamoid/adapter_plugin/aws_sdk_v3/batch_get_item.rb
|
243
212
|
- lib/dynamoid/adapter_plugin/aws_sdk_v3/create_table.rb
|
244
213
|
- lib/dynamoid/adapter_plugin/aws_sdk_v3/item_updater.rb
|
245
214
|
- lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/backoff.rb
|
@@ -278,8 +247,14 @@ files:
|
|
278
247
|
- lib/dynamoid/finders.rb
|
279
248
|
- lib/dynamoid/identity_map.rb
|
280
249
|
- lib/dynamoid/indexes.rb
|
250
|
+
- lib/dynamoid/loadable.rb
|
251
|
+
- lib/dynamoid/log/formatter.rb
|
281
252
|
- lib/dynamoid/middleware/identity_map.rb
|
282
253
|
- lib/dynamoid/persistence.rb
|
254
|
+
- lib/dynamoid/persistence/import.rb
|
255
|
+
- lib/dynamoid/persistence/save.rb
|
256
|
+
- lib/dynamoid/persistence/update_fields.rb
|
257
|
+
- lib/dynamoid/persistence/upsert.rb
|
283
258
|
- lib/dynamoid/primary_key_type_mapping.rb
|
284
259
|
- lib/dynamoid/railtie.rb
|
285
260
|
- lib/dynamoid/tasks.rb
|
@@ -289,10 +264,14 @@ files:
|
|
289
264
|
- lib/dynamoid/undumping.rb
|
290
265
|
- lib/dynamoid/validations.rb
|
291
266
|
- lib/dynamoid/version.rb
|
292
|
-
homepage: http://github.com/Dynamoid/
|
267
|
+
homepage: http://github.com/Dynamoid/dynamoid
|
293
268
|
licenses:
|
294
269
|
- MIT
|
295
|
-
metadata:
|
270
|
+
metadata:
|
271
|
+
bug_tracker_uri: https://github.com/Dynamoid/dynamoid/issues
|
272
|
+
changelog_uri: https://github.com/Dynamoid/dynamoid/tree/v3.6.0/CHANGELOG.md
|
273
|
+
source_code_uri: https://github.com/Dynamoid/dynamoid/tree/v3.6.0
|
274
|
+
documentation_uri: https://rubydoc.info/gems/dynamoid/3.6.0
|
296
275
|
post_install_message:
|
297
276
|
rdoc_options: []
|
298
277
|
require_paths:
|
@@ -308,8 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
308
287
|
- !ruby/object:Gem::Version
|
309
288
|
version: '0'
|
310
289
|
requirements: []
|
311
|
-
|
312
|
-
rubygems_version: 2.7.6
|
290
|
+
rubygems_version: 3.1.2
|
313
291
|
signing_key:
|
314
292
|
specification_version: 4
|
315
293
|
summary: Dynamoid is an ORM for Amazon's DynamoDB
|