flagon 1.0.4 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/flagon/inspector.rb +8 -1
- data/lib/flagon.rb +5 -0
- metadata +2 -2
data/lib/flagon/inspector.rb
CHANGED
@@ -7,7 +7,7 @@ module Flagon
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def enabled?(flag_name)
|
10
|
-
|
10
|
+
return false unless exists?(flag_name)
|
11
11
|
get_flag(flag_name)
|
12
12
|
end
|
13
13
|
|
@@ -17,6 +17,13 @@ module Flagon
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def ensure_flags_exist(*flags)
|
21
|
+
missing_flags = flags.select do |flag_name|
|
22
|
+
!exists?(flag_name)
|
23
|
+
end
|
24
|
+
raise FlagMissing, "The following flags are missing: #{missing_flags.join(', ')}" unless missing_flags.empty?
|
25
|
+
end
|
26
|
+
|
20
27
|
class FlagMissing < Exception
|
21
28
|
end
|
22
29
|
|
data/lib/flagon.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flagon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A gem for managing feature flags either with environemnt variables or
|
15
15
|
config files
|