g5_integrations_updatable 0.0.2 → 0.0.3

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: 2c6e7f2abdc9cf16a2fe8b51f67dc9f66402a32e
4
- data.tar.gz: 90acbe7e368b94e9a84aaa21df6e80a62457b645
3
+ metadata.gz: c60c0d5d985a175d9ada38975486d12bc7175c98
4
+ data.tar.gz: b258da0a18fbf2de172371be432284544e3a4d10
5
5
  SHA512:
6
- metadata.gz: 92681c53e354266b767d5bb0c17d952b72bc49a3db74e0208b0771cf07e7ef2d5db90fbd4a2e6162062e9a9a277fcf2b4a6e7f2d49f7b99b011a32eeaf0e64fc
7
- data.tar.gz: b89dd8caeb800dc141f0ad6f89d07468397444dadadb7c3e760ed1770bbdd9a7e1ad9a5c566a1965f4ed8938339bca686b92390ea9e1e731e7ede2d26286d41f
6
+ metadata.gz: b578302581a8fc1b4bce8181342ca932578e835266fc1b0a82dc394b4aefe36002062cc7756fd0a9d2bdb280a82f453f101a4e6881410d33ca3ea2c1f4372b3e
7
+ data.tar.gz: e8e8661347001845b3e3997ccf7302e5870252d80f9c8d3edd0da3e2a2aa3a311b9213001eb5625eff7df52fecb9f3719c3a9d41ffec1f51bb8ec111c3988606
@@ -1,12 +1,7 @@
1
1
  module G5IntegrationsUpdatable
2
2
  class FeedFetcher
3
- def initialize(uri, options={})
3
+ def initialize(uri)
4
4
  @uri = uri
5
- @options = options
6
- end
7
-
8
- def root_key
9
- @options.fetch(:root_key, 'location_settings')
10
5
  end
11
6
 
12
7
  def process
@@ -16,7 +11,7 @@ module G5IntegrationsUpdatable
16
11
 
17
12
  case response.code.to_i
18
13
  when 200
19
- JSON.parse(response.body)[root_key]
14
+ JSON.parse(response.body).values.first
20
15
  when 404
21
16
  raise G5IntegrationsUpdatable::RecordNotFoundException.new("Couldn't find record at URL '#{@uri}'")
22
17
  else
@@ -8,7 +8,7 @@ module G5IntegrationsUpdatable
8
8
 
9
9
  class << self
10
10
  def load_all_settings(all_uri)
11
- result_hash = G5IntegrationsUpdatable::FeedFetcher.new(all_uri, root_key: 'entries').process
11
+ result_hash = G5IntegrationsUpdatable::FeedFetcher.new(all_uri).process
12
12
  find_or_create_all result_hash
13
13
  end
14
14
 
@@ -1,3 +1,3 @@
1
1
  module G5IntegrationsUpdatable
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g5_integrations_updatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perry Hertler