flipper-ui 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be9d4667f30e16f2d6f4ccb72bbb3e3f46b7c0261274bea9ec2e31fa0c403210
4
- data.tar.gz: '09bb8b603b54d6c4161f312b4ba0be1ac92299d0b55c29f21b5fdd5961034a0d'
3
+ metadata.gz: 8144504e41946fb472624b26f3d90391015198313d76922fcc0ff819d772ca5a
4
+ data.tar.gz: 48fa54bfbd68797c71ceb7e6c139adb048bcf1686951cff6d7ddfb7214c4ca05
5
5
  SHA512:
6
- metadata.gz: a15b882c1e7a5248da12a71f7dd4c9df7f9d63a72cccad36efc7d64cd4b88280eaff9cf0999d3737eab2d7bd4745ee926fcc1cf59cd1f060944636264ff37202
7
- data.tar.gz: baad050fea403866a36c3cba1520d0e1a9e8224a80f5d97c478bc098c583a66ce29cb35f99f6b21d2caebf48d84fa0e62629a36fafc2724d51dc5d5d7aa784b2
6
+ metadata.gz: 37315503544ad6b26eef44e0505567830ce95a9f9f67503ea55b6d48b9696f537b2146744f90010d8608789be0cb12125a424496b4523ddcb4326fc5eb3727af
7
+ data.tar.gz: 4872687e63143df426de62563f86909b314e7722da704ff2853bbb1d084ed317ac59a56d163fb38a6c87441546fdb3782fc8bdb352a0ef5a61869433090b3d88
data/lib/flipper/ui.rb CHANGED
@@ -20,17 +20,26 @@ module Flipper
20
20
 
21
21
  def self.app(flipper = nil, options = {})
22
22
  env_key = options.fetch(:env_key, 'flipper')
23
-
24
- if options.key?(:rack_protection)
25
- warn "[DEPRECATION] `rack_protection` option is deprecated. " +
26
- "Flipper::UI now only includes Rack::Protection::AuthenticityToken middleware. " +
27
- "If you need additional protection, you can add it yourself."
23
+ rack_protection_options = if options.key?(:rack_protection)
24
+ options[:rack_protection]
25
+ else
26
+ {}
28
27
  end
29
28
 
30
29
  app = ->(_) { [200, { Rack::CONTENT_TYPE => 'text/html' }, ['']] }
31
30
  builder = Rack::Builder.new
32
31
  yield builder if block_given?
33
- builder.use Rack::Protection::AuthenticityToken
32
+
33
+ # Only use Rack::Protection::AuthenticityToken if no other options are
34
+ # provided. Should avoid some pain for some people. If any options are
35
+ # provided then go whole hog and include all of Rack::Protection for
36
+ # backwards compatibility.
37
+ if rack_protection_options.empty?
38
+ builder.use Rack::Protection::AuthenticityToken
39
+ else
40
+ builder.use Rack::Protection, rack_protection_options
41
+ end
42
+
34
43
  builder.use Rack::MethodOverride
35
44
  builder.use Flipper::Middleware::SetupEnv, flipper, env_key: env_key
36
45
  builder.use Flipper::UI::Middleware, flipper: flipper, env_key: env_key
@@ -1,5 +1,5 @@
1
1
  module Flipper
2
- VERSION = '1.3.3'.freeze
2
+ VERSION = '1.3.5'.freeze
3
3
 
4
4
  REQUIRED_RUBY_VERSION = '2.6'.freeze
5
5
  NEXT_REQUIRED_RUBY_VERSION = '3.0'.freeze
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rack
@@ -75,14 +75,14 @@ dependencies:
75
75
  requirements:
76
76
  - - "~>"
77
77
  - !ruby/object:Gem::Version
78
- version: 1.3.3
78
+ version: 1.3.5
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: 1.3.3
85
+ version: 1.3.5
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: erubi
88
88
  requirement: !ruby/object:Gem::Requirement
@@ -198,7 +198,7 @@ metadata:
198
198
  homepage_uri: https://www.flippercloud.io
199
199
  source_code_uri: https://github.com/flippercloud/flipper
200
200
  bug_tracker_uri: https://github.com/flippercloud/flipper/issues
201
- changelog_uri: https://github.com/flippercloud/flipper/releases/tag/v1.3.3
201
+ changelog_uri: https://github.com/flippercloud/flipper/releases/tag/v1.3.5
202
202
  funding_uri: https://github.com/sponsors/flippercloud
203
203
  rdoc_options: []
204
204
  require_paths:
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  requirements: []
217
- rubygems_version: 3.6.5
217
+ rubygems_version: 3.6.9
218
218
  specification_version: 4
219
219
  summary: Feature flag UI for the Flipper gem
220
220
  test_files: