tusur_cdn 0.1.0 → 0.2.0

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: 91f2b45c6ec6bedc34737366040c9603a2b703d0
4
- data.tar.gz: 6126b12a45dc2991f02b9a184c183a81c2f7dd0f
2
+ SHA256:
3
+ metadata.gz: fe7d4aac5370bc10e0fd1417d68649c7c9bed96bbec8a9ad94f166d82304089b
4
+ data.tar.gz: 902e71abfb3aa479a25fb89641ce8060d031edb66e2dd44bf998cc18dc508611
5
5
  SHA512:
6
- metadata.gz: 842e6585c38f39ba95a6b3e76b1d09fe088242ff3757f045e745455dd7742d941697cdec6afa04b6831475115efbc23a5a90e7405099a07a3405a9a33a1f93a5
7
- data.tar.gz: 6341723551bb40460989c12a62563908980672156af953d445798f8a5f3fc3f8cef3665bd285cd2c88c237da035e9ca68354745c1f54a14de71b5c46a0a94bbe
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.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/tusur_cdn.gemspec CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.11"
22
+ spec.add_development_dependency "bundler"
23
23
  spec.add_dependency "activesupport"
24
24
  spec.add_dependency "configliere"
25
25
  spec.add_dependency "redis"
26
26
  spec.add_dependency "hashie"
27
- spec.add_dependency "rest_client"
27
+ spec.add_dependency "rest-client"
28
28
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tusur_cdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.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: 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
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.11'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.11'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rest_client
84
+ name: rest-client
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -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