flipper 0.26.0.rc2 → 0.26.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: 60ce7896afa06dd25ad8e6f8b4f419bbb992e16ce7147339af30ac15f338871d
4
- data.tar.gz: 3a6635db6af529d29a2f1bd075fe45a82c77211bdd012d3613a89f2b98566975
3
+ metadata.gz: e5edb0409042f8d4d5905b8d526fd1d240a75dbee2d947b8ae4adae0c534af5f
4
+ data.tar.gz: 6bc01d5f7c0ee5f3d64d30faaa599b155d6220e249006d2ead7168bc47938202
5
5
  SHA512:
6
- metadata.gz: 6ce977a03bcafdfd4cb0427541eb0277b4dfbbadd723c86e12a7fcbec65d398663ed74fbdb9c46aa6b460e00e0025bd9853ed52c7a3cf3f44016e005d79e6eff
7
- data.tar.gz: c422114b0e7076ebd7c0c63bef943a54aede502f253c5310a4e59f17daaadeafd435594aac7936c441adfc3a39fa3d5ba2ef17c589d828cefb5a977d750f0215
6
+ metadata.gz: 60fee2e4a0d97a26b7403736b4422c0e69a0e9e452469e3f29e7af684001c38f2c957acdfa3f8f0554315d021a7e7091bb40898247e45d4658b14b31bc1de22f
7
+ data.tar.gz: bf45e695be511513be967bffd75c4e48d3af0f05b05264ee3b13a9df8bba8af929ccbf6b7a1f05c6c3a7d5476ceb757e3dda852f8e42b745bf7171f42538fb14
data/Changelog.md CHANGED
@@ -2,9 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## 0.26.0.rc1
5
+ ## 0.26.0
6
6
 
7
7
  * Cloud Background Polling (https://github.com/jnunemaker/flipper/pull/682)
8
+ * Changed default branch from master to main
9
+ * Allow configuring railtie via ENV vars (https://github.com/jnunemaker/flipper/pull/681)
10
+ * flipper-ui: Fix issue preventing feature flags being enabled when confirm_fully_enable is on and feature_removal_enabled is off (https://github.com/jnunemaker/flipper/pull/680)
8
11
 
9
12
  ## 0.25.4
10
13
 
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ end
18
18
  desc 'Tags version, pushes to remote, and pushes gem'
19
19
  task release: :build do
20
20
  sh 'git', 'tag', "v#{Flipper::VERSION}"
21
- sh 'git push origin master'
21
+ sh 'git push origin main'
22
22
  sh "git push origin v#{Flipper::VERSION}"
23
23
  puts "\nWhat OTP code should be used?"
24
24
  otp_code = STDIN.gets.chomp
@@ -19,7 +19,7 @@ module Flipper
19
19
  end
20
20
 
21
21
  def self.reset
22
- instances.clear
22
+ instances.each {|_,poller| poller.stop }.clear
23
23
  end
24
24
 
25
25
  def initialize(options = {})
@@ -1,5 +1,5 @@
1
1
  module Flipper
2
2
  METADATA = {
3
- 'changelog_uri' => 'https://github.com/jnunemaker/flipper/blob/master/Changelog.md',
3
+ 'changelog_uri' => 'https://github.com/jnunemaker/flipper/blob/main/Changelog.md',
4
4
  }.freeze
5
5
  end
@@ -2,11 +2,11 @@ module Flipper
2
2
  class Railtie < Rails::Railtie
3
3
  config.before_configuration do
4
4
  config.flipper = ActiveSupport::OrderedOptions.new.update(
5
- env_key: "flipper",
6
- memoize: true,
7
- preload: true,
8
- instrumenter: ActiveSupport::Notifications,
9
- log: true
5
+ env_key: ENV.fetch('FLIPPER_ENV_KEY', 'flipper'),
6
+ memoize: ENV.fetch('FLIPPER_MEMOIZE', 'true').casecmp('true').zero?,
7
+ preload: ENV.fetch('FLIPPER_PRELOAD', 'true').casecmp('true').zero?,
8
+ instrumenter: ENV.fetch('FLIPPER_INSTRUMENTER', 'ActiveSupport::Notifications').constantize,
9
+ log: ENV.fetch('FLIPPER_LOG', 'true').casecmp('true').zero?
10
10
  )
11
11
  end
12
12
 
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.26.0.rc2'.freeze
2
+ VERSION = '0.26.0'.freeze
3
3
  end
@@ -18,6 +18,42 @@ RSpec.describe Flipper::Railtie do
18
18
  subject { application.initialize! }
19
19
 
20
20
  describe 'initializers' do
21
+ it 'can set env_key from ENV' do
22
+ ENV['FLIPPER_ENV_KEY'] = 'flopper'
23
+
24
+ subject
25
+ expect(config.env_key).to eq('flopper')
26
+ end
27
+
28
+ it 'can set memoize from ENV' do
29
+ ENV['FLIPPER_MEMOIZE'] = 'false'
30
+
31
+ subject
32
+ expect(config.memoize).to eq(false)
33
+ end
34
+
35
+ it 'can set preload from ENV' do
36
+ ENV['FLIPPER_PRELOAD'] = 'false'
37
+
38
+ subject
39
+ expect(config.preload).to eq(false)
40
+ end
41
+
42
+ it 'can set instrumenter from ENV' do
43
+ stub_const('My::Cool::Instrumenter', Class.new)
44
+ ENV['FLIPPER_INSTRUMENTER'] = 'My::Cool::Instrumenter'
45
+
46
+ subject
47
+ expect(config.instrumenter).to eq(My::Cool::Instrumenter)
48
+ end
49
+
50
+ it 'can set log from ENV' do
51
+ ENV['FLIPPER_LOG'] = 'false'
52
+
53
+ subject
54
+ expect(config.log).to eq(false)
55
+ end
56
+
21
57
  it 'sets defaults' do
22
58
  subject # initialize
23
59
  expect(config.env_key).to eq("flipper")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0.rc2
4
+ version: 0.26.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: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -183,7 +183,7 @@ homepage: https://github.com/jnunemaker/flipper
183
183
  licenses:
184
184
  - MIT
185
185
  metadata:
186
- changelog_uri: https://github.com/jnunemaker/flipper/blob/master/Changelog.md
186
+ changelog_uri: https://github.com/jnunemaker/flipper/blob/main/Changelog.md
187
187
  post_install_message:
188
188
  rdoc_options: []
189
189
  require_paths:
@@ -195,9 +195,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
195
  version: '0'
196
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  requirements:
198
- - - ">"
198
+ - - ">="
199
199
  - !ruby/object:Gem::Version
200
- version: 1.3.1
200
+ version: '0'
201
201
  requirements: []
202
202
  rubygems_version: 3.3.7
203
203
  signing_key: