featureflow 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +2 -0
- data/lib/featureflow/client.rb +3 -1
- data/lib/featureflow/version.rb +1 -1
- data/test.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2b92e283ed6338bfc5cea3a091f5238d67d168f
|
4
|
+
data.tar.gz: 40b939815e43da2f10b6e2f7cb6c3c7a65d6f7ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9e51aea4bd9aaf4b01521bd2f0d4b598705e6f8b10cee5a62d3b79de76c02ccb75d8d5f38720b543d3fdfcbd72d4bb06160622a3c1ca01b39075699bb6b6247
|
7
|
+
data.tar.gz: 27cd52c7e6a43b42c4eafefc3d712916746fe1d60c1283a779b1a6f867a8d162bea29eec543268f0534b780b1ee00368e0648e4e19a074c14fdb440f1ab05435
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg
|
data/README.md
CHANGED
data/lib/featureflow/client.rb
CHANGED
@@ -7,7 +7,9 @@ require 'featureflow/events_client'
|
|
7
7
|
|
8
8
|
module Featureflow
|
9
9
|
class Client
|
10
|
-
def initialize(
|
10
|
+
def initialize(config = {})
|
11
|
+
api_key = config[:api_key] || ENV[:FEATUREFLOW_SERVER_KEY]
|
12
|
+
raise ArgumentError, "You have not defined either config[:api_key] or ENV[:FEATUREFLOW_SERVER_KEY]" unless api_key
|
11
13
|
Featureflow.logger.info 'initializing client'
|
12
14
|
@features = {}
|
13
15
|
@config = {
|
data/lib/featureflow/version.rb
CHANGED
data/test.rb
CHANGED
@@ -5,7 +5,7 @@ with_features = [
|
|
5
5
|
Featureflow::Feature.create('default', 'variant')
|
6
6
|
]
|
7
7
|
api_key = 'srv-env-9b5fff890c724d119a334a64ed4d2eb2'
|
8
|
-
featureflow_client = Featureflow::Client.new(api_key, with_features: with_features)
|
8
|
+
featureflow_client = Featureflow::Client.new(api_key: api_key, with_features: with_features)
|
9
9
|
context = Featureflow::ContextBuilder.new('user1').build
|
10
10
|
puts('test-integration is on? ' + featureflow_client.evaluate('test-integration', context).on?.to_s)
|
11
11
|
featureflow_client.evaluate('nooooo', context).on?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: featureflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Young
|
@@ -87,6 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- ".gitignore"
|
90
91
|
- ".rubocop.yml"
|
91
92
|
- Gemfile
|
92
93
|
- Gemfile.lock
|