feature_gate 0.1.6 → 0.1.7

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
  SHA1:
3
- metadata.gz: c42cde73d5fb4ad2d278f2c3f1aabdf4fab537d3
4
- data.tar.gz: d9439b68386a2d16a7d8fa3216acad265125591c
3
+ metadata.gz: 100576f603464740849f7f3174e0247342afef42
4
+ data.tar.gz: 4f33dc6142d5817a57b14b92711bcb20bf62bb4c
5
5
  SHA512:
6
- metadata.gz: d22d2b1bfd569ae95709fafad9a3130c27ce509d7c33cb8b8ce99fe65bf9c00c369fac1f45de1ec26f8208388aaa468d00748a3edfa2845faa6c84d3e74fb7b4
7
- data.tar.gz: 46a8a33a6ce3f682fc2554b7566a49915e39090c41e764f73078e7c347f7478e238c45344d53b49038fae8f24cd25a0bd42856d4bc712fa080673e4935272762
6
+ metadata.gz: b5b2963daa76ed540a056774836349c7e5284e3da12ac47ca8bad22e5fdc2fd35c390f53982d06fd18647323ed3e6aed85b71baa1b80b99ad97dcdd35e89db95
7
+ data.tar.gz: 373d3be92f6dfde7281e124f87a266688db00f646c72b1d56a823a8a6372d27aece3475bbbf89153c9a792b80065252e8ec74bd73e37ca0f9a88a3a9dc40a6cd
data/README.md CHANGED
@@ -34,12 +34,12 @@ Add `config/initializers/feature_gate.rb`
34
34
 
35
35
  All gates are closed by default, meaning the features you gate will be hidden until you toggle the gates open.
36
36
 
37
- In view files:
37
+ In view files (comment in `end` is optional and is just to make it removable via the cleaner):
38
38
 
39
39
  <% FeatureGate::Manager.gate('gate-name') do %>
40
40
  <h1>This is my gated content</h1>
41
41
  <p>I am not seen if the gate is on</p>
42
- <% end %>
42
+ <% end # gate-name %>
43
43
 
44
44
  In controller actions:
45
45
 
@@ -51,7 +51,7 @@ In controller actions:
51
51
 
52
52
  #### Option 1: UI interface
53
53
 
54
- <img src="http://i.imgur.com/aeRlKv0.png" border="1">
54
+ <img src="http://i.imgur.com/p4lMIfo.png">
55
55
 
56
56
  Go to `/feature_gate` for a preconfigured page that lists all your gates and give you the ability to toggle them open or close.
57
57
 
@@ -1,3 +1,3 @@
1
1
  module FeatureGate
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module FeatureGateCleaner
2
2
  def self.clean(gate_name)
3
- matching_string = "FeatureGate::Manager.gate(\s*'#{gate_name}'\s*)"
4
- `grep -r -l "#{matching_string}" #{Dir.pwd}/app/views/ | while IFS= read -r file; do grep -v "#{matching_string}" "$file" > "$file".cleaned; mv "$file"{.cleaned,}; done`
3
+ matching_string = "FeatureGate::Manager.gate(\s*'#{gate_name}'\s*)|<%\s*end\s*#\s*#{gate_name}\s*%>"
4
+ `egrep -r -l "#{matching_string}" #{Dir.pwd}/app/views/ | while IFS= read -r file; do grep -v "#{matching_string}" "$file" > "$file".cleaned; mv "$file"{.cleaned,}; done`
5
5
 
6
6
  matching_string = "FeatureGate::Manager.gate_page(\s*'#{gate_name}'\s*)"
7
7
  `grep -r -l "#{matching_string}" #{Dir.pwd}/app/controllers/ | while IFS= read -r file; do grep -v "#{matching_string}" "$file" > "$file".cleaned; mv "$file"{.cleaned,}; done`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_gate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiffany Huang