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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a87a99a5d26e8ffd53a4e4620612f5babe97090fc9a25a13999cbeef90eb38c3
4
- data.tar.gz: 4e2523ba1ddd2b72c383893ba161655526292334fb8a3f863891c7a2ae7dbd2b
3
+ metadata.gz: 81713d8d766224017cb63e42f5a918a061db77d9ad23f5b6ccf2b864244413c9
4
+ data.tar.gz: 4d81bac025f6d0374f6b7cfd147a6df93991635efd394b21b8aede593471ccda
5
5
  SHA512:
6
- metadata.gz: 80587a110384c5ac2e4d11e143ad33797d092b391f6e553b87cd2499dc841dfb75079eb414368470400709ede4fa3c96e12416c48712cd731a4606da50f63b9f
7
- data.tar.gz: ec0a0d89da664ae8aedc701a7406a2794391d27987bcc0ce85be3a33e1b2c02b76869206301f49d1c9489c703cd9de47c0b6714b166cd758805996569e25e355
6
+ metadata.gz: ed4dd08828325e647bff16e2696cf19810912b9c79f962742eac51789c63b262bbc268f2720d4668d6c9e39f8670494fc65d827e0b745b0b7a5c1edab184d692
7
+ data.tar.gz: c3f61cf9f06ee4eeb563927115ceb127ec2fd8484c78eb7049b71f8e53ad0456f82df4b40d415e64017a92293a8509f437d597756afd55ff1fb3ed5463eec3b1
@@ -1,3 +1,13 @@
1
1
  module Flipper
2
- VERSION = '1.1.2'.freeze
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
- silence_warnings { load 'flipper/adapters/active_record.rb' }
74
- expect { Flipper::Adapters::ActiveRecord.new }.not_to raise_error
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
- silence_warnings { load 'flipper/adapters/active_record.rb' }
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::ActiveRecord.send(:remove_const, :Feature)
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::ActiveRecord.send(:remove_const, :Feature)
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.1.2
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: 2023-12-12 00:00:00.000000000 Z
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.1.2
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.1.2
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/blob/main/Changelog.md
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.4.10
93
+ rubygems_version: 3.5.3
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: ActiveRecord feature flag adapter for Flipper