determinator 2.5.4 → 2.6.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/lib/determinator.rb +3 -3
- data/lib/determinator/version.rb +1 -1
- data/lib/rspec/determinator.rb +5 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fe6fd684f160e1d955e9528bd225942068320361d554102b63667125503e610
|
4
|
+
data.tar.gz: f70731d2a63bffa170ee0d545fa9efbc2271fc32995c6635fc4feea33ac38c65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0debe679036a419091917171e90ce4360ec0ea8afdc3d2b0d536b1796cd93b2ffe1fe3b6dc933cfe03642be61bde94c12b471a6aca2d7a04c087f24e6b6b8e94
|
7
|
+
data.tar.gz: 423c16ff61e48e2da9e8883329b70a031819be4741b2f9031fe0cd6c1681e0df43d52f98028b5002a6e6ad82f6774aa24fed5ddf227b56a8d75bb59e3a81ccde
|
data/CHANGELOG.md
CHANGED
data/lib/determinator.rb
CHANGED
@@ -15,13 +15,13 @@ module Determinator
|
|
15
15
|
class << self
|
16
16
|
attr_reader :feature_cache, :retrieval
|
17
17
|
# @param :retrieval [Determinator::Retrieve::Routemaster] A retrieval instance for Features
|
18
|
+
# @param :feature_cache [#call] a caching proc, accepting a feature name, which will return the named feature or yield (and store) if not available
|
18
19
|
# @param :errors [#call, nil] a proc, accepting an error, which will be called with any errors which occur while determinating
|
19
20
|
# @param :missing_feature [#call, nil] a proc, accepting a feature name, which will be called any time a feature is requested but isn't available
|
20
|
-
|
21
|
-
def configure(retrieval:, errors: nil, missing_feature: nil, feature_cache: nil)
|
21
|
+
def configure(retrieval:, feature_cache:, errors: nil, missing_feature: nil)
|
22
22
|
self.on_error(&errors) if errors
|
23
23
|
self.on_missing_feature(&missing_feature) if missing_feature
|
24
|
-
@feature_cache = feature_cache
|
24
|
+
@feature_cache = feature_cache
|
25
25
|
@retrieval = retrieval
|
26
26
|
@instance = Control.new(retrieval: retrieval)
|
27
27
|
end
|
data/lib/determinator/version.rb
CHANGED
data/lib/rspec/determinator.rb
CHANGED
@@ -3,6 +3,9 @@ require_relative '../determinator/retrieve/in_memory_retriever'
|
|
3
3
|
|
4
4
|
module RSpec
|
5
5
|
module Determinator
|
6
|
+
|
7
|
+
DO_NOT_USE_IN_PRODUCTION_CODE_NULL_FEATURE_CACHE = -> (name, &block) { block.call(name) }
|
8
|
+
|
6
9
|
def self.included(by)
|
7
10
|
by.extend(DSL)
|
8
11
|
|
@@ -12,10 +15,10 @@ module RSpec
|
|
12
15
|
old_retriever = ::Determinator.instance.retrieval
|
13
16
|
begin
|
14
17
|
fake_retriever.clear!
|
15
|
-
::Determinator.configure(retrieval: fake_retriever)
|
18
|
+
::Determinator.configure(retrieval: fake_retriever, feature_cache: DO_NOT_USE_IN_PRODUCTION_CODE_NULL_FEATURE_CACHE)
|
16
19
|
example.run
|
17
20
|
ensure
|
18
|
-
::Determinator.configure(retrieval: old_retriever)
|
21
|
+
::Determinator.configure(retrieval: old_retriever, feature_cache: DO_NOT_USE_IN_PRODUCTION_CODE_NULL_FEATURE_CACHE)
|
19
22
|
end
|
20
23
|
end
|
21
24
|
end
|
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: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Hastings-Spital
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -150,7 +150,7 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
description:
|
153
|
+
description:
|
154
154
|
email:
|
155
155
|
- jp@deliveroo.co.uk
|
156
156
|
executables: []
|
@@ -234,7 +234,7 @@ homepage: https://github.com/deliveroo/determinator
|
|
234
234
|
licenses:
|
235
235
|
- MIT
|
236
236
|
metadata: {}
|
237
|
-
post_install_message:
|
237
|
+
post_install_message:
|
238
238
|
rdoc_options: []
|
239
239
|
require_paths:
|
240
240
|
- lib
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
252
|
rubygems_version: 3.0.3
|
253
|
-
signing_key:
|
253
|
+
signing_key:
|
254
254
|
specification_version: 4
|
255
255
|
summary: Determine which experiments and features a specific actor should see.
|
256
256
|
test_files: []
|