tusur_cdn 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/tusur_cdn/action_view/helpers.rb +9 -0
- data/lib/tusur_cdn/consumer.rb +2 -3
- data/lib/tusur_cdn/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fe7d4aac5370bc10e0fd1417d68649c7c9bed96bbec8a9ad94f166d82304089b
|
4
|
+
data.tar.gz: 902e71abfb3aa479a25fb89641ce8060d031edb66e2dd44bf998cc18dc508611
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a5cda29903c109daf86408f113e316f3f1dd952f013406b2b5e1b77424ac6d8d1d30ef6a766b59da3d80c5f0b7a6ac9760c2cb82d15960464860acc85ebadff
|
7
|
+
data.tar.gz: dbdbc99a4dcd5f89521f0cb029e342f8770f8c2c7f413ef95ef19c15205a05e53a4263b9a181064b5b0c7fcfa7a2a073d6f59b560e0d4f757414731e21da03de
|
@@ -6,6 +6,15 @@ module TusurCdn::ActionView
|
|
6
6
|
data = TusurCdn::Consumer.new(key: key).get_data
|
7
7
|
result = ERB.new(data.template).result(binding)
|
8
8
|
result.html_safe
|
9
|
+
rescue => exception
|
10
|
+
Airbrake.notify(
|
11
|
+
"Отвалился модуль #{key} на #{Rails.application.class.parent_name}",
|
12
|
+
{
|
13
|
+
redis_data: data,
|
14
|
+
exception: exception
|
15
|
+
}
|
16
|
+
)
|
17
|
+
return nil
|
9
18
|
end
|
10
19
|
|
11
20
|
ActiveSupport.on_load :action_view do
|
data/lib/tusur_cdn/consumer.rb
CHANGED
@@ -21,12 +21,11 @@ module TusurCdn
|
|
21
21
|
METHOD_PREFIX.each do |method_prefix|
|
22
22
|
result = send "consume_#{method_prefix}"
|
23
23
|
unless result
|
24
|
-
|
25
|
-
raise 'Profile malfunction!' if request['result'] != 'ok'
|
24
|
+
JSON.parse RestClient.post("#{Settings['profile.url']}/cdn/update", {key: key})
|
26
25
|
result = send "consume_#{method_prefix}"
|
27
26
|
end
|
28
|
-
result
|
29
27
|
end
|
28
|
+
result
|
30
29
|
end
|
31
30
|
|
32
31
|
def consume_css
|
data/lib/tusur_cdn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tusur_cdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -133,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
|
-
|
137
|
-
rubygems_version: 2.2.5
|
136
|
+
rubygems_version: 3.1.2
|
138
137
|
signing_key:
|
139
138
|
specification_version: 4
|
140
139
|
summary: TUSUR CDN client
|