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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25447912d81c33420156bf08bbbb30b1e82fb60f
4
- data.tar.gz: 329f735ba5dc4f9b79141be8e6f61e3e52320713
3
+ metadata.gz: 45a4018ac05510ebe69d7200b218d421f110adcc
4
+ data.tar.gz: 23d9f66c9d0236ed22bd6fe9cc8c8dcea59eed6e
5
5
  SHA512:
6
- metadata.gz: 39ba6d8717253a8b1780c59d0b31bed522ba0ce8408212d80e99c1f33a84f85e0d8ee19dc3cc3da69e69aedca8b8694c45dd113377dd25f028b89016096a7716
7
- data.tar.gz: f0267a9848aa22d6e43ecfbd8fadd90c0b8dce38572d1e13e6f20a0f8f94d4e2ec8016c3274f067765e62c9622c2bc8c28b2629e83455dd1cea9f99e823bbb43
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
- extend Flip::Declarable
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"
@@ -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}. Valid strategies are #{@strategies.keys}" }
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
@@ -1,3 +1,3 @@
1
1
  module Flip
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
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.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,8 +0,0 @@
1
- Description:
2
- Generates flip/features/index view template.
3
-
4
- Example:
5
- rails generate flip:views
6
-
7
- This will create:
8
- app/views/flip/features/index.html.erb
@@ -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>
@@ -1,8 +0,0 @@
1
- class Flip::ViewsGenerator < Rails::Generators::Base
2
- source_root File.expand_path('../templates', __FILE__)
3
-
4
- def copy_view_index_file
5
- copy_file "index.html.erb", "app/views/flip/features/index.html.erb"
6
- end
7
-
8
- end