flipper-ui 0.20.4 → 0.21.0.rc1

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: be8e990a613d1aedf2e856e7690189867bf51f3649c85b5e9a02eecaa2b8004d
4
- data.tar.gz: 3a7778cb7097093911a9dfde08bfc0984ef1290122bcc7a3967ca4f63025c00f
3
+ metadata.gz: 1892ab407f3f56ccddb2268e6ce53d7d02ef68a5004c914bc68a61c791c1a97f
4
+ data.tar.gz: cff24cf7ed9f5521118d16af76cd2b8bc9b7ef90b345610450f2c2d836cc915d
5
5
  SHA512:
6
- metadata.gz: 7964377fc793564b88887b4f25f8bceeeb6c0c7577f380ccf19a068ed420bf1d283a0d0970fa7d3d5e9ebb76936a3a82528fb549f26376ce7d6ff65ac2425227
7
- data.tar.gz: f0e10a642325711a65e9a896ec2fdd7df332480e2254e11ebb5dfb40d3a3960f8f2fddeb45b526e5283f7e9b7f6def49103fdbf70ebd3bcf00a6210961dc8283
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 "pp"
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
- # bundle exec rackup examples/ui/basic.ru -p 9999
4
- # bundle exec shotgun examples/ui/basic.ru -p 9999
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 "pp"
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
@@ -1,5 +1,5 @@
1
1
  <% if @show_blank_slate %>
2
- <div class="jumbotron text-center">
2
+ <div class="jumbotron text-center m-0">
3
3
  <% if Flipper::UI.configuration.fun %>
4
4
  <h4>But I've got a blank space baby...</h4>
5
5
  <p>And I'll flip your features.</p>
@@ -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&nbsp;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>
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.20.4'.freeze
2
+ VERSION = '0.21.0.rc1'.freeze
3
3
  end
@@ -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.20.4
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-03-06 00:00:00.000000000 Z
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.20.4
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.20.4
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: '0'
178
+ version: 1.3.1
179
179
  requirements: []
180
180
  rubygems_version: 3.0.3
181
181
  signing_key: