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 +4 -4
- data/app/models/global_alerts/alert.rb +3 -3
- data/lib/global_alerts/engine.rb +1 -1
- data/lib/global_alerts/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80c6008fc3858caacc9c80d6868f6312d9428e5a1a017f1b031786d6a0b6c2dc
|
4
|
+
data.tar.gz: 01030bb0d1f820819ce83a591da2897731b73c3c35868b8405b43e416fdbc093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
15
|
+
|
16
|
+
data.dig('alerts')&.each do |yaml|
|
17
17
|
yield new(yaml)
|
18
18
|
end
|
19
19
|
rescue => e
|
data/lib/global_alerts/engine.rb
CHANGED
@@ -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.
|
10
|
+
config.application_name ||= app.class.parent_name.underscore
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|