determinator 1.1.1 → 1.1.2

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
  SHA1:
3
- metadata.gz: 2ece9989b7ac3a6e9ab04d4933e27d4225011283
4
- data.tar.gz: 3675d4b2c99d14b5161c402651827e84cfe2d14a
3
+ metadata.gz: fd852966a9351ecb27cf0b4d6553686e995d291e
4
+ data.tar.gz: 48f7d48e91deb7f5dcb142ebdf764cf68ee949b7
5
5
  SHA512:
6
- metadata.gz: e2408a3051c80f95368f920e63331b2aa147fd91edf4b1e4701b823a0e2e2f61361e725531b5b9a99ef8f560abc1f4b670cb4c5b464d6ac592c5576f6a41c39d
7
- data.tar.gz: 872e0b1696d9a7cc37f013f0fb2df9b39b0aee3c4967b66051d3711bdf4183302c1561158c86815fe8a5aa4a7670625d8b5f2787c2eed0b28a8b83e6c3de58dd
6
+ metadata.gz: f3c92e42762d687546e4f48869786f0e85484b39780acf49429bc05b8bd7e881266eab8fe8db5b703321ca65615ce723ef2225daf8286f5063846cf6b728d185
7
+ data.tar.gz: cda308dc0f3b656d221827c66877ea62f0b2729453472b7178a63b692a28af705eea589e07e122f6bd53b2ab3f51e5a44b59390c2947c4de1d43cf9e4ef7a970
@@ -1,3 +1,8 @@
1
+ # v1.1.1 (2018-03-07)
2
+
3
+ Bug fix:
4
+ - Ensures that `Determiantor::Retrievve::File` tolerates feature names that quack `#to_s`. (#50)
5
+
1
6
  # v1.1.1 (2018-02-27)
2
7
 
3
8
  Bug fix:
@@ -88,3 +88,30 @@ determinator.which_variant(:my_experiment, id: 123)
88
88
  ```
89
89
 
90
90
  More information can be found on the [Fake Florence](https://github.com/deliveroo/fake_florence) project page.
91
+
92
+ ## File support for local
93
+
94
+ Alternatively, Determinator can be configured to read from a local file store.
95
+
96
+ Add 'local_feature_flags' to your .gitignore file and the following to your determinator setup initializer.
97
+
98
+ ```ruby
99
+ # /config/initializers/determinator.rb
100
+ require 'determinator/retrieve/file'
101
+ retrieval = if Rails.env.development?
102
+ Determinator::Retrieve::File.new(
103
+ root: Rails.root.join('local_feature_flags')
104
+ )
105
+ else
106
+ #Your regular production config
107
+ end
108
+
109
+ Determinator.configure(retrieval: retrieval)
110
+ ```
111
+
112
+ Then add a your feature definitions as a json file (without an extension) to the `local_feature_flags` folder.
113
+
114
+ ```ruby
115
+ # checks /local_feature_flags/deliveroo_does
116
+ Determinator.instance.feature_flag_on?('deliveroo_does', id: 5)
117
+ ```
@@ -12,7 +12,7 @@ module Determinator
12
12
  end
13
13
 
14
14
  def retrieve(feature_id)
15
- feature = @root.join(feature_id)
15
+ feature = @root.join(feature_id.to_s)
16
16
  return unless feature.exist?
17
17
  @serializer.load(feature.read)
18
18
  rescue => e
@@ -1,3 +1,3 @@
1
1
  module Determinator
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  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: 1.1.1
4
+ version: 1.1.2
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: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: routemaster-drain