flipper-ui 0.20.4 → 0.21.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/ui/authorization.ru +1 -6
- data/examples/ui/basic.ru +8 -10
- data/lib/flipper/ui/configuration.rb +5 -0
- data/lib/flipper/ui/views/features.erb +1 -1
- data/lib/flipper/ui/views/layout.erb +15 -0
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/ui/configuration_spec.rb +11 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1892ab407f3f56ccddb2268e6ce53d7d02ef68a5004c914bc68a61c791c1a97f
|
4
|
+
data.tar.gz: cff24cf7ed9f5521118d16af76cd2b8bc9b7ef90b345610450f2c2d836cc915d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c3afd4b54efb3d6df85b1be0df6671083d208a451526a71483519eb748ff87aaf4b5ca1d4d4594981b6172fbb7e4b82e6e7cab3268d26c237f98da499c3bf18
|
7
|
+
data.tar.gz: fc85ea7b8bae97535e34321b1c89ae1dcda2b834dc31876d91ddc7ec5387d52a2f912c53c1cf8a965c3442e655676923ee1040385fe3bd73df4b8c2a82af4c04
|
@@ -4,13 +4,8 @@
|
|
4
4
|
# bundle exec shotgun examples/ui/authorization.ru -p 9999
|
5
5
|
# http://localhost:9999/
|
6
6
|
#
|
7
|
-
require
|
7
|
+
require 'bundler/setup'
|
8
8
|
require "logger"
|
9
|
-
require "pathname"
|
10
|
-
|
11
|
-
root_path = Pathname(__FILE__).dirname.join("..").expand_path
|
12
|
-
lib_path = root_path.join("lib")
|
13
|
-
$:.unshift(lib_path)
|
14
9
|
|
15
10
|
require "flipper-ui"
|
16
11
|
require "flipper/adapters/pstore"
|
data/examples/ui/basic.ru
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
#
|
2
2
|
# Usage:
|
3
|
-
#
|
4
|
-
#
|
3
|
+
# # if you want it to not reload and be really fast
|
4
|
+
# bin/rackup examples/ui/basic.ru -p 9999
|
5
|
+
#
|
6
|
+
# # if you want reloading
|
7
|
+
# bin/shotgun examples/ui/basic.ru -p 9999
|
8
|
+
#
|
5
9
|
# http://localhost:9999/
|
6
10
|
#
|
7
|
-
require
|
8
|
-
require "logger"
|
9
|
-
require "pathname"
|
10
|
-
|
11
|
-
root_path = Pathname(__FILE__).dirname.join("..").expand_path
|
12
|
-
lib_path = root_path.join("lib")
|
13
|
-
$:.unshift(lib_path)
|
14
|
-
|
11
|
+
require 'bundler/setup'
|
15
12
|
require "flipper-ui"
|
16
13
|
require "flipper/adapters/pstore"
|
17
14
|
require "active_support/notifications"
|
@@ -39,6 +36,7 @@ Flipper::UI.configure do |config|
|
|
39
36
|
# config.banner_class = 'danger'
|
40
37
|
config.feature_creation_enabled = true
|
41
38
|
config.feature_removal_enabled = true
|
39
|
+
config.cloud_recommendation = true
|
42
40
|
# config.show_feature_description_in_list = true
|
43
41
|
config.descriptions_source = lambda do |_keys|
|
44
42
|
{
|
@@ -26,6 +26,10 @@ module Flipper
|
|
26
26
|
# won't see a videoclip of Taylor Swift when there aren't any features
|
27
27
|
attr_accessor :fun
|
28
28
|
|
29
|
+
# Public: Tired of seeing the awesome message about Cloud? Set this to
|
30
|
+
# false and it will go away. Defaults to true.
|
31
|
+
attr_accessor :cloud_recommendation
|
32
|
+
|
29
33
|
# Public: What should show up in the form to add actors. This can be
|
30
34
|
# different per application since flipper_id's can be whatever an
|
31
35
|
# application needs. Defaults to "a flipper id".
|
@@ -60,6 +64,7 @@ module Flipper
|
|
60
64
|
@feature_creation_enabled = true
|
61
65
|
@feature_removal_enabled = true
|
62
66
|
@fun = true
|
67
|
+
@cloud_recommendation = true
|
63
68
|
@add_actor_placeholder = "a flipper id"
|
64
69
|
@descriptions_source = DEFAULT_DESCRIPTIONS_SOURCE
|
65
70
|
@show_feature_description_in_list = false
|
@@ -35,6 +35,21 @@
|
|
35
35
|
<div>
|
36
36
|
<%== yield %>
|
37
37
|
</div>
|
38
|
+
|
39
|
+
<% if Flipper::UI.configuration.cloud_recommendation %>
|
40
|
+
<div class="d-flex justify-content-center mt-5">
|
41
|
+
<div class="row" style="max-width: 350px;">
|
42
|
+
<div class="col-auto d-flex align-items-center">
|
43
|
+
<a href="https://www.flippercloud.io/?utm_source=oss&utm_medium=ui&utm_campaign=spread_the_love">
|
44
|
+
<img src="<%= script_name %>/images/logo.png" width="50" />
|
45
|
+
</a>
|
46
|
+
</div>
|
47
|
+
<div class="col text-muted p-0">
|
48
|
+
<small>For support, audit history, finer-grained permissions, multi-environment sync, and all your projects in one place check out <a href="https://www.flippercloud.io/?utm_source=oss&utm_medium=ui&utm_campaign=spread_the_love">Flipper Cloud</a>.</small>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
38
53
|
</div>
|
39
54
|
|
40
55
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
data/lib/flipper/version.rb
CHANGED
@@ -59,6 +59,17 @@ RSpec.describe Flipper::UI::Configuration do
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
describe "#cloud_recommendation" do
|
63
|
+
it "has default value" do
|
64
|
+
expect(configuration.cloud_recommendation).to eq(true)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "can be updated" do
|
68
|
+
configuration.cloud_recommendation = false
|
69
|
+
expect(configuration.cloud_recommendation).to eq(false)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
62
73
|
describe "#feature_removal_enabled" do
|
63
74
|
it "has default value" do
|
64
75
|
expect(configuration.feature_removal_enabled).to eq(true)
|
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: 0.21.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
59
|
+
version: 0.21.0.rc1
|
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: 0.21.0.rc1
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: erubi
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,9 +173,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- - "
|
176
|
+
- - ">"
|
177
177
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
178
|
+
version: 1.3.1
|
179
179
|
requirements: []
|
180
180
|
rubygems_version: 3.0.3
|
181
181
|
signing_key:
|