sc4ry 0.1.3 → 0.1.4

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
2
  SHA256:
3
- metadata.gz: 9cc6197c11f5b2946c2a7d7ac2057de82866228b4628f5b2d3c0613a3c821ca2
4
- data.tar.gz: 306af4cfc3217b7ccc174b9f93407a995faad9fd691b83b0c6848a620313647f
3
+ metadata.gz: 63f7aa01b54f949abb2f4dd1443fd8b42a16346673200e9394d091dafc5efb06
4
+ data.tar.gz: fbed3c85b892cf1997100ed7753a48f51bcfff106285071083e4f6fc6845b7c3
5
5
  SHA512:
6
- metadata.gz: d501193d93a2c0fca6db0b0d7429ff00510253f741347a03a6c6b26b872acb24cb14490ea8a9a61e8b768fce541fbda8c56555e2ba940a1bebe225c4b9065c9b
7
- data.tar.gz: e7416163124dee124d7573f37cd2ef51f7d8152105727d057256b5b6738435ab28949c2ebfd5ff5a0d5604b20b40dad32b1ff5f755e3b0b0ab26409b605c710a
6
+ metadata.gz: 2435573c1f5e0d1476548f2d581f4a00029d6c8d67a4824402e8de3b5b3528cc32d307149e61ad1cd751fb3561a43cd75c6ae7791888c1c8048258ce2c9fcfd8
7
+ data.tar.gz: 9bd96086e6cc1260c9e1e43df45b4743d2d8c8d4df5d4ae23eb8af32822960304aa38d363626ca816895861eed79839ca0f3311995ad301904fc941aef8fc6e0
@@ -89,7 +89,7 @@ module Sc4ry
89
89
  data[:status][:general] = status if worst_status.include? status
90
90
  end
91
91
  if save != data[:status][:general] then
92
- raise Sc4ry::Exceptions:CircuitBreaked if data[:status][:general] == :open and data[:raise_on_opening]
92
+ raise Sc4ry::Exceptions::CircuitBreaked if data[:status][:general] == :open and data[:raise_on_opening]
93
93
  Sc4ry::Helpers.notify circuit: options[:circuit], config: data
94
94
  end
95
95
  @@circuits_store.put key: options[:circuit], value: data
@@ -1,6 +1,11 @@
1
1
  module Sc4ry
2
2
  module Exceptions
3
- class CircuitBreaked < StandardError; end
3
+ class CircuitBreaked < StandardError
4
+ def initialize(msg="Circuit just opened")
5
+ super(msg)
6
+ end
7
+
8
+ end
4
9
 
5
10
  end
6
11
  end
@@ -44,9 +44,9 @@ module Sc4ry
44
44
  @failure = true
45
45
  else
46
46
  if @circuit[:forward_unknown_exceptions] then
47
- raise @last_exception.class, "Sc4ry forward: #{@last_exception.message}"
47
+ raise e.class, "Sc4ry forward: #{e.message}"
48
48
  else
49
- Sc4ry::Loggers.warning "skipped : #{@last_exception}"
49
+ Sc4ry::Helpers.log level: :debug, message: "skipped : #{@last_exception}"
50
50
  end
51
51
 
52
52
  end
data/lib/sc4ry/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sc4ry
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sc4ry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain GEORGES