flipper-active_record 0.26.2 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/active_record/cached.rb +23 -0
- data/lib/flipper/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1ec7d9f3d54551e8b6085d9105c854f96dfe8f6ac0d9b7840652e7f2882ee3c
|
4
|
+
data.tar.gz: 8d28946c836b4b405f522b4ae703659cdd8ba4194024098ffc9d4a9239821744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 772e0c2625811d8edfeed372c5a79ee3518328791e73ef86ad0dc4bc7093e9e53d2ae907b1a6a19be81a482e6f1f1ddd4edfe32a58b0f063e9c719d8c7f61083
|
7
|
+
data.tar.gz: 8023576edb27c613d508884adf287e04f8305c20b7d8e0c36718fa37979e122da6342234db984751c05fb607dd1d5151048913ff25e2751d4c08acff0850e083
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require_relative "./ar_setup"
|
2
|
+
|
3
|
+
# Requires the flipper-active_record gem to be installed.
|
4
|
+
require 'flipper/adapters/active_record'
|
5
|
+
require 'flipper/adapters/active_support_cache_store'
|
6
|
+
|
7
|
+
Flipper.configure do |config|
|
8
|
+
config.adapter do
|
9
|
+
Flipper::Adapters::ActiveSupportCacheStore.new(
|
10
|
+
Flipper::Adapters::ActiveRecord.new,
|
11
|
+
ActiveSupport::Cache::MemoryStore.new,
|
12
|
+
expires_in: 2.seconds
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
18
|
+
|
19
|
+
puts "You should see 5 or 6 queries."
|
20
|
+
10.times do |i|
|
21
|
+
Flipper.enabled?(:foo)
|
22
|
+
sleep 1
|
23
|
+
end
|
data/lib/flipper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.27.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: 2023-03-
|
11
|
+
date: 2023-03-18 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.
|
19
|
+
version: 0.27.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.
|
26
|
+
version: 0.27.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- benchmark/active_record_setup.rb
|
57
57
|
- examples/active_record/ar_setup.rb
|
58
58
|
- examples/active_record/basic.rb
|
59
|
+
- examples/active_record/cached.rb
|
59
60
|
- examples/active_record/internals.rb
|
60
61
|
- flipper-active_record.gemspec
|
61
62
|
- lib/flipper-active_record.rb
|