konfa 0.1.1 → 0.2.0
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/konfa.rb +8 -3
- metadata +19 -40
data/lib/konfa.rb
CHANGED
@@ -24,13 +24,15 @@ module Konfa
|
|
24
24
|
|
25
25
|
def store(key, value)
|
26
26
|
key = key.to_sym
|
27
|
-
|
28
|
-
|
27
|
+
if self.configuration.has_key? key
|
28
|
+
self.configuration[key] = value.to_s
|
29
|
+
else
|
30
|
+
self.on_key_missing(key, value)
|
31
|
+
end
|
29
32
|
end
|
30
33
|
|
31
34
|
public
|
32
35
|
|
33
|
-
|
34
36
|
#
|
35
37
|
# The following methods should be overridden and used to configure the
|
36
38
|
# configuration class
|
@@ -44,6 +46,9 @@ module Konfa
|
|
44
46
|
{}
|
45
47
|
end
|
46
48
|
|
49
|
+
def on_key_missing(key, value)
|
50
|
+
raise UnsupportedVariableError.new(key)
|
51
|
+
end
|
47
52
|
|
48
53
|
#
|
49
54
|
# The following methods provides the interface to this class
|
metadata
CHANGED
@@ -1,68 +1,47 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: konfa
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 1
|
10
|
-
version: 0.1.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Gunnar Hansson
|
14
9
|
- Avidity
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2014-03-24 00:00:00 +01:00
|
20
|
-
default_executable:
|
13
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
21
14
|
dependencies: []
|
22
|
-
|
23
15
|
description: Helps you avoid common pitfalls when dealing with app config
|
24
16
|
email: code@avidiy.se
|
25
17
|
executables: []
|
26
|
-
|
27
18
|
extensions: []
|
28
|
-
|
29
19
|
extra_rdoc_files: []
|
30
|
-
|
31
|
-
files:
|
20
|
+
files:
|
32
21
|
- lib/konfa.rb
|
33
|
-
has_rdoc: true
|
34
22
|
homepage: http://github.com/avidity/konfa
|
35
|
-
licenses:
|
23
|
+
licenses:
|
36
24
|
- MIT
|
37
25
|
post_install_message:
|
38
26
|
rdoc_options: []
|
39
|
-
|
40
|
-
require_paths:
|
27
|
+
require_paths:
|
41
28
|
- lib
|
42
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
30
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
|
48
|
-
|
49
|
-
- 0
|
50
|
-
version: "0"
|
51
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
36
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
60
41
|
requirements: []
|
61
|
-
|
62
42
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.
|
43
|
+
rubygems_version: 1.8.23
|
64
44
|
signing_key:
|
65
45
|
specification_version: 3
|
66
46
|
summary: Application configuration
|
67
47
|
test_files: []
|
68
|
-
|