flipper-rollout 0.21.0 → 0.23.0

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: de9d06dea3a10630bdc3892c2d10b4f02fdd6c3ddc0a510f3314937dd80a2a7d
4
- data.tar.gz: 8d952a90c9ca2cc72c87e3470d44b18cb53239d34a342b1e7843ac93262b268a
3
+ metadata.gz: 9330a6dd0438bb1d2e166528d4011694f95159049f27b1fda78d67b202d4d43e
4
+ data.tar.gz: 4404bf29adc4dfff83647278a3a4dccd6b3cdad116bcc51314d2507254ca0a5a
5
5
  SHA512:
6
- metadata.gz: 1f24c0efe75a5297f0ec662289ef7be80c183208554939e89884643a535360327688c504a17d87ca5d595654e1dc8d7dbfc5a250d41558ca0bf1d8f82a34828c
7
- data.tar.gz: 1cbd02d1e924c38df543038b0aec2e047ee7d74a82493d751c53425c5f09fe6fc7dfb6e333a73c818d58983d9041261a92269a7a73d5c3741fd575f1b80980f4
6
+ metadata.gz: 040baeb533ce86f519bece80d2c9dcaada17cb4c1d31f0dabe9f84f4146afbf5bc2e8b823084260336dba55e57f0fa5aff932b934175b4f77d7e43a1fbbd2229
7
+ data.tar.gz: a14f94a88e4c7662e440a381e2cacf91c4455aa79cb1e65b85aa9e3c46f90c8f82b08198c27f72614f49517a994bb01d067a604c381c77166ba9b5a90a42ac35
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.21.0'.freeze
2
+ VERSION = '0.23.0'.freeze
3
3
  end
@@ -1,8 +1,6 @@
1
- require 'helper'
2
1
  require 'redis'
3
2
  require 'rollout'
4
3
  require 'flipper/adapters/rollout'
5
- require 'flipper/spec/shared_adapter_specs'
6
4
 
7
5
  RSpec.describe Flipper::Adapters::Rollout do
8
6
  let(:redis) { Redis.new }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-rollout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-09 00:00:00.000000000 Z
11
+ date: 2021-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flipper
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.0
19
+ version: 0.23.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.21.0
26
+ version: 0.23.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -65,7 +65,6 @@ executables: []
65
65
  extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
- - docs/rollout/README.md
69
68
  - examples/rollout/basic.rb
70
69
  - examples/rollout/import.rb
71
70
  - flipper-rollout.gemspec
@@ -92,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
91
  - !ruby/object:Gem::Version
93
92
  version: '0'
94
93
  requirements: []
95
- rubygems_version: 3.0.3
94
+ rubygems_version: 3.1.2
96
95
  signing_key:
97
96
  specification_version: 4
98
97
  summary: Rollout adapter for Flipper
@@ -1,77 +0,0 @@
1
- # Flipper Rollout
2
-
3
- A [Rollout](https://github.com/fetlife/rollout) adapter for [importing](https://github.com/jnunemaker/flipper/blob/master/docs/Adapters.md#user-content-swapping-adapters
4
- ) Rollout data into [Flipper](https://github.com/jnunemaker/flipper).
5
-
6
- requires:
7
- * Rollout ~> 2.0
8
- * Flipper >= 11.0
9
-
10
- ## Installation
11
-
12
- Add this line to your application's Gemfile:
13
-
14
- gem 'flipper-rollout'
15
-
16
- And then execute:
17
-
18
- $ bundle
19
-
20
- Or install it yourself with:
21
-
22
- $ gem install flipper-redis
23
-
24
- ## Usage
25
-
26
- ```ruby
27
- require 'redis'
28
- require 'rollout'
29
- require 'flipper'
30
- require 'flipper/adapters/redis'
31
- require 'flipper/adapters/rollout'
32
-
33
- # setup redis, rollout and rollout flipper
34
- redis = Redis.new
35
- rollout = Rollout.new(redis)
36
- rollout_adapter = Flipper::Adapters::Rollout.new(rollout)
37
- rollout_flipper = Flipper.new(rollout_adapter)
38
-
39
- # setup flipper default instance
40
- Flipper.configure do |config|
41
- config.adapter { Flipper::Adapters::Redis.new(redis) }
42
- end
43
-
44
- # import rollout into redis flipper
45
- Flipper.import(rollout_flipper)
46
- ```
47
-
48
- That was easy.
49
-
50
- ### Groups
51
- If you're using [Rollout groups](https://github.com/fetlife/rollout#user-content-groups) you'll need to register them as [Flipper groups](https://github.com/jnunemaker/flipper/blob/master/docs/Gates.md#user-content-2-group):
52
-
53
- *Rollout*
54
- ```ruby
55
- $rollout.define_group(:caretakers) do |user|
56
- user.caretaker?
57
- end
58
- ```
59
-
60
- *Flipper*
61
- ```ruby
62
- Flipper.register(:caretakers) do |user|
63
- user.caretaker?
64
- end
65
- ```
66
-
67
- ### flipper_id
68
-
69
- Rollout expects users to respond to *id* (or method specified in [Rollout#initialize](https://github.com/fetlife/rollout/blob/master/lib/rollout.rb#L135) opts) and stores this value in Redis when a feature is activated for a user. You'll want to make sure that your Flipper actor's [flipper_id](https://github.com/jnunemaker/flipper/blob/master/docs/Gates.md#user-content-3-individual-actor) matches this logic.
70
-
71
- ## Contributing
72
-
73
- 1. Fork it
74
- 2. Create your feature branch (`git checkout -b my-new-feature`)
75
- 3. Commit your changes (`git commit -am 'Added some feature'`)
76
- 4. Push to the branch (`git push origin my-new-feature`)
77
- 5. Create new Pull Request