snapshotable 0.1.3 → 0.1.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97736b89ca3b9265b16370886688ddbf7b038abe
|
4
|
+
data.tar.gz: b4972e8982f4106a56a794ee48d585d734a01bad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d42ac01b258823140ac633a1b7f066dc615a1621f78507e2a5239c88c73de70802f58d3b452f6c362076bf762dc34f17d9e96c7ea95f6a47ccd59132b80a50
|
7
|
+
data.tar.gz: d449313742bd3a8687f0ddb8b8878f76ecbcc352a9b462dbf716a4b784885306ef9d0869e6d354d1d7c7d2e7f7c69417c3b1df261e08f869abe8db7db1860679
|
@@ -25,7 +25,7 @@ module Snapshotable
|
|
25
25
|
def self.next_migration_number(dirname) #:nodoc:
|
26
26
|
next_migration_number = current_migration_number(dirname) + 1
|
27
27
|
if ActiveRecord::Base.timestamped_migrations
|
28
|
-
[Time.now.utc.strftime('%Y%m%d%H%M%S'), format('%.14d', next_migration_number)].max
|
28
|
+
[Time.zone.now.utc.strftime('%Y%m%d%H%M%S'), format('%.14d', next_migration_number)].max
|
29
29
|
else
|
30
30
|
format('%.3d', next_migration_number)
|
31
31
|
end
|
@@ -44,7 +44,7 @@ module Snapshotable
|
|
44
44
|
association = record.send(association_name)
|
45
45
|
|
46
46
|
snapshot["#{association_name}_object"] = if association.class.name == 'ActiveRecord::Associations::CollectionProxy'
|
47
|
-
association.map { |model| extract_attributes(attributes, model) }
|
47
|
+
association.order(:id).map { |model| extract_attributes(attributes, model) }
|
48
48
|
else
|
49
49
|
extract_attributes(attributes, association)
|
50
50
|
end
|
data/lib/snapshotable/model.rb
CHANGED
data/lib/snapshotable/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapshotable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Batista Marinho
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-08-
|
12
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|