flipper-ui 0.26.0.rc2 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2e1ad8439dbc0b215ffdf8c55491eccb01c129348e44e2e2f52d3347c3a8ff5
4
- data.tar.gz: c30b64c7b661d6a7163c6042bef817254ce85829f01602d08a11a3ec72382e70
3
+ metadata.gz: fb876470ebb6b05094e57f03964f9c32eac27f52dd449ea6bba74a40d5aaa4bd
4
+ data.tar.gz: 2511d18885a5b94104ba2e8ad5845079be6425ea18425f5cfd01ac080cc7d0ad
5
5
  SHA512:
6
- metadata.gz: ab411eb73a497b554c133eb3b448a86d0b736b1d82b19b280682082a0834bd5f688cb6406e42c86cda5bbe01244a208ba7d6ef630dbff310b7b24023fa2fe739
7
- data.tar.gz: e7e739c84acaca3b0012953c6dfc32a6d3cb8b1bf33d3d258d03016b9183b702b2d33c972b0d8f48a055b2b7b8ea432c82fd95d6ad45f64357cc95296ba4b780
6
+ metadata.gz: d92a393344d56c17ef6e2c745d210879b5c2a457926f9663461fd68c4368294328bf81c3710b197f9744739e7d3ffc52a30ea8af6adce49a63bca5e58da23ee3
7
+ data.tar.gz: e4f03b7e76dc5238a4e7e02ba9a77beaa2c92e21b1b92c931f932bd2d588e789eec4e826e1d0ea833fb9f9918610d71a317a42d0ed49dc1595a7da592886df0f
@@ -5,7 +5,7 @@ $(function () {
5
5
  });
6
6
 
7
7
  $("#enable_feature__button").on("click", function (e) {
8
- const featureName = $("#feature_name").val();
8
+ const featureName = $(e.target).data("confirmation-text");
9
9
  const promptMessage = prompt(
10
10
  `Are you sure you want to fully enable this feature for everyone? Please enter the name of the feature to confirm it: ${featureName}`
11
11
  );
@@ -16,7 +16,7 @@ $(function () {
16
16
  });
17
17
 
18
18
  $("#delete_feature__button").on("click", function (e) {
19
- const featureName = $("#feature_name").val();
19
+ const featureName = $(e.target).data("confirmation-text");
20
20
  const promptMessage = prompt(
21
21
  `Are you sure you want to remove this feature from the list of features and disable it for everyone? Please enter the name of the feature to confirm it: ${featureName}`
22
22
  );
@@ -243,6 +243,9 @@
243
243
  <div class="col">
244
244
  <button type="submit" name="action" value="Enable" <% if Flipper::UI.configuration.confirm_fully_enable %>id="enable_feature__button"<% end %> class="btn btn-outline-success btn-block" <% if Flipper::UI.configuration.read_only %>disabled<% end %>>
245
245
  <span class="d-block" data-toggle="tooltip"
246
+ <% if Flipper::UI.configuration.confirm_fully_enable %>
247
+ data-confirmation-text="<%= feature_name %>"
248
+ <% end %>
246
249
  <% if Flipper::UI.configuration.read_only %>
247
250
  title="Fully enable is not allowed in read only mode."
248
251
  <% else %>
@@ -289,7 +292,7 @@
289
292
  <%== csrf_input_tag %>
290
293
  <input type="hidden" id="feature_name" name="_feature" value="<%= feature_name %>">
291
294
  <input type="hidden" name="_method" value="DELETE">
292
- <button type="submit" name="action" value="Delete" id="delete_feature__button" class="btn btn-outline-danger" data-toggle="tooltip" title="Remove feature from list of features and disable it." data-placement="right">Delete</button>
295
+ <button type="submit" name="action" value="Delete" id="delete_feature__button" data-confirmation-text="<%= feature_name %>" class="btn btn-outline-danger" data-toggle="tooltip" title="Remove feature from list of features and disable it." data-placement="right">Delete</button>
293
296
  </form>
294
297
  </div>
295
298
  </div>
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.26.0.rc2'.freeze
2
+ VERSION = '0.26.0'.freeze
3
3
  end
@@ -110,6 +110,17 @@ RSpec.describe Flipper::UI::Configuration do
110
110
  end
111
111
  end
112
112
 
113
+ describe "#confirm_fully_enable" do
114
+ it "has default value" do
115
+ expect(configuration.confirm_fully_enable).to eq(false)
116
+ end
117
+
118
+ it "can be updated" do
119
+ configuration.confirm_fully_enable = true
120
+ expect(configuration.confirm_fully_enable).to eq(true)
121
+ end
122
+ end
123
+
113
124
  describe "#show_feature_description_in_list" do
114
125
  it "has default value" do
115
126
  expect(configuration.show_feature_description_in_list).to eq(false)
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.26.0.rc2
4
+ version: 0.26.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: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2022-12-05 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.26.0.rc2
59
+ version: 0.26.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.26.0.rc2
66
+ version: 0.26.0
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: erubi
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,6 @@ files:
123
123
  - lib/flipper/ui/actions/home.rb
124
124
  - lib/flipper/ui/actions/percentage_of_actors_gate.rb
125
125
  - lib/flipper/ui/actions/percentage_of_time_gate.rb
126
- - lib/flipper/ui/assets/javascripts/application.coffee
127
126
  - lib/flipper/ui/configuration.rb
128
127
  - lib/flipper/ui/configuration/option.rb
129
128
  - lib/flipper/ui/decorators/feature.rb
@@ -164,7 +163,7 @@ homepage: https://github.com/jnunemaker/flipper
164
163
  licenses:
165
164
  - MIT
166
165
  metadata:
167
- changelog_uri: https://github.com/jnunemaker/flipper/blob/master/Changelog.md
166
+ changelog_uri: https://github.com/jnunemaker/flipper/blob/main/Changelog.md
168
167
  post_install_message:
169
168
  rdoc_options: []
170
169
  require_paths:
@@ -176,9 +175,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
175
  version: '0'
177
176
  required_rubygems_version: !ruby/object:Gem::Requirement
178
177
  requirements:
179
- - - ">"
178
+ - - ">="
180
179
  - !ruby/object:Gem::Version
181
- version: 1.3.1
180
+ version: '0'
182
181
  requirements: []
183
182
  rubygems_version: 3.3.7
184
183
  signing_key:
@@ -1,5 +0,0 @@
1
- $ ->
2
- $(document).on('click', '.js-toggle-trigger', ->
3
- $container = $(this).closest('.js-toggle-container')
4
- $container.toggleClass('toggle-on')
5
- )