tusur_cdn 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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: fe7d4aac5370bc10e0fd1417d68649c7c9bed96bbec8a9ad94f166d82304089b
4
+ data.tar.gz: 902e71abfb3aa479a25fb89641ce8060d031edb66e2dd44bf998cc18dc508611
5
5
  SHA512:
6
- metadata.gz: 9a45b51c75ba4e84f69d744dff7fccb1eede4634d0c634fbfa65501804a6ad12b6148c8625304c5b91963ed153db85d9ae2a16b44750091d123192ffdc741786
7
- data.tar.gz: 2a9d303c472e6227016b01296a50cf9ae9149c717793c20f4c1c04b3669926acdf09a5e5dc9e502b801c16ada8c5c48ed05988650f091302e83f1099a166ccb2
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
@@ -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
- 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
- result
29
27
  end
28
+ result
30
29
  end
31
30
 
32
31
  def consume_css
@@ -1,3 +1,3 @@
1
1
  module TusurCdn
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
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.0
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