flip 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,7 @@
17
17
  definition
18
18
  facade
19
19
  feature_set
20
+ forbidden
20
21
  }.each { |name| require "flip/#{name}" }
21
22
 
22
23
  require "flip/engine" if defined?(Rails)
@@ -14,7 +14,7 @@ module Flip
14
14
  end
15
15
 
16
16
  def flip_feature_disabled key
17
- # TODO: handle this with a 404
17
+ raise Flip::Forbidden.new(key)
18
18
  end
19
19
 
20
20
  end
@@ -0,0 +1,7 @@
1
+ module Flip
2
+ class Forbidden < StandardError
3
+ def initialize(key)
4
+ super("requires :#{key} feature")
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Flip
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70108786050000 !ruby/object:Gem::Requirement
16
+ requirement: &70134752968140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70108786050000
24
+ version_requirements: *70134752968140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: i18n
27
- requirement: &70108786049300 !ruby/object:Gem::Requirement
27
+ requirement: &70134752967220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70108786049300
35
+ version_requirements: *70134752967220
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70108786048500 !ruby/object:Gem::Requirement
38
+ requirement: &70134752966320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.5'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70108786048500
46
+ version_requirements: *70134752966320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70108786048060 !ruby/object:Gem::Requirement
49
+ requirement: &70134752965900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70108786048060
57
+ version_requirements: *70134752965900
58
58
  description: Declarative API for specifying features, switchable in declaration, database
59
59
  and cookies.
60
60
  email:
@@ -86,6 +86,7 @@ files:
86
86
  - lib/flip/engine.rb
87
87
  - lib/flip/facade.rb
88
88
  - lib/flip/feature_set.rb
89
+ - lib/flip/forbidden.rb
89
90
  - lib/flip/version.rb
90
91
  - lib/generators/flip/install/install_generator.rb
91
92
  - lib/generators/flip/migration/USAGE