flipper-moneta 0.22.2 → 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: 771e240b1a0bde1bbd22183985db2aaba049910ec1e674dcc873691be1cf1837
4
- data.tar.gz: f8283b8be3daa176f647a4faef52cd7fc7749f7092190a5e898480f61d6325b2
3
+ metadata.gz: 47e88516660f9241d7543ed5f816f49c0918fd009b3da2ebb09acb6da1152fa0
4
+ data.tar.gz: 6bc8fb6a9cd9646df102d8331fbc85489f2de1dd611c2114c18e6a47c8b7c759
5
5
  SHA512:
6
- metadata.gz: 4be57508e3295b294981ed7ac11fe4abcca425e8648855f78ea6bcf4f9aa97876c4c357662280fd8bc4f2329e6f6364a2f64bc268672621ebcdbbd344d6a87e5
7
- data.tar.gz: e1a05874a21cd394d69121f052ec87f8a6a4c8b73db9f472e58d77f353cc53265cc887addb9883647f213ad4fbcd4cef1d6c62cf8a4a554799e44d707a33caf5
6
+ metadata.gz: 3a4566e1b49cfb6a4c0f14872e9a9c98ad22ae645aa77b36bab2c8d25edf286353de563cc7c3e51d44210aab1b7d215b3fe2349dc7add662bb5cd323d6738b4a
7
+ data.tar.gz: 7343ce3f9aa93675cd71c910cfcdf479debd5c0e7553801babaa802ddb9a9860facccb96c0b786bfca19b56ab55ae2ffb8b880fa5e10638e78e307459c9124aa
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.22.2'.freeze
2
+ VERSION = '0.23.0'.freeze
3
3
  end
@@ -1,6 +1,4 @@
1
- require 'helper'
2
1
  require 'flipper/adapters/moneta'
3
- require 'flipper/spec/shared_adapter_specs'
4
2
 
5
3
  RSpec.describe Flipper::Adapters::Moneta do
6
4
  let(:moneta) { Moneta.new(:Memory) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-moneta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.2
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-10-06 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.22.2
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.22.2
26
+ version: 0.23.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: moneta
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -51,7 +51,6 @@ executables: []
51
51
  extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
- - docs/moneta/README.md
55
54
  - flipper-moneta.gemspec
56
55
  - lib/flipper/adapters/moneta.rb
57
56
  - lib/flipper/version.rb
@@ -75,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
74
  - !ruby/object:Gem::Version
76
75
  version: '0'
77
76
  requirements: []
78
- rubygems_version: 3.0.3
77
+ rubygems_version: 3.1.2
79
78
  signing_key:
80
79
  specification_version: 4
81
80
  summary: Moneta adapter for Flipper
@@ -1,73 +0,0 @@
1
- # Flipper Moneta
2
-
3
- A [Moneta](https://github.com/minad/moneta) adapter for [Flipper](https://github.com/jnunemaker/flipper).
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'flipper-moneta'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself with:
16
-
17
- $ gem install flipper-moneta
18
-
19
- ## Usage
20
-
21
- ```ruby
22
- require 'flipper/adapters/moneta'
23
- moneta = Moneta.new(:Memory)
24
-
25
- Flipper.configure do |config|
26
- config.adapter { Flipper::Adapters::Moneta.new(moneta) }
27
- end
28
- ```
29
-
30
- ## Internals
31
-
32
- Each feature is stored as a key namespaced by `flipper_features`.
33
-
34
- ```ruby
35
- require 'flipper/adapters/moneta'
36
- moneta = Moneta.new(:Memory)
37
-
38
- Flipper.configure do |config|
39
- config.adapter { Flipper::Adapters::Moneta.new(moneta) }
40
- end
41
-
42
- # Register a few groups.
43
- Flipper.register(:admins) { |thing| thing.admin? }
44
- Flipper.register(:early_access) { |thing| thing.early_access? }
45
-
46
- # Create a user class that has flipper_id instance method.
47
- User = Struct.new(:flipper_id)
48
-
49
- Flipper[:stats].enable
50
- Flipper[:stats].enable_group :admins
51
- Flipper[:stats].enable_group :early_access
52
- Flipper[:stats].enable_actor User.new('25')
53
- Flipper[:stats].enable_actor User.new('90')
54
- Flipper[:stats].enable_actor User.new('180')
55
- Flipper[:stats].enable_percentage_of_time 15
56
- Flipper[:stats].enable_percentage_of_actors 45
57
-
58
- pp moneta["flipper_features/stats"]
59
-
60
- {:boolean=>"true",
61
- :groups=>#<Set: {"admins", "early_access"}>,
62
- :actors=>#<Set: {"25", "90", "180"}>,
63
- :percentage_of_actors=>"45",
64
- :percentage_of_time=>"15"}
65
- ```
66
-
67
- ## Contributing
68
-
69
- 1. Fork it
70
- 2. Create your feature branch (`git checkout -b my-new-feature`)
71
- 3. Commit your changes (`git commit -am 'Added some feature'`)
72
- 4. Push to the branch (`git push origin my-new-feature`)
73
- 5. Create new Pull Request