configru 3.5.0 → 3.6.0

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: 411032b2676edb0558982ceeeba01327afa061ea
4
- data.tar.gz: e4cdc8a16b7d93d38fea32109f4f63c5470a2137
3
+ metadata.gz: 8b5f0f857da8052614a1d487fb7824cb3973d9a2
4
+ data.tar.gz: f98a1bf455392b879de1c8a02be559610f8aa984
5
5
  SHA512:
6
- metadata.gz: c97c37b22cf0bf4e28bd076970b82d6a325cdb85a68d7312c821fcd747c943ac007fbb0650e0138c7ba33fd77c568b48e3010f85900bd540804b54db719533bb
7
- data.tar.gz: 424fcc556bd4f9f42694db51fed76673153c0dc0ce4cf8ee9f6f4a095ebd27b819b58945f4751640be76980ceb39cebceac09418fd3afea37cb940c351955f0c
6
+ metadata.gz: b21c6f07ed6aaad38c0289cb71221fd2778daa2e159e5b1d5a84e2fee74651ac626d19d41fb89a25729c181ff46409a4f946140544a7a2de66203b2f7aec9213
7
+ data.tar.gz: ea5c445f029f2223aa70987cfc3a2b2ff03c264b80dae92d8213097fac3370fc9fc3b55048f99e2410e2f7f94520ce203d6a475d3691f687a7f57faffad63ff9
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.6.0 (10 October 2013)
4
+
5
+ * Added `Configru.config` to access global `Config` object
6
+ * Modified inspect for `Config` to be different from `Hash`
7
+
3
8
  ## 3.5.0 (9 October 2013)
4
9
 
5
10
  * Treat `nil` as being the correct type
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- configru (3.5.0)
4
+ configru (3.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -7,7 +7,7 @@ YAML configuration file loader
7
7
  Install the gem or add it to your `Gemfile`:
8
8
 
9
9
  ```ruby
10
- gem 'configru', '~> 3.5.0'
10
+ gem 'configru', '~> 3.6.0'
11
11
  ```
12
12
 
13
13
  Next, require it and load a configuration:
@@ -225,6 +225,13 @@ The global configuration can also be reloaded in the same way:
225
225
  Configru.reload
226
226
  ```
227
227
 
228
+ Access to the underlying `Configru::Config` object of the global
229
+ configuration is provided:
230
+
231
+ ```ruby
232
+ Configru.config
233
+ ```
234
+
228
235
  # License
229
236
 
230
237
  Copyright © 2011-2013, Curtis McEnroe <programble@gmail.com>
@@ -1,6 +1,10 @@
1
1
  require 'configru/config'
2
2
 
3
3
  module Configru
4
+ def self.config
5
+ @config
6
+ end
7
+
4
8
  def self.load(*files, &block)
5
9
  @config = Config.new(*files, &block)
6
10
  end
@@ -28,6 +28,10 @@ module Configru
28
28
  load_group(@options, self, {}) if loaded_files.empty?
29
29
  end
30
30
 
31
+ def inspect
32
+ "#<#{self.class} #{super}>"
33
+ end
34
+
31
35
  private
32
36
 
33
37
  def load_file(file)
@@ -1,3 +1,3 @@
1
1
  module Configru
2
- VERSION = "3.5.0"
2
+ VERSION = "3.6.0"
3
3
  end
@@ -207,4 +207,9 @@ describe Configru::Config do
207
207
 
208
208
  foo.should == 2
209
209
  end
210
+
211
+ it 'inspects different than Hash' do
212
+ c = described_class.new { }
213
+ c.inspect.should_not == Hash.new.inspect
214
+ end
210
215
  end
@@ -8,4 +8,9 @@ describe Configru do
8
8
  Configru.example.should == 'example'
9
9
  expect { Configru.idonotexist }.to raise_error(NoMethodError)
10
10
  end
11
+
12
+ it 'allows access to underlying Config object' do
13
+ Configru.load { }
14
+ Configru.config.should be_a(Configru::Config)
15
+ end
11
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configru
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Curtis McEnroe