feature_gate 0.2.0 → 0.2.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e028b250e9b446f23d62727e42ef9dfae7513c14
|
4
|
+
data.tar.gz: 6ab1755c10fbff3f55f71e3ac4b6ac82a0500b5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a51295ff435db9879106f71627ee734375f0095c7236a5283b35d4ce401ebee63960b961e05754811012a1fed97a92bb25fd6dcd81ffff11fb64745591d46ad8
|
7
|
+
data.tar.gz: 96f0fdc56b7b782ef1b355f35acce49969600c8920831b474f1baecee290b46f02600e9314bfbc6d804c911b2a8240a757c0d8ed5e5c346acbbd872df13a2e48
|
data/README.md
CHANGED
@@ -34,8 +34,7 @@ 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
|
-
To gate a part of a page:
|
38
|
-
In view files (add `# gate-name` after `end` to allow the cleaner executable to remove this line when cleaning the gate out of the files):
|
37
|
+
To gate a part of a page (add `# gate-name` after `end` to allow the cleaner executable to remove this line when cleaning the gate out of the files):
|
39
38
|
|
40
39
|
<% FeatureGate::Manager.gate('gate-name') do %>
|
41
40
|
<h1>This is my gated content</h1>
|
@@ -43,7 +42,6 @@ In view files (add `# gate-name` after `end` to allow the cleaner executable to
|
|
43
42
|
<% end # gate-name %>
|
44
43
|
|
45
44
|
To gate an entire page:
|
46
|
-
In controller actions:
|
47
45
|
|
48
46
|
def index
|
49
47
|
FeatureGate::Manager.gate_page('gate-name') # 404s if gate is closed
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
5
5
|
<title>FeatureGate</title>
|
6
6
|
<%= stylesheet_link_tag 'feature_gate/application.scss' %>
|
7
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= javascript_include_tag 'feature_gate/application.js', 'data-turbolinks-track' => true %>
|
8
8
|
<%= csrf_meta_tags %>
|
9
9
|
</head>
|
10
10
|
<body>
|
data/lib/feature_gate/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiffany Huang
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- Gemfile.lock
|
79
79
|
- LICENSE
|
80
80
|
- README.md
|
81
|
+
- app/assets/javascripts/feature_gate/application.js
|
81
82
|
- app/assets/stylesheets/feature_gate/application.scss.css
|
82
83
|
- app/controllers/feature_gate/gated_features_controller.rb
|
83
84
|
- app/models/feature_gate/gated_feature.rb
|