konfa 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/konfa.rb +7 -2
  2. metadata +40 -19
@@ -76,8 +76,13 @@ module Konfa
76
76
  # load_file just returns "false" if it fails
77
77
 
78
78
  yaml_data = YAML.load_file(path)
79
- yaml_data.each do |variable, value|
80
- self.store(variable, value)
79
+
80
+ unless yaml_data.nil?
81
+ raise InitializationError.new("Bad YAML format, key/value pairs expected") unless yaml_data.kind_of?(Hash)
82
+
83
+ yaml_data.each do |variable, value|
84
+ self.store(variable, value)
85
+ end
81
86
  end
82
87
 
83
88
  after_initialize
metadata CHANGED
@@ -1,47 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: konfa
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Gunnar Hansson
9
14
  - Avidity
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2014-03-24 00:00:00.000000000 Z
18
+
19
+ date: 2014-03-24 00:00:00 +01:00
20
+ default_executable:
14
21
  dependencies: []
22
+
15
23
  description: Helps you avoid common pitfalls when dealing with app config
16
24
  email: code@avidiy.se
17
25
  executables: []
26
+
18
27
  extensions: []
28
+
19
29
  extra_rdoc_files: []
20
- files:
30
+
31
+ files:
21
32
  - lib/konfa.rb
33
+ has_rdoc: true
22
34
  homepage: http://github.com/avidity/konfa
23
- licenses:
35
+ licenses:
24
36
  - MIT
25
37
  post_install_message:
26
38
  rdoc_options: []
27
- require_paths:
39
+
40
+ require_paths:
28
41
  - lib
29
- required_ruby_version: !ruby/object:Gem::Requirement
42
+ required_ruby_version: !ruby/object:Gem::Requirement
30
43
  none: false
31
- requirements:
32
- - - ! '>='
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ hash: 3
48
+ segments:
49
+ - 0
50
+ version: "0"
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
52
  none: false
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
41
60
  requirements: []
61
+
42
62
  rubyforge_project:
43
- rubygems_version: 1.8.23
63
+ rubygems_version: 1.6.2
44
64
  signing_key:
45
65
  specification_version: 3
46
66
  summary: Application configuration
47
67
  test_files: []
68
+