dionysus 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/dionysus.gemspec +1 -1
- data/lib/dionysus/configuration.rb +3 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/dionysus.gemspec
CHANGED
@@ -141,7 +141,7 @@ class Configuration
|
|
141
141
|
# 2) there are explicit keys defined
|
142
142
|
# 3) there is a default set of arguments
|
143
143
|
def _hard_keys?( defaults, args )
|
144
|
-
if
|
144
|
+
if [false, true].include?(args.first)
|
145
145
|
args.shift
|
146
146
|
else
|
147
147
|
args.any? or (defaults and defaults.any?)
|
@@ -153,7 +153,7 @@ class Configuration
|
|
153
153
|
# array.
|
154
154
|
def _normalize_hard_keys( defaults, keys )
|
155
155
|
returning [] do |keys_|
|
156
|
-
(keys + defaults.keys).uniq.collect {|
|
156
|
+
(keys + defaults.keys).uniq.collect {|key_| key_.to_s}.sort.each do |key|
|
157
157
|
raise ArgumentError, "Invalid key: '#{key}'" unless valid_key?(key)
|
158
158
|
keys_ << _normalize_key(key)
|
159
159
|
end
|
@@ -184,7 +184,7 @@ class Configuration
|
|
184
184
|
if allowed_key?(key) and !block_given?
|
185
185
|
if setter and args.length == 1
|
186
186
|
return set(key, args.first)
|
187
|
-
elsif
|
187
|
+
elsif key and !setter and args.empty?
|
188
188
|
return get(key)
|
189
189
|
end
|
190
190
|
end
|