configru 0.4.0 → 0.4.1

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/ChangeLog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.4.1 (27 February 2012)
4
+
5
+ * Fix: Only replace underscores with hyphens in keys if the key does not exist
6
+
3
7
  ## 0.4.0 (8 January 2012)
4
8
 
5
9
  * Added `cascade 'c', ['a', 'b']` form
@@ -19,8 +19,8 @@ module Configru
19
19
 
20
20
  def [](key)
21
21
  key = key.to_s if key.is_a?(Symbol)
22
- # Allow for accessing keys with hypens using underscores
23
- key = key.gsub('_', '-')
22
+ # Allow for accessing keys with hyphens using underscores
23
+ key = key.gsub('_', '-') unless self.include?(key)
24
24
  # For some reason, super(key) returns {} instead of nil when the key
25
25
  # doesn't exist :\
26
26
  super(key) if self.include?(key)
@@ -1,3 +1,3 @@
1
1
  module Configru
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
data/lib/configru.rb CHANGED
@@ -72,6 +72,10 @@ module Configru
72
72
  @loaded_files
73
73
  end
74
74
 
75
+ def self.raw
76
+ @config
77
+ end
78
+
75
79
  def self.[](key)
76
80
  @config[key]
77
81
  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: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-08 00:00:00.000000000 Z
12
+ date: 2012-02-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Versatile configuration file loader
15
15
  email: