flipper-active_record 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flipper/version.rb +11 -1
- data/spec/flipper/adapters/active_record_spec.rb +10 -6
- data/test/adapters/active_record_test.rb +2 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81713d8d766224017cb63e42f5a918a061db77d9ad23f5b6ccf2b864244413c9
|
4
|
+
data.tar.gz: 4d81bac025f6d0374f6b7cfd147a6df93991635efd394b21b8aede593471ccda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed4dd08828325e647bff16e2696cf19810912b9c79f962742eac51789c63b262bbc268f2720d4668d6c9e39f8670494fc65d827e0b745b0b7a5c1edab184d692
|
7
|
+
data.tar.gz: c3f61cf9f06ee4eeb563927115ceb127ec2fd8484c78eb7049b71f8e53ad0456f82df4b40d415e64017a92293a8509f437d597756afd55ff1fb3ed5463eec3b1
|
data/lib/flipper/version.rb
CHANGED
@@ -1,3 +1,13 @@
|
|
1
1
|
module Flipper
|
2
|
-
VERSION = '1.
|
2
|
+
VERSION = '1.2.0'.freeze
|
3
|
+
|
4
|
+
REQUIRED_RUBY_VERSION = '2.6'.freeze
|
5
|
+
NEXT_REQUIRED_RUBY_VERSION = '3.0'.freeze
|
6
|
+
|
7
|
+
REQUIRED_RAILS_VERSION = '5.2'.freeze
|
8
|
+
NEXT_REQUIRED_RAILS_VERSION = '6.1.0'.freeze
|
9
|
+
|
10
|
+
def self.deprecated_ruby_version?
|
11
|
+
Gem::Version.new(RUBY_VERSION) < Gem::Version.new(NEXT_REQUIRED_RUBY_VERSION)
|
12
|
+
end
|
3
13
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'flipper/adapters/active_record'
|
1
|
+
SpecHelpers.silence { require 'flipper/adapters/active_record' }
|
2
2
|
require 'active_support/core_ext/kernel'
|
3
3
|
|
4
4
|
# Turn off migration logging for specs
|
@@ -43,7 +43,7 @@ RSpec.describe Flipper::Adapters::ActiveRecord do
|
|
43
43
|
|
44
44
|
context "with #{config[:adapter]}" do
|
45
45
|
before(:all) do
|
46
|
-
ActiveRecord::Tasks::DatabaseTasks.create(config)
|
46
|
+
silence { ActiveRecord::Tasks::DatabaseTasks.create(config) }
|
47
47
|
end
|
48
48
|
|
49
49
|
before(:each) do
|
@@ -59,7 +59,7 @@ RSpec.describe Flipper::Adapters::ActiveRecord do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
after(:all) do
|
62
|
-
ActiveRecord::Tasks::DatabaseTasks.drop(config)
|
62
|
+
silence { ActiveRecord::Tasks::DatabaseTasks.drop(config) }
|
63
63
|
end
|
64
64
|
|
65
65
|
it_should_behave_like 'a flipper adapter'
|
@@ -70,8 +70,12 @@ RSpec.describe Flipper::Adapters::ActiveRecord do
|
|
70
70
|
Flipper.configuration = nil
|
71
71
|
Flipper.instance = nil
|
72
72
|
|
73
|
-
|
74
|
-
|
73
|
+
expect {
|
74
|
+
silence do
|
75
|
+
load 'flipper/adapters/active_record.rb'
|
76
|
+
Flipper::Adapters::ActiveRecord.new
|
77
|
+
end
|
78
|
+
}.not_to raise_error
|
75
79
|
end
|
76
80
|
|
77
81
|
it "should load actor ids fine" do
|
@@ -92,7 +96,7 @@ RSpec.describe Flipper::Adapters::ActiveRecord do
|
|
92
96
|
Flipper.configuration = nil
|
93
97
|
Flipper.instance = nil
|
94
98
|
|
95
|
-
|
99
|
+
silence { load 'flipper/adapters/active_record.rb' }
|
96
100
|
end
|
97
101
|
|
98
102
|
it 'configures itself' do
|
@@ -47,8 +47,7 @@ class ActiveRecordTest < MiniTest::Test
|
|
47
47
|
ActiveRecord::Base.table_name_prefix = :foo_
|
48
48
|
ActiveRecord::Base.table_name_suffix = :_bar
|
49
49
|
|
50
|
-
Flipper::Adapters
|
51
|
-
Flipper::Adapters::ActiveRecord.send(:remove_const, :Gate)
|
50
|
+
Flipper::Adapters.send(:remove_const, :ActiveRecord)
|
52
51
|
load("flipper/adapters/active_record.rb")
|
53
52
|
|
54
53
|
assert_equal "foo_flipper_features_bar", Flipper::Adapters::ActiveRecord::Feature.table_name
|
@@ -58,8 +57,7 @@ class ActiveRecordTest < MiniTest::Test
|
|
58
57
|
ActiveRecord::Base.table_name_prefix = ""
|
59
58
|
ActiveRecord::Base.table_name_suffix = ""
|
60
59
|
|
61
|
-
Flipper::Adapters
|
62
|
-
Flipper::Adapters::ActiveRecord.send(:remove_const, :Gate)
|
60
|
+
Flipper::Adapters.send(:remove_const, :ActiveRecord)
|
63
61
|
load("flipper/adapters/active_record.rb")
|
64
62
|
end
|
65
63
|
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: 1.
|
4
|
+
version: 1.2.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:
|
11
|
+
date: 2024-01-11 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: 1.
|
19
|
+
version: 1.2.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: 1.
|
26
|
+
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ metadata:
|
|
74
74
|
homepage_uri: https://www.flippercloud.io
|
75
75
|
source_code_uri: https://github.com/flippercloud/flipper
|
76
76
|
bug_tracker_uri: https://github.com/flippercloud/flipper/issues
|
77
|
-
changelog_uri: https://github.com/flippercloud/flipper/
|
77
|
+
changelog_uri: https://github.com/flippercloud/flipper/releases/tag/v1.2.0
|
78
78
|
post_install_message:
|
79
79
|
rdoc_options: []
|
80
80
|
require_paths:
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.5.3
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: ActiveRecord feature flag adapter for Flipper
|