configs 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 (3) hide show
  1. data/lib/configs.rb +6 -2
  2. data/lib/configs/version.rb +1 -1
  3. metadata +7 -6
data/lib/configs.rb CHANGED
@@ -2,7 +2,11 @@ require "configs/version"
2
2
  require "configs/railtie" if defined? Rails
3
3
 
4
4
  module Configs
5
- class NotFound < StandardError; end
5
+ class NotFound < StandardError;
6
+ def initialize(name, env)
7
+ super "could not find #{name} settings for :#{env} environment"
8
+ end
9
+ end
6
10
 
7
11
  class << self
8
12
 
@@ -40,7 +44,7 @@ module Configs
40
44
  yml_file_with_key("#{name}", environment) ||
41
45
  yml_file("#{name}/default") ||
42
46
  yml_file_with_key("#{name}", 'default') ||
43
- raise(NotFound)
47
+ raise(NotFound.new(name, environment))
44
48
  end
45
49
 
46
50
  def yml_file(name)
@@ -1,3 +1,3 @@
1
1
  module Configs
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-10 00:00:00.000000000 Z
12
+ date: 2012-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70229314323460 !ruby/object:Gem::Requirement
16
+ requirement: &70185842205240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>'
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70229314323460
24
+ version_requirements: *70185842205240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: test-unit
27
- requirement: &70229314803880 !ruby/object:Gem::Requirement
27
+ requirement: &70185842203740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70229314803880
35
+ version_requirements: *70185842203740
36
36
  description: Easy (easier?) management of config/*.yml files. Defines a lookup priority
37
37
  for the current environment's settings.
38
38
  email:
@@ -79,3 +79,4 @@ summary: Easy (easier?) management of config/*.yml files.
79
79
  test_files:
80
80
  - test/configs_test.rb
81
81
  - test/test_helper.rb
82
+ has_rdoc: