g5_updatable 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/g5_updatable/locations_updater.rb +9 -8
- data/lib/g5_updatable/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/log/test.log +2627 -5723
- data/spec/lib/g5_updatable/locations_updater_spec.rb +11 -0
- metadata +3 -5
- data/spec/dummy/log/development.log +0 -82
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed3729a2c43c76cf6b8f7a3d524d3dc3f36116bb
|
4
|
+
data.tar.gz: be1fccc6ff748ebf1e5fd0bc10274d70eb4bcff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0232b66bef9d00db3a4aa8a7b81d3377d9bdcaf36023f90306066f4ac99bff710ce9aa14bd4bbc60d381ce5bc0deea72cc97506360c8ff2f722c22ac84a5da1
|
7
|
+
data.tar.gz: 79be6ff822de0809abdffd5e0f926da033656f0767fbdbf22d2aed94e6eb8be0f96971df6d6e5b51d2892a3a420e46ee6380a322f65fad5486f6c11f632a0ba8
|
@@ -20,14 +20,15 @@ class G5Updatable::LocationsUpdater
|
|
20
20
|
@g5_locations.each do |g5_location|
|
21
21
|
attributes = g5_location.location_hash.dup
|
22
22
|
location = G5Updatable::Location.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
23
|
+
find_or_initialize_by(uid: attributes[:uid])
|
24
|
+
|
25
|
+
location.update_attributes!(
|
26
|
+
urn: attributes[:urn],
|
27
|
+
name: attributes[:name],
|
28
|
+
client_uid: attributes[:client_uid],
|
29
|
+
properties: attributes,
|
30
|
+
updated_at: DateTime.now
|
31
|
+
)
|
31
32
|
self.class.on_update_callbacks.each { |cb| cb.call(location) }
|
32
33
|
end
|
33
34
|
destroy_orphaned_locations!
|
data/lib/g5_updatable/version.rb
CHANGED