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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a5ec314ec8ef3f2cad4b5344c47c1578eeed754a
4
- data.tar.gz: 096a8fba4667a7d63d47c5277c0d254ee7fc70ea
2
+ SHA256:
3
+ metadata.gz: 5d0cba53ecfd250dc16353e459aa4f6e008b0ddcba9f48e7573e1c5cc4cacbc7
4
+ data.tar.gz: cd4238392aff22fe0a0498d488dd07a91bc068a31080b23aeb11436ab16be91c
5
5
  SHA512:
6
- metadata.gz: 9a45b51c75ba4e84f69d744dff7fccb1eede4634d0c634fbfa65501804a6ad12b6148c8625304c5b91963ed153db85d9ae2a16b44750091d123192ffdc741786
7
- data.tar.gz: 2a9d303c472e6227016b01296a50cf9ae9149c717793c20f4c1c04b3669926acdf09a5e5dc9e502b801c16ada8c5c48ed05988650f091302e83f1099a166ccb2
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
@@ -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
- request = JSON.parse RestClient.post("#{Settings['profile.url']}/cdn/update", {key: :header})
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
@@ -1,3 +1,3 @@
1
1
  module TusurCdn
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.1"
3
3
  end
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.1.1
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: 2016-07-04 00:00:00.000000000 Z
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
- rubyforge_project:
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