dynamoid 2.1.0 → 2.2.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/.travis.yml +5 -0
- data/Appraisals +4 -0
- data/CHANGELOG.md +17 -3
- data/Vagrantfile +1 -1
- data/gemfiles/rails_4_0.gemfile +1 -0
- data/gemfiles/rails_4_1.gemfile +1 -0
- data/gemfiles/rails_4_2.gemfile +1 -0
- data/gemfiles/rails_5_0.gemfile +1 -0
- data/gemfiles/rails_5_1.gemfile +1 -0
- data/gemfiles/rails_5_2.gemfile +8 -0
- data/lib/dynamoid/dirty.rb +21 -2
- data/lib/dynamoid/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 542fc1c696af080fcd65a7428ec553584d3fe48d
|
4
|
+
data.tar.gz: 93cca063db742ea205238443dcf98ab8e03ba627
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 438f005ef464d1f90f8e6ba57b3c1b2969e183828e2ad35dcb9fd5db00dea9bc394684ad1787c4c61c6ad23f8a879a933b8a18be3254fc730bc74c1d39b574e9
|
7
|
+
data.tar.gz: 905e8db4276d80e280fd95fb56902da845a0aa0eb496c4251d67deff3200436a83fada31f23af341fe490e4576956c9db7e5f9137d58ac53f68e7505addae7d1
|
data/.travis.yml
CHANGED
@@ -15,16 +15,21 @@ gemfile:
|
|
15
15
|
- gemfiles/rails_4_2.gemfile
|
16
16
|
- gemfiles/rails_5_0.gemfile
|
17
17
|
- gemfiles/rails_5_1.gemfile
|
18
|
+
- gemfiles/rails_5_2.gemfile
|
18
19
|
matrix:
|
19
20
|
exclude:
|
20
21
|
- rvm: ruby-2.0.0-p648
|
21
22
|
gemfile: gemfiles/rails_5_0.gemfile
|
22
23
|
- rvm: ruby-2.0.0-p648
|
23
24
|
gemfile: gemfiles/rails_5_1.gemfile
|
25
|
+
- rvm: ruby-2.0.0-p648
|
26
|
+
gemfile: gemfiles/rails_5_2.gemfile
|
24
27
|
- rvm: ruby-2.1.10
|
25
28
|
gemfile: gemfiles/rails_5_0.gemfile
|
26
29
|
- rvm: ruby-2.1.10
|
27
30
|
gemfile: gemfiles/rails_5_1.gemfile
|
31
|
+
- rvm: ruby-2.1.10
|
32
|
+
gemfile: gemfiles/rails_5_2.gemfile
|
28
33
|
- rvm: ruby-2.4.1
|
29
34
|
gemfile: gemfiles/rails_4_0.gemfile
|
30
35
|
- rvm: ruby-2.4.1
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,20 @@
|
|
12
12
|
|
13
13
|
* N/A
|
14
14
|
|
15
|
+
# 2.2.0
|
16
|
+
|
17
|
+
## Breaking
|
18
|
+
|
19
|
+
* N/A
|
20
|
+
|
21
|
+
## Improvements
|
22
|
+
|
23
|
+
* Feature: [#256](https://github.com/Dynamoid/Dynamoid/pull/256) Support Rails 5.2 (@andrykonchin)
|
24
|
+
|
25
|
+
## Fixes
|
26
|
+
|
27
|
+
* Bug: [#255](https://github.com/Dynamoid/Dynamoid/pull/255) Fix Vagrant RVM configuration and upgrade to Ruby 2.4.1 (@richardhsu)
|
28
|
+
|
15
29
|
# 2.1.0
|
16
30
|
|
17
31
|
## Breaking
|
@@ -51,7 +65,7 @@
|
|
51
65
|
Breaking changes in this release generally bring Dynamoid behavior closer to the Rails-way.
|
52
66
|
|
53
67
|
* Change: [#186](https://github.com/Dynamoid/Dynamoid/pull/186) Consistent behavior for `Model.where({}).all` (@andrykonchin)
|
54
|
-
* <= 1.3.x behaviour -
|
68
|
+
* <= 1.3.x behaviour -
|
55
69
|
* load lazily if user specified batch size
|
56
70
|
* load all collection into memory otherwise
|
57
71
|
* New behaviour -
|
@@ -85,7 +99,7 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
|
|
85
99
|
|
86
100
|
## Fixes
|
87
101
|
|
88
|
-
* Bug: [#191](https://github.com/Dynamoid/Dynamoid/pull/191), [#192](https://github.com/Dynamoid/Dynamoid/pull/192) Support lambdas as fix for value types were not able to be used as default values (@andrykonchin)(@richardhsu)
|
102
|
+
* Bug: [#191](https://github.com/Dynamoid/Dynamoid/pull/191), [#192](https://github.com/Dynamoid/Dynamoid/pull/192) Support lambdas as fix for value types were not able to be used as default values (@andrykonchin)(@richardhsu)
|
89
103
|
* Bug: [#202](https://github.com/Dynamoid/Dynamoid/pull/202) Fix several issues with associations (@andrykonchin)
|
90
104
|
* setting `nil` value raises an exception
|
91
105
|
* document doesn't keep assigned model and loads it from the storage
|
@@ -95,7 +109,7 @@ Breaking changes in this release generally bring Dynamoid behavior closer to the
|
|
95
109
|
* Fixed `Chain#key_present?`
|
96
110
|
* Bug: [#205](https://github.com/Dynamoid/Dynamoid/pull/205) Fixed `delete_all` (@andrykonchin)
|
97
111
|
* Fixed exception when makes scan and sort key is declared in model
|
98
|
-
* Fixed exception when makes scan and any condition is specified in where clause (like Document.where().delete_all)
|
112
|
+
* Fixed exception when makes scan and any condition is specified in where clause (like Document.where().delete_all)
|
99
113
|
* Fixed exception when makes query and sort key isn't declared in model
|
100
114
|
* Bug: [#207](https://github.com/Dynamoid/Dynamoid/pull/207) Fixed `#delete` method for case `adapter.delete(table_name, [1, 2, 3], range_key: 1)` (@andrykonchin)
|
101
115
|
|
data/Vagrantfile
CHANGED
data/gemfiles/rails_4_0.gemfile
CHANGED
data/gemfiles/rails_4_1.gemfile
CHANGED
data/gemfiles/rails_4_2.gemfile
CHANGED
data/gemfiles/rails_5_0.gemfile
CHANGED
data/gemfiles/rails_5_1.gemfile
CHANGED
data/lib/dynamoid/dirty.rb
CHANGED
@@ -5,7 +5,7 @@ module Dynamoid
|
|
5
5
|
|
6
6
|
module ClassMethods
|
7
7
|
def from_database(*)
|
8
|
-
super.tap { |d| d.
|
8
|
+
super.tap { |d| d.send(:clear_changes_information) }
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
@@ -28,7 +28,7 @@ module Dynamoid
|
|
28
28
|
(block_given? ? yield : true).tap do |result|
|
29
29
|
unless result == false # failed validation; nil is OK.
|
30
30
|
@previously_changed = previous
|
31
|
-
|
31
|
+
clear_changes_information
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -43,5 +43,24 @@ module Dynamoid
|
|
43
43
|
def attribute_method?(attr)
|
44
44
|
super || self.class.attributes.has_key?(attr.to_sym)
|
45
45
|
end
|
46
|
+
|
47
|
+
if ActiveModel::VERSION::STRING >= '5.2.0'
|
48
|
+
# The ActiveModel::Dirty API was changed
|
49
|
+
# https://github.com/rails/rails/commit/c3675f50d2e59b7fc173d7b332860c4b1a24a726#diff-aaddd42c7feb0834b1b5c66af69814d3
|
50
|
+
# So we just try to disable new functionality
|
51
|
+
|
52
|
+
def mutations_from_database
|
53
|
+
@mutations_from_database ||= ActiveModel::NullMutationTracker.instance
|
54
|
+
end
|
55
|
+
|
56
|
+
def forget_attribute_assignments
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
if ActiveModel::VERSION::STRING < '4.2.0'
|
61
|
+
def clear_changes_information
|
62
|
+
changed_attributes.clear
|
63
|
+
end
|
64
|
+
end
|
46
65
|
end
|
47
66
|
end
|
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: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Symonds
|
@@ -21,7 +21,7 @@ authors:
|
|
21
21
|
autorequire:
|
22
22
|
bindir: exe
|
23
23
|
cert_chain: []
|
24
|
-
date: 2018-
|
24
|
+
date: 2018-05-02 00:00:00.000000000 Z
|
25
25
|
dependencies:
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activemodel
|
@@ -222,6 +222,7 @@ files:
|
|
222
222
|
- gemfiles/rails_4_2.gemfile
|
223
223
|
- gemfiles/rails_5_0.gemfile
|
224
224
|
- gemfiles/rails_5_1.gemfile
|
225
|
+
- gemfiles/rails_5_2.gemfile
|
225
226
|
- lib/dynamoid.rb
|
226
227
|
- lib/dynamoid/adapter.rb
|
227
228
|
- lib/dynamoid/adapter_plugin/aws_sdk_v2.rb
|