flipflop 2.7.0 → 2.7.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69f214599b32e0544ade72b6c07a928af76acc4355a3730395239182fa0a5107
|
4
|
+
data.tar.gz: 6b5f36a45bbd650e123976dd372ce8be63e546485f7cb2cfe2313d65723b45d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9631d29ec55a231c775a5b7df53ecd7a8704f2a7e97b3c845ce8fcefa0629111ab921759e39d34db0c8d5e41a38e1d05dfdbe487e620950623cb928fde82c60
|
7
|
+
data.tar.gz: 343a0dc013172165af8f10bf81417d1e1cfb47784886a77dc7dc03d9dd69bba9f14973b96aeed1da188f14a8d4a4e7ba5a2d1a74fa00d82dbf38b120fd19ee0b
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 2.7.1
|
2
|
+
|
3
|
+
* Admin page redirection enhancements after updating a feature switch. Now after flipping a switch it will take you back to the section that you were navigating previously. This is very helpful when having several feature switches.
|
4
|
+
|
1
5
|
## 2.7.0
|
2
6
|
|
3
7
|
* Removing .css extension from render partial and adding it to html handler to correctly render the erb file.
|
@@ -4,12 +4,12 @@ module Flipflop
|
|
4
4
|
|
5
5
|
def update
|
6
6
|
FeatureSet.current.switch!(feature_key, strategy_key, enable?)
|
7
|
-
redirect_to(
|
7
|
+
redirect_to features_url(anchor: "#{feature_key}-#{strategy_key}".parameterize)
|
8
8
|
end
|
9
9
|
|
10
10
|
def destroy
|
11
11
|
FeatureSet.current.clear!(feature_key, strategy_key)
|
12
|
-
redirect_to(
|
12
|
+
redirect_to features_url(anchor: "#{feature_key}-#{strategy_key}".parameterize)
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
@@ -41,7 +41,7 @@
|
|
41
41
|
</td>
|
42
42
|
|
43
43
|
<% @feature_set.strategies.each do |strategy| -%>
|
44
|
-
<td class="toggle" data-strategy="<%= strategy.name.dasherize.parameterize %>">
|
44
|
+
<td class="toggle" data-strategy="<%= strategy.name.dasherize.parameterize %>" id="<%= "#{feature.key}-#{strategy.key}".parameterize %>">
|
45
45
|
<div class="toolbar">
|
46
46
|
<%= form_tag(@feature_set.switch_url(strategy, feature), method: :put) do -%>
|
47
47
|
<div class="group">
|
@@ -15,10 +15,10 @@ module Flipflop
|
|
15
15
|
FeatureSet.current.add(feature)
|
16
16
|
end
|
17
17
|
|
18
|
-
def strategy(strategy = nil, **options)
|
18
|
+
def strategy(strategy = nil, **options, &block)
|
19
19
|
if block_given?
|
20
20
|
options[:name] = strategy.to_s
|
21
|
-
options[:lambda] = Proc.new
|
21
|
+
options[:lambda] = Proc.new &block
|
22
22
|
strategy = Strategies::LambdaStrategy
|
23
23
|
end
|
24
24
|
|
data/lib/flipflop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipflop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Annesley
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-03-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|