determinator 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -1
- data/examples/determinator-rails/config/initializers/determinator.rb +2 -0
- data/lib/determinator.rb +10 -1
- data/lib/determinator/retrieve/routemaster.rb +2 -1
- data/lib/determinator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecd2a7d802e9ad2562fbdf9708ff34a84242b91e
|
4
|
+
data.tar.gz: 5b1918806a440a52f4c337286164b79376059fef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1a2cf800a27d2b5bf007d50507bc8a1394c596cc0563b4b73fa6cb5dabe3ea43f8558b64840df9baad51ed571c2837409f20aef17e3a5ac4c895264326bb56f
|
7
|
+
data.tar.gz: 64035bfedb2ed42cb72f27bf48cc09d875a1764f5ecec945f8a409a95c8aab09ac66893b0ef9432d4852689093ccc1c3d137e248285e00dfc27826d0479f4116
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -55,7 +55,8 @@ Determinator.configure(
|
|
55
55
|
retrieval: Determinator::Retrieve::Routemaster.new(
|
56
56
|
discovery_url: 'https://florence.dev/'
|
57
57
|
retrieval_cache: ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute)
|
58
|
-
)
|
58
|
+
),
|
59
|
+
errors: -> error { NewRelic::Agent.notice_error(error) }
|
59
60
|
)
|
60
61
|
```
|
61
62
|
|
@@ -5,4 +5,6 @@ Determinator.configure(
|
|
5
5
|
discovery_url: 'https://florence.dev/'
|
6
6
|
retrieval_cache: ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute)
|
7
7
|
)
|
8
|
+
# The following would allow tracking of errors in NewRelic
|
9
|
+
# errors: -> error { NewRelic::Agent.notice_error(error) }
|
8
10
|
)
|
data/lib/determinator.rb
CHANGED
@@ -6,7 +6,10 @@ require 'determinator/retrieve/routemaster'
|
|
6
6
|
require 'determinator/retrieve/null_retriever'
|
7
7
|
|
8
8
|
module Determinator
|
9
|
-
|
9
|
+
# @param :retrieval [Determinator::Retrieve::Routemaster] A retrieval instance for Features
|
10
|
+
# @param :errors [Proc, nil] a proc, accepting an error, which will be called with any errors which occur while determinating
|
11
|
+
def self.configure(retrieval:, errors: nil)
|
12
|
+
@error_logger = errors if errors.respond_to?(:call)
|
10
13
|
@instance = Control.new(retrieval: retrieval)
|
11
14
|
end
|
12
15
|
|
@@ -14,4 +17,10 @@ module Determinator
|
|
14
17
|
raise "No singleton Determinator instance defined" unless @instance
|
15
18
|
@instance
|
16
19
|
end
|
20
|
+
|
21
|
+
def self.notice_error(error)
|
22
|
+
return unless @error_logger
|
23
|
+
|
24
|
+
@error_logger.call(error)
|
25
|
+
end
|
17
26
|
end
|
data/lib/determinator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: determinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Hastings-Spital
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: routemaster-drain
|