feature_flag_client 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: 15d0f87f4b7f35e40dc810108972fdad0d5a5c269c0df54efd2702828e226487
4
- data.tar.gz: 690edf715a654e06bbc70bec36e93b53bf7514fffbe7c09dc1ff59837d7a6b1a
3
+ metadata.gz: 10eaa56f76079b041f451559fdba1ba2d3e1d12d5d3a497f319c1e6253b9f326
4
+ data.tar.gz: e5104709f1d61669e7190909ff75734f0d63449a5d0f274b184c93351448924c
5
5
  SHA512:
6
- metadata.gz: c9befad151fd62cffa052fc12a2a408edef28ebaf52837bda25c876e8202c0c453f5dbd3930203b7eb133c03f31abc9dfefd3cabdcade9cb1111c3da1aff5452
7
- data.tar.gz: ae4ab58b011a62012c78b8654a387789bc9e109675614782f844f558c4cf402e9212d3d5c3cab6e7266449d55de5a0b99be24262fd1862496b49ad8b74f6f99e
6
+ metadata.gz: 49fcb38b5df36aed09a6f2841a88d2055c3080a72ed681538965e3ffad100a6d8012566d8f15098a37de2a79d9111d6d07c41e9f02bf24baa6ce6a02fe3b1a47
7
+ data.tar.gz: 9ce9be77d991a86dcd8ef6603126fc8f0d57c4a907e8de3e8c642e07dea82b1ee86218258c27d6585d94effebcc6781e67a0dcd8e5f199ad40a7efc282bce751
@@ -1,3 +1,7 @@
1
+ ## 0.2.2
2
+
3
+ * Update readme with usage and out of date description
4
+
1
5
  ## 0.2.0
2
6
 
3
7
  * Major refactor
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- feature_flag_client (0.1.0)
4
+ feature_flag_client (0.2.1)
5
5
  httparty (~> 0.17.3)
6
6
  mini_cache (~> 1.1)
7
7
 
data/README.md CHANGED
@@ -1,15 +1,13 @@
1
- # Feature::Flag::Client
1
+ # FeatureFlagClient
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/feature/flag/client`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem is the API client for FeatureFlag service and allows fetching feature flags for given product from the service.
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
12
- gem 'feature-flag-client'
10
+ gem 'feature_flag_client'
13
11
  ```
14
12
 
15
13
  And then execute:
@@ -18,11 +16,32 @@ And then execute:
18
16
 
19
17
  Or install it yourself as:
20
18
 
21
- $ gem install feature-flag-client
19
+ $ gem install feature_flag_client
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ```
24
+ require 'feature_flag_client'
25
+
26
+ # In some initializer
27
+ FeatureFlagClient::Configure do |config|
28
+ # Main resource API to get feature flags
29
+ config.api_base_url = 'https://api-feature-flag-service.eu-west-1.elb.amazonaws.com/api/v1'
30
+
31
+ # Featureflag service Auth api to get access token
32
+ config.auth_url = 'https://api-feature-flag-service.eu-west-1.elb.amazonaws.com/auth/token'
33
+
34
+ # client id and secret to get access token
35
+ config.client_id = '645da701fce2a12c'
36
+ config.client_secret = '13c77fa6f8e742fa036cd9f9afa912A@' # store this in a secret manager
37
+ end
38
+
39
+ # Elsewhere in the code
40
+ client = FeatureFlagClient.new
41
+ product_name = 'cool product'
42
+ client.features('cool product')
43
+ # => {"feature name"=>#<OpenStruct name="feature name", enabled=false, createdAt="2020-09-08T22:08:07.971Z", updatedAt="2020-09-18T23:37:59.479Z">, "feature name 2"=>#<OpenStruct name="feature name 2", enabled=true, createdAt="2020-09-08T22:08:14.309Z", updatedAt="2020-09-11T14:27:29.678Z">, "Magic Feature"=>#<OpenStruct name="Magic Feature", enabled=true, createdAt="2020-09-11T14:27:39.515Z", updatedAt="2020-09-11T14:27:45.873Z">}
44
+ ```
26
45
 
27
46
  ## Development
28
47
 
@@ -32,7 +51,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
51
 
33
52
  ## Contributing
34
53
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/feature-flag-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ardeshir/feature-flag-clients. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
55
 
37
56
  ## License
38
57
 
@@ -40,4 +59,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
59
 
41
60
  ## Code of Conduct
42
61
 
43
- Everyone interacting in the Feature::Flag::Client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/feature-flag-client/blob/master/CODE_OF_CONDUCT.md).
62
+ Everyone interacting in the Feature::Flag::Client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ardeshireshghi/feature-flag-clients/blob/master/lib/clients/ruby/feature-flag-client/CODE_OF_CONDUCT.md).
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'bundler/setup'
5
- require 'feature/flag/client'
5
+ require 'feature_flag_client'
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
 
14
14
  spec.summary = 'Write a short summary, because RubyGems requires one.'
15
15
  spec.description = 'Write a longer description or delete this line.'
16
- spec.homepage = 'https://github.com/ardeshireshghi/feature-flag-clients/lib/clients/ruby'
16
+ spec.homepage = 'https://github.com/ardeshireshghi/feature-flag-clients/tree/master/lib/clients/ruby/feature-flag-client'
17
17
  spec.license = 'MIT'
18
18
 
19
19
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module FeatureFlagClient
4
4
  module Version
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_flag_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ardeshir Eshghi
@@ -119,12 +119,12 @@ files:
119
119
  - lib/feature_flag_client/client.rb
120
120
  - lib/feature_flag_client/client/version.rb
121
121
  - lib/feature_flag_client/session.rb
122
- homepage: https://github.com/ardeshireshghi/feature-flag-clients/lib/clients/ruby
122
+ homepage: https://github.com/ardeshireshghi/feature-flag-clients/tree/master/lib/clients/ruby/feature-flag-client
123
123
  licenses:
124
124
  - MIT
125
125
  metadata:
126
126
  allowed_push_host: https://rubygems.org
127
- homepage_uri: https://github.com/ardeshireshghi/feature-flag-clients/lib/clients/ruby
127
+ homepage_uri: https://github.com/ardeshireshghi/feature-flag-clients/tree/master/lib/clients/ruby/feature-flag-client
128
128
  source_code_uri: https://github.com/ardeshireshghi/feature-flag-clients/lib/clients/ruby
129
129
  changelog_uri: https://github.com/ardeshireshghi/feature-flag-clients/lib/clients/ruby/feature-flag-client/CHANGELOG.md
130
130
  post_install_message: