global_alerts 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: 13ab29a8c779ca9887a3a7d5b6d2ad724682632abde1e4a6502c1aacddedd6d2
4
- data.tar.gz: acfb18ef1442f1ee6d4501cd5413f81fef1d414b3b0488446606d2ac5494c927
3
+ metadata.gz: 80c6008fc3858caacc9c80d6868f6312d9428e5a1a017f1b031786d6a0b6c2dc
4
+ data.tar.gz: 01030bb0d1f820819ce83a591da2897731b73c3c35868b8405b43e416fdbc093
5
5
  SHA512:
6
- metadata.gz: e6e79f72484f60eb1cd7204c9c88d446eb0045906f65cfbd73cca0cb70d5421bff1001b16c3e6aae4905843bbeb45d15ed6020375a1459932cafd594783ac0e6
7
- data.tar.gz: ce1b3c97ed7fd4e5009e338b2b54fa23d51ad50b99436e96a978493efc0d638946d03b798e40b85578c2c11e270f5750b4b7bc8267df8c37070b78a367476a44
6
+ metadata.gz: 8952e26ab3864ad79cd94ce744477ff64aa725edcd4096ee03c7304b52c763f134c8ae1521112131ecfda1286f577a2d3043b235e6724c9353661ca62957fdb5
7
+ data.tar.gz: 919a4c120b77c8379fb390478bd083cf3456f22199a050feee0fcd510127ab9eddba106503ec32796a34ba6c08c4c4478fb7170d52b8da77bc1127abc9cfd4fb
@@ -8,12 +8,12 @@ module GlobalAlerts
8
8
  return to_enum(:all) unless block_given?
9
9
 
10
10
  body = cache.fetch(CACHE_KEY) do
11
- # HTTP.follow.get(GlobalAlerts::Engine.config.url).body.to_s
12
- File.read(GlobalAlerts::Engine.root + 'sul.yaml')
11
+ HTTP.follow.get(GlobalAlerts::Engine.config.url).body.to_s
13
12
  end
14
13
 
15
14
  data = YAML.safe_load(body)
16
- data&.each do |yaml|
15
+
16
+ data.dig('alerts')&.each do |yaml|
17
17
  yield new(yaml)
18
18
  end
19
19
  rescue => e
@@ -7,7 +7,7 @@ module GlobalAlerts
7
7
  config.url = 'https://github.com/sul-dlss/global-alerts/raw/main/sul.json'
8
8
 
9
9
  initializer('global_alerts_default') do |app|
10
- config.application_name ||= app.class.module_parent_name.underscore
10
+ config.application_name ||= app.class.parent_name.underscore
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module GlobalAlerts
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global_alerts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer