flipper-ui 0.28.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/flipper-ui.gemspec +3 -3
- data/lib/flipper/ui/action.rb +6 -6
- data/lib/flipper/ui/views/features.erb +1 -1
- data/lib/flipper/ui.rb +1 -1
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/ui_spec.rb +1 -1
- metadata +14 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd48dae9f3960dac91b3f5f7e37379f645830b1af3b03fb799cd573ab6ada610
|
4
|
+
data.tar.gz: 5da1c6b37d76ed5c5b7d7a5a971b5c24a61e0f01b814bf63ea08861dee663e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e021d776e438792829e5c8f54af8911767a00a38853b5b736eb3aef61aba2c9414ab2948d03b4ca95494e3aeaf29b283ddd2e7dd29e2eb653102f8127c9a52b
|
7
|
+
data.tar.gz: 360bbb64545a87b57462add396a98e629b1ba0a8b969ca631f62903744cf7c8e12d05252ab67a3e3d1dca4c34e103092e263f25ddda72673775ef3c26aeec96a
|
data/flipper-ui.gemspec
CHANGED
@@ -8,10 +8,10 @@ end
|
|
8
8
|
|
9
9
|
Gem::Specification.new do |gem|
|
10
10
|
gem.authors = ['John Nunemaker']
|
11
|
-
gem.email =
|
11
|
+
gem.email = 'support@flippercloud.io'
|
12
12
|
gem.summary = 'UI for the Flipper gem'
|
13
13
|
gem.license = 'MIT'
|
14
|
-
gem.homepage = 'https://
|
14
|
+
gem.homepage = 'https://www.flippercloud.io/docs/ui'
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split("\n").select(&flipper_ui_files) + ['lib/flipper/version.rb']
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").select(&flipper_ui_files)
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.version = Flipper::VERSION
|
21
21
|
gem.metadata = Flipper::METADATA
|
22
22
|
|
23
|
-
gem.add_dependency 'rack', '>= 1.4', '<
|
23
|
+
gem.add_dependency 'rack', '>= 1.4', '< 4'
|
24
24
|
gem.add_dependency 'rack-protection', '>= 1.5.3', '<= 4.0.0'
|
25
25
|
gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
|
26
26
|
gem.add_dependency 'erubi', '>= 1.0.0', '< 2.0.0'
|
data/lib/flipper/ui/action.rb
CHANGED
@@ -108,7 +108,7 @@ module Flipper
|
|
108
108
|
@flipper = flipper
|
109
109
|
@request = request
|
110
110
|
@code = 200
|
111
|
-
@headers = { '
|
111
|
+
@headers = { 'content-type' => 'text/plain' }
|
112
112
|
@breadcrumbs =
|
113
113
|
if Flipper::UI.configuration.application_breadcrumb_href
|
114
114
|
[Breadcrumb.new('App', Flipper::UI.configuration.application_breadcrumb_href)]
|
@@ -158,20 +158,20 @@ module Flipper
|
|
158
158
|
#
|
159
159
|
# Returns a response.
|
160
160
|
def view_response(name)
|
161
|
-
header '
|
162
|
-
header '
|
161
|
+
header 'content-type', 'text/html'
|
162
|
+
header 'content-security-policy', CONTENT_SECURITY_POLICY
|
163
163
|
body = view_with_layout { view_without_layout name }
|
164
164
|
halt [@code, @headers, [body]]
|
165
165
|
end
|
166
166
|
|
167
167
|
# Public: Dumps an object as json and returns rack response with that as
|
168
|
-
# the body. Automatically sets
|
168
|
+
# the body. Automatically sets content-type to "application/json".
|
169
169
|
#
|
170
170
|
# object - The Object that should be dumped as json.
|
171
171
|
#
|
172
172
|
# Returns a response.
|
173
173
|
def json_response(object)
|
174
|
-
header '
|
174
|
+
header 'content-type', 'application/json'
|
175
175
|
body = case object
|
176
176
|
when String
|
177
177
|
object
|
@@ -186,7 +186,7 @@ module Flipper
|
|
186
186
|
# location - The String location to set the Location header to.
|
187
187
|
def redirect_to(location)
|
188
188
|
status 302
|
189
|
-
header '
|
189
|
+
header 'location', "#{script_name}#{Rack::Utils.escape_path(location)}"
|
190
190
|
halt [@code, @headers, ['']]
|
191
191
|
end
|
192
192
|
|
data/lib/flipper/ui.rb
CHANGED
@@ -22,7 +22,7 @@ module Flipper
|
|
22
22
|
env_key = options.fetch(:env_key, 'flipper')
|
23
23
|
rack_protection_options = options.fetch(:rack_protection, use: :authenticity_token)
|
24
24
|
|
25
|
-
app = ->(_) { [200, { '
|
25
|
+
app = ->(_) { [200, { 'content-type' => 'text/html' }, ['']] }
|
26
26
|
builder = Rack::Builder.new
|
27
27
|
yield builder if block_given?
|
28
28
|
builder.use Rack::Protection, rack_protection_options
|
data/lib/flipper/version.rb
CHANGED
data/spec/flipper/ui_spec.rb
CHANGED
@@ -36,7 +36,7 @@ RSpec.describe Flipper::UI do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
# See https://github.com/
|
39
|
+
# See https://github.com/flippercloud/flipper/issues/80
|
40
40
|
it 'can route features with names that match static directories' do
|
41
41
|
post 'features/refactor-images/actors',
|
42
42
|
{ 'value' => 'User;6', 'operation' => 'enable', 'authenticity_token' => token },
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.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-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '1.4'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '4'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '1.4'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '4'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rack-protection
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
59
|
+
version: 1.0.0
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.
|
66
|
+
version: 1.0.0
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: erubi
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,8 +99,7 @@ dependencies:
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '7'
|
101
101
|
description:
|
102
|
-
email:
|
103
|
-
- nunemaker@gmail.com
|
102
|
+
email: support@flippercloud.io
|
104
103
|
executables: []
|
105
104
|
extensions: []
|
106
105
|
extra_rdoc_files: []
|
@@ -171,11 +170,15 @@ files:
|
|
171
170
|
- spec/flipper/ui/decorators/gate_spec.rb
|
172
171
|
- spec/flipper/ui/util_spec.rb
|
173
172
|
- spec/flipper/ui_spec.rb
|
174
|
-
homepage: https://
|
173
|
+
homepage: https://www.flippercloud.io/docs/ui
|
175
174
|
licenses:
|
176
175
|
- MIT
|
177
176
|
metadata:
|
178
|
-
|
177
|
+
documentation_uri: https://www.flippercloud.io/docs
|
178
|
+
homepage_uri: https://www.flippercloud.io
|
179
|
+
source_code_uri: https://github.com/flippercloud/flipper
|
180
|
+
bug_tracker_uri: https://github.com/flippercloud/flipper/issues
|
181
|
+
changelog_uri: https://github.com/flippercloud/flipper/blob/main/Changelog.md
|
179
182
|
post_install_message:
|
180
183
|
rdoc_options: []
|
181
184
|
require_paths:
|
@@ -191,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
194
|
- !ruby/object:Gem::Version
|
192
195
|
version: '0'
|
193
196
|
requirements: []
|
194
|
-
rubygems_version: 3.
|
197
|
+
rubygems_version: 3.4.10
|
195
198
|
signing_key:
|
196
199
|
specification_version: 4
|
197
200
|
summary: UI for the Flipper gem
|