flipper 0.11.0.beta8 → 0.11.0.beta9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/docs/Adapters.md +1 -1
- data/docs/Optimization.md +6 -6
- data/lib/flipper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82cc5ffd7d40e3b8930038e06718a378e22d5798
|
4
|
+
data.tar.gz: 5cbc699f683fa1ee88efc46aff9577220ff63ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acebdb682fce4b45c99267ef345e9eec161b7421ac957248445e235a7ebde7d2fd3a6181f2d5e2cc362c69ecf5637cfede638cbba49233e8658895b801a5140f
|
7
|
+
data.tar.gz: 239a7733640400443d7adb7c4d745257eadbe61dd791330235728296395ff365292f9570a15f1994d054c08374486fbc85cc7fe65ee5ba4c99e01ae0c4804b1d
|
data/.rubocop_todo.yml
CHANGED
@@ -151,7 +151,7 @@ Style/FileName:
|
|
151
151
|
Exclude:
|
152
152
|
- 'lib/flipper-active_record.rb'
|
153
153
|
- 'lib/flipper-api.rb'
|
154
|
-
- 'lib/flipper-
|
154
|
+
- 'lib/flipper-active_support_cache_store.rb'
|
155
155
|
- 'lib/flipper-cloud.rb'
|
156
156
|
- 'lib/flipper-dalli.rb'
|
157
157
|
- 'lib/flipper-mongo.rb'
|
data/docs/Adapters.md
CHANGED
@@ -5,7 +5,7 @@ I plan on supporting the adapters in the flipper repo. Other adapters are welcom
|
|
5
5
|
## Officially Supported
|
6
6
|
|
7
7
|
* [ActiveRecord adapter](https://github.com/jnunemaker/flipper/blob/master/docs/active_record) - Rails 3, 4, and 5.
|
8
|
-
* [
|
8
|
+
* [ActiveSupportCacheStore adapter](https://github.com/jnunemaker/flipper/blob/master/docs/active_support_cache_store) - ActiveSupport::Cache::Store
|
9
9
|
* [Cassanity adapter](https://github.com/jnunemaker/flipper-cassanity)
|
10
10
|
* [Http adapter](https://github.com/jnunemaker/flipper/blob/master/docs/http)
|
11
11
|
* [memory adapter](https://github.com/jnunemaker/flipper/blob/master/lib/flipper/adapters/memory.rb) – great for tests
|
data/docs/Optimization.md
CHANGED
@@ -87,13 +87,13 @@ Example using the RedisCache adapter with the Memory adapter and a TTL of 4800 s
|
|
87
87
|
flipper = Flipper.new(adapter)
|
88
88
|
```
|
89
89
|
|
90
|
-
###
|
90
|
+
### ActiveSupportCacheStore
|
91
91
|
|
92
92
|
Rails applications can cache Flipper calls in any [ActiveSupport::Cache::Store](http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html) implementation.
|
93
93
|
|
94
94
|
Add this line to your application's Gemfile:
|
95
95
|
|
96
|
-
gem 'flipper-
|
96
|
+
gem 'flipper-active_support_cache_store'
|
97
97
|
|
98
98
|
And then execute:
|
99
99
|
|
@@ -101,18 +101,18 @@ And then execute:
|
|
101
101
|
|
102
102
|
Or install it yourself with:
|
103
103
|
|
104
|
-
$ gem install flipper-
|
104
|
+
$ gem install flipper-active_support_cache_store
|
105
105
|
|
106
|
-
Example using the
|
106
|
+
Example using the ActiveSupportCacheStore adapter with ActiveSupport's [MemoryStore](http://api.rubyonrails.org/classes/ActiveSupport/Cache/MemoryStore.html), Flipper's [Memory adapter](https://github.com/jnunemaker/flipper/blob/master/lib/flipper/adapters/memory.rb), and a TTL of 5 minutes.
|
107
107
|
|
108
108
|
```ruby
|
109
109
|
require 'active_support/cache'
|
110
110
|
require 'flipper/adapters/memory'
|
111
|
-
require 'flipper/adapters/
|
111
|
+
require 'flipper/adapters/active_support_cache_store'
|
112
112
|
|
113
113
|
memory_adapter = Flipper::Adapters::Memory.new
|
114
114
|
cache = ActiveSupport::Cache::MemoryStore.new
|
115
|
-
adapter = Flipper::Adapters::
|
115
|
+
adapter = Flipper::Adapters::ActiveSupportCacheStore.new(memory_adapter, cache, expires_in: 5.minutes)
|
116
116
|
flipper = Flipper.new(adapter)
|
117
117
|
```
|
118
118
|
|
data/lib/flipper/version.rb
CHANGED