config-factory 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d5038da1c70870d65c32c8248c705cfe4e6a039
4
- data.tar.gz: 7c2a3b6ff820e82e4b7865fee30ce032d9d34c70
3
+ metadata.gz: 6df018c1887575a05ae4c5b4211cf748e72d2a9b
4
+ data.tar.gz: 15fb840702445da9f2869ebb50a7af22df1ddf68
5
5
  SHA512:
6
- metadata.gz: d21a5a42dd50543084d31288f66996624c9c06e851065cd04f8d2c31ef8e4f3a648a84a04e066f315041e23d2346158700b6ed3bfe0f755b71654f7eae0379e3
7
- data.tar.gz: f329a4fec0d2a1f26c364a3c9515018ad8fcc9a2dda3541f425162a7aa979061cb5e17491801d47b20928dad3feac3f5b27afafeb4dc4cffb60dcadf07c09a1e
6
+ metadata.gz: b647964bd6cca0bfd4f04996da07593ff502b6b99e12aaf145cb3d64296b26e5a85ffc5f2c461efc7fd6d7273cb87746dddb8fd108c0e0005aaa57da9aacd588
7
+ data.tar.gz: e4d29e97e650c279524a0f3c24984488016060a53c9b3b9446fd46270c8ba81057a3e1ca301d2675ea435da4dd1e65cff06c95cd0ee472feb02f3817aa0a194b
@@ -0,0 +1,11 @@
1
+ ## 0.0.3 (5 January 2016)
2
+
3
+ - Additional error checking in `Environment#load_file` and `Environments#load_file`
4
+
5
+ ## 0.0.2 (5 January 2016)
6
+
7
+ - Additional error checking in `Environment#initialize()`
8
+
9
+ ## 0.0.1 (5 January 2016)
10
+
11
+ - Initial release
@@ -16,6 +16,7 @@ module Config
16
16
 
17
17
  def self.load_file(path)
18
18
  hash = YAML.load_file(path)
19
+ fail IOError, "Unable to load YAML file #{path}" unless hash && hash.is_a?(Hash)
19
20
  load_hash(hash)
20
21
  end
21
22
 
@@ -26,12 +27,12 @@ module Config
26
27
  private
27
28
 
28
29
  def name=(v)
29
- fail ArgumentError, 'Environment name must be a symbol' unless v && v.is_a?(Symbol)
30
+ fail ArgumentError, "Environment name #{v} must be a symbol" unless v && v.is_a?(Symbol)
30
31
  @name = v
31
32
  end
32
33
 
33
34
  def configs=(v)
34
- fail ArgumentError, 'Configs must be a hash' unless v && v.respond_to?(:[])
35
+ fail ArgumentError, "Environment configs #{v} must be a hash" unless v && v.is_a?(Hash)
35
36
  @configs = v
36
37
  end
37
38
 
@@ -10,6 +10,7 @@ module Config
10
10
 
11
11
  def self.load_file(path)
12
12
  hash = YAML.load_file(path)
13
+ fail IOError, "Unable to load YAML file #{path}" unless hash && hash.is_a?(Hash)
13
14
  load_hash(hash)
14
15
  end
15
16
 
@@ -4,7 +4,7 @@ module Config
4
4
  NAME = 'config-factory'
5
5
 
6
6
  # The version of this gem
7
- VERSION = '0.0.2'
7
+ VERSION = '0.0.3'
8
8
 
9
9
  # The copyright notice for this gem
10
10
  COPYRIGHT = 'Copyright (c) 2015 The Regents of the University of California'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Moles
@@ -106,6 +106,7 @@ files:
106
106
  - ".rubocop.yml"
107
107
  - ".ruby-version"
108
108
  - ".travis.yml"
109
+ - CHANGES.md
109
110
  - Gemfile
110
111
  - LICENSE.md
111
112
  - README.md