tusur_cdn 0.1.1 → 0.2.1
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 +1 -2
- 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: 5d0cba53ecfd250dc16353e459aa4f6e008b0ddcba9f48e7573e1c5cc4cacbc7
|
4
|
+
data.tar.gz: cd4238392aff22fe0a0498d488dd07a91bc068a31080b23aeb11436ab16be91c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e02648a4e030053c74bcf2f4f79edf4608549c92d26ef183892edc2d56e5dc7fe769879198c0cdf8bede3a07e8690330a7b0d3039b1d7c6f717028ba80757b
|
7
|
+
data.tar.gz: dbb173e99694b01eb882eb90267d3e58df862f7bc5141fab8c7584419c7f2b4c117e96ab91f5f6f163e166b3ece4c2132ef3f86ba9f540a4944e7eebd53c484f
|
@@ -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,8 +21,7 @@ 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
27
|
result
|
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.1
|
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
|