flip2 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/flip.gemspec +1 -1
- data/lib/flip/feature_set.rb +1 -1
- data/lib/flip/version.rb +1 -1
- data/lib/{flip2.rb → flip.rb} +0 -0
- metadata +3 -6
- data/lib/generators/flip/views/USAGE +0 -8
- data/lib/generators/flip/views/templates/index.html.erb +0 -54
- data/lib/generators/flip/views/views_generator.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45a4018ac05510ebe69d7200b218d421f110adcc
|
4
|
+
data.tar.gz: 23d9f66c9d0236ed22bd6fe9cc8c8dcea59eed6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a70df17dbd497787153c24e56babe1fefdafe746991f443f70a0df58a4529b35c25707f27d245af950df3f464087324bf8fcf9aa0db766e8686c06282da7854
|
7
|
+
data.tar.gz: 5c92d3670f87ec71b4d1cfc9cdbb5959d6a12ac56c402805ba1aa0d95e6f7435b7834ddb207152beb510664534a509586da8ce64a5697f75e7c09ddff526ebf1
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ Declaring Features
|
|
46
46
|
```ruby
|
47
47
|
# This is the model class generated by rails g flip:install
|
48
48
|
class Feature < ActiveRecord::Base
|
49
|
-
|
49
|
+
include Flip::Declarable
|
50
50
|
|
51
51
|
# The recommended Flip strategy stack.
|
52
52
|
strategy Flip::CookieStrategy
|
data/flip.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = [""]
|
10
10
|
s.email = [""]
|
11
|
-
s.homepage = ""
|
11
|
+
s.homepage = "https://github.com/pda/flip"
|
12
12
|
s.summary = %q{A feature flipper for Rails web applications.}
|
13
13
|
s.description = %q{Declarative API for specifying features, switchable in declaration, database and cookies.}
|
14
14
|
s.license = "MIT"
|
data/lib/flip/feature_set.rb
CHANGED
@@ -15,7 +15,7 @@ module Flip
|
|
15
15
|
|
16
16
|
def initialize
|
17
17
|
@definitions = Hash.new { |_, k| raise "No feature declared with key #{k.inspect}" }
|
18
|
-
@strategies = Hash.new { |_, k| raise "No strategy named #{k}
|
18
|
+
@strategies = Hash.new { |_, k| raise "No strategy named #{k}" }
|
19
19
|
@default = false
|
20
20
|
end
|
21
21
|
|
data/lib/flip/version.rb
CHANGED
data/lib/{flip2.rb → flip.rb}
RENAMED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flip2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- app/views/flip/features/index.html.erb
|
109
109
|
- config/routes.rb
|
110
110
|
- flip.gemspec
|
111
|
+
- lib/flip.rb
|
111
112
|
- lib/flip/abstract_strategy.rb
|
112
113
|
- lib/flip/cacheable.rb
|
113
114
|
- lib/flip/controller_filters.rb
|
@@ -121,7 +122,6 @@ files:
|
|
121
122
|
- lib/flip/feature_set.rb
|
122
123
|
- lib/flip/forbidden.rb
|
123
124
|
- lib/flip/version.rb
|
124
|
-
- lib/flip2.rb
|
125
125
|
- lib/generators/flip/install/install_generator.rb
|
126
126
|
- lib/generators/flip/migration/USAGE
|
127
127
|
- lib/generators/flip/migration/migration_generator.rb
|
@@ -131,9 +131,6 @@ files:
|
|
131
131
|
- lib/generators/flip/model/templates/feature.rb
|
132
132
|
- lib/generators/flip/routes/USAGE
|
133
133
|
- lib/generators/flip/routes/routes_generator.rb
|
134
|
-
- lib/generators/flip/views/USAGE
|
135
|
-
- lib/generators/flip/views/templates/index.html.erb
|
136
|
-
- lib/generators/flip/views/views_generator.rb
|
137
134
|
- spec/abstract_strategy_spec.rb
|
138
135
|
- spec/cacheable_spec.rb
|
139
136
|
- spec/controller_filters_spec.rb
|
@@ -145,7 +142,7 @@ files:
|
|
145
142
|
- spec/feature_set_spec.rb
|
146
143
|
- spec/flip_spec.rb
|
147
144
|
- spec/spec_helper.rb
|
148
|
-
homepage:
|
145
|
+
homepage: https://github.com/pda/flip
|
149
146
|
licenses:
|
150
147
|
- MIT
|
151
148
|
metadata: {}
|
@@ -1,54 +0,0 @@
|
|
1
|
-
<div class="flip">
|
2
|
-
<h1>Feature Flippers</h1>
|
3
|
-
<table>
|
4
|
-
<thead>
|
5
|
-
<th class="name">Feature Name</th>
|
6
|
-
<th class="description">Description</th>
|
7
|
-
<th class="status">Status</th>
|
8
|
-
<% @p.strategies.each do |strategy| %>
|
9
|
-
<th>
|
10
|
-
<%= strategy.name %>
|
11
|
-
<span class="description"><%= strategy.description %></span>
|
12
|
-
</th>
|
13
|
-
<% end %>
|
14
|
-
<th>
|
15
|
-
Default
|
16
|
-
<span class="description">The system default when no strategies match.</span>
|
17
|
-
</th>
|
18
|
-
</thead>
|
19
|
-
<tbody>
|
20
|
-
<% @p.definitions.each do |definition| %>
|
21
|
-
<tr>
|
22
|
-
<td class="name"><%= definition.name %></td>
|
23
|
-
<td class="description"><%= definition.description %></td>
|
24
|
-
<%= content_tag :td, class: @p.status(definition) do %>
|
25
|
-
<%= @p.status definition %>
|
26
|
-
<% end %>
|
27
|
-
<% @p.strategies.each do |strategy| %>
|
28
|
-
<%= content_tag :td, class: @p.strategy_status(strategy, definition) || "pass" do %>
|
29
|
-
<%= @p.strategy_status strategy, definition %>
|
30
|
-
<% if strategy.switchable? %>
|
31
|
-
<%= form_tag(@p.switch_url(strategy, definition), method: :put) do %>
|
32
|
-
<% unless @p.strategy_status(strategy, definition) == "on" %>
|
33
|
-
<%= submit_tag "Switch On" %>
|
34
|
-
<% end %>
|
35
|
-
<% unless @p.strategy_status(strategy, definition) == "off" %>
|
36
|
-
<%= submit_tag "Switch Off" %>
|
37
|
-
<% end %>
|
38
|
-
<% end %>
|
39
|
-
<% unless @p.strategy_status(strategy, definition).blank? %>
|
40
|
-
<%= form_tag(@p.switch_url(strategy, definition), method: :delete) do %>
|
41
|
-
<%= submit_tag "Delete" %>
|
42
|
-
<% end %>
|
43
|
-
<% end %>
|
44
|
-
<% end %>
|
45
|
-
<% end %>
|
46
|
-
<% end %>
|
47
|
-
<%= content_tag :td, class: @p.default_status(definition) do %>
|
48
|
-
<%= @p.default_status definition %>
|
49
|
-
<% end %>
|
50
|
-
</tr>
|
51
|
-
<% end %>
|
52
|
-
</tbody>
|
53
|
-
</table>
|
54
|
-
</div>
|