g5_integrations_updatable 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47def5f9c16fa817e5fe58bc04c5be9c5c22fa4b
|
4
|
+
data.tar.gz: 7cd3163b7a6cb8233db851493da5a776655216bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8433b801aff53f798c4edc9413224604c9773b3189279a4aca77f09dc8554ab69487bfb8c1a37148d16d2c73b527d0344de782951010a937c93e2c258f9018a
|
7
|
+
data.tar.gz: 32185adb93d6be3117e0120329e2462bbb489161e545f72a20100bd55fd9cf1e11d7a1c434e6b9556800c68f65d00ceeb152e30f73980da93d50ec4dac1becbe
|
@@ -9,7 +9,15 @@ module G5IntegrationsUpdatable
|
|
9
9
|
class << self
|
10
10
|
def load_all_settings(all_uri)
|
11
11
|
result_hash = G5IntegrationsUpdatable::FeedFetcher.new(all_uri).process
|
12
|
-
|
12
|
+
G5IntegrationsUpdatable::LocationSetting.transaction do
|
13
|
+
destroy_existing result_hash
|
14
|
+
find_or_create_all result_hash
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def destroy_existing(feed_array)
|
19
|
+
existing = G5IntegrationsUpdatable::LocationSetting.where(client_urn: feed_array.collect { |feed| feed['client_urn'] })
|
20
|
+
existing.destroy_all
|
13
21
|
end
|
14
22
|
|
15
23
|
def find_or_create_all(feed_array)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5_integrations_updatable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perry Hertler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|