flipper-ui 1.3.3 → 1.3.4

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: d9a66a9d74693e98cfac19952fc4d96462859c413227b42046b56e5af338d209
4
+ data.tar.gz: c07771724428a8489e2983bae1fd013dce759f945ec2cf4975288249a27fe234
5
5
  SHA512:
6
- metadata.gz: a15b882c1e7a5248da12a71f7dd4c9df7f9d63a72cccad36efc7d64cd4b88280eaff9cf0999d3737eab2d7bd4745ee926fcc1cf59cd1f060944636264ff37202
7
- data.tar.gz: baad050fea403866a36c3cba1520d0e1a9e8224a80f5d97c478bc098c583a66ce29cb35f99f6b21d2caebf48d84fa0e62629a36fafc2724d51dc5d5d7aa784b2
6
+ metadata.gz: ba3e6af3ed94a8cd79c4bde53d3348336b72714916f7d2edd5a4c7058d4bec3e678e554d48aa8f2c810e32b0aadef3a8b74d7ef432ce5b763390a61f007b15f0
7
+ data.tar.gz: d9513e900abb53e417697e4bcecfc95a57237f5d1c8384f9924754fc42844421e6ebfa712f3fde1b009277c586ddd5fccbcbe2760dddb472db065adf48f8702c
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.4'.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.4
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: 2025-03-03 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.4
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.4
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.4
202
202
  funding_uri: https://github.com/sponsors/flippercloud
203
203
  rdoc_options: []
204
204
  require_paths: