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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2bf01c33aad4266b0237775c779d6b3b19d01d43adff566c82c1ddb26fb76f5
4
- data.tar.gz: 34ba1e6bded36a3352031c82b9f32d34abbb5f8781eb28b15f7aa450cbd02cbd
3
+ metadata.gz: f1ec7d9f3d54551e8b6085d9105c854f96dfe8f6ac0d9b7840652e7f2882ee3c
4
+ data.tar.gz: 8d28946c836b4b405f522b4ae703659cdd8ba4194024098ffc9d4a9239821744
5
5
  SHA512:
6
- metadata.gz: 303520e21a9e3f71284d72bb817032df8849b5bee213e4a42924ab5e90af1f38e82734830fba40d11c0b6e91962b134838e80d181f4c7482f306f64651222bf6
7
- data.tar.gz: f9b371acc123a5a7cc8e901d40db474a83f706d886496512b9f24c298d0a8e621c2e394b3b38f8bddc5b92966d7ab594f38c1b83912026eac967133dccd1eb2d
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
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.26.2'.freeze
2
+ VERSION = '0.27.0'.freeze
3
3
  end
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.26.2
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-15 00:00:00.000000000 Z
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.26.2
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.2
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