sc4ry 0.1.4 → 0.1.5

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
2
  SHA256:
3
- metadata.gz: 63f7aa01b54f949abb2f4dd1443fd8b42a16346673200e9394d091dafc5efb06
4
- data.tar.gz: fbed3c85b892cf1997100ed7753a48f51bcfff106285071083e4f6fc6845b7c3
3
+ metadata.gz: f9a3fb1c8109f854824988f024f067a17a4911af9a50a6fe2b3810b48ee04a3e
4
+ data.tar.gz: b76605ccc355dcba888eae092ed01fd554a1d74de80bbc576e5942ff1f8e6d41
5
5
  SHA512:
6
- metadata.gz: 2435573c1f5e0d1476548f2d581f4a00029d6c8d67a4824402e8de3b5b3528cc32d307149e61ad1cd751fb3561a43cd75c6ae7791888c1c8048258ce2c9fcfd8
7
- data.tar.gz: 9bd96086e6cc1260c9e1e43df45b4743d2d8c8d4df5d4ae23eb8af32822960304aa38d363626ca816895861eed79839ca0f3311995ad301904fc941aef8fc6e0
6
+ metadata.gz: 466cbe185262a5b854b70812ce7d37f8e2032fb3f85346f3d3c42dfe202757dcc1f1b7634b91327d73bb8e795c11093c75867de002011b0e6832c28221396eea
7
+ data.tar.gz: f93131f1c494030d16377fec8fb8380755265a44a497365e8246e9e9a80c43cd3d921ac2b327cf17e74df6c665541a9a1c610a6916b20d9f3ae2b30391760a08
data/README.md CHANGED
@@ -39,16 +39,24 @@ pp Sc4ry::Circuits.list
39
39
  # display default config, must be override with a nested hash by calling default_config= method
40
40
  pp Sc4ry::Circuits.default_config
41
41
 
42
+
43
+ # Config an alternate logger
44
+ Sc4ry::Logger.register name: :perso, instance: ::Logger.new('/tmp/logfile.log')
45
+ Sc4ry::Logger::current = :perso
46
+
47
+
42
48
  # default values, circuit is half open before one of the max count is reached
43
49
 
44
50
  # {:max_failure_count=>5, => maximum failure before opening circuit
45
51
  # :timeout_value=>20, => timeout value, if :timeout => true
46
- # :timeout=>false, => activate internal timeout
52
+ # :timeout=>false, => (de)activate internal timeout
47
53
  # :max_timeout_count=>5, => maximum timeout try before opening circuit
48
54
  # :max_time=>10, => maximum time for a circuit run
49
55
  # :max_overtime_count=>3, => maximum count of overtime before opening circuit
50
56
  # :check_delay=>30, => delay after opening, before trying again to closed circuit or after an other check
51
57
  # :notifiers=>[], => active notifier, must be :symbol in [:prometheus, :mattermost]
58
+ # :forward_unknown_exceptions => true, => (de)activate forwarding of unknown exceptions, just log in DEBUG if false
59
+ # :raise_on_opening => false, => (de)activate raise specific Sc4ry exceptions ( CircuitBreaked ) if circuit opening
52
60
  # :exceptions=>[StandardError, RuntimeError]} => list of selected Exceptions considered for failure, others are SKIPPED.
53
61
 
54
62
  # display configuration for a specific circuit
data/lib/sc4ry/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sc4ry
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/sc4ry.gemspec CHANGED
@@ -19,4 +19,9 @@ Gem::Specification.new do |spec|
19
19
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
20
  end
21
21
  spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency "prometheus-client", "~> 3.0"
24
+ spec.add_dependency "rest-client", "~> 2.1"
25
+
26
+
22
27
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sc4ry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain GEORGES
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-02 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-03-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: prometheus-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
13
41
  description: Sc4ry provide the design pattern Circuit breaker for your application.
14
42
  email:
15
43
  - romain.georges@orange.com