configr 0.9.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 1.0.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{configr}
8
- s.version = "0.9.0"
8
+ s.version = "1.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Josh Nesbitt"]
12
- s.date = %q{2010-03-01}
12
+ s.date = %q{2010-08-05}
13
13
  s.description = %q{Configr aims to provide a clean interface to configuring and reading a set of configuration values. The idea evolved from using a standard hash as a configuration store into a more elegant way to declare and read values from within a hash. }
14
14
  s.email = %q{josh@josh-nesbitt.net}
15
15
  s.extra_rdoc_files = [
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.homepage = %q{http://github.com/joshnesbitt/configr}
40
40
  s.rdoc_options = ["--charset=UTF-8"]
41
41
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.3.5}
42
+ s.rubygems_version = %q{1.3.6}
43
43
  s.summary = %q{An elegant approach to creating and accessing configuration values.}
44
44
  s.test_files = [
45
45
  "spec/lib/configuration_block_spec.rb",
@@ -1,10 +1,15 @@
1
1
  module Configr
2
2
  module HashExtensions
3
+
3
4
  def symbolize_keys!
5
+ _hash = {}
6
+
4
7
  each do |k, v|
5
8
  self.delete(k.to_s)
6
- self[k.to_sym] = v
9
+ _hash[k.to_sym] = v
7
10
  end
11
+
12
+ self.merge! _hash
8
13
  end
9
14
 
10
15
  def recursive_symbolize_keys!
@@ -56,5 +61,4 @@ end
56
61
 
57
62
  class Hash
58
63
  include Configr::HashExtensions
59
-
60
64
  end
@@ -101,7 +101,7 @@ Conceptually you could continue to nest configuration blocks as far as you wish.
101
101
 
102
102
  === Asserting key presence
103
103
 
104
- Sometimes when using configuration values you might want to assert whether the value exists before using it. Configr allows you to do this the #key_name? methods:
104
+ Sometimes when using configuration values you might want to assert whether the value exists before using it. Configr allows you to do this with the #key_name? syntax:
105
105
 
106
106
  puts configuration.example_one? # => true
107
107
  puts configuration.doesnt_exist? # => false
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ version: 1.0.0
5
10
  platform: ruby
6
11
  authors:
7
12
  - Josh Nesbitt
@@ -9,19 +14,23 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-01 00:00:00 +00:00
17
+ date: 2010-08-05 00:00:00 +01:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 2
30
+ - 9
23
31
  version: 1.2.9
24
- version:
32
+ type: :development
33
+ version_requirements: *id001
25
34
  description: "Configr aims to provide a clean interface to configuring and reading a set of configuration values. The idea evolved from using a standard hash as a configuration store into a more elegant way to declare and read values from within a hash. "
26
35
  email: josh@josh-nesbitt.net
27
36
  executables: []
@@ -63,18 +72,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
72
  requirements:
64
73
  - - ">="
65
74
  - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
66
77
  version: "0"
67
- version:
68
78
  required_rubygems_version: !ruby/object:Gem::Requirement
69
79
  requirements:
70
80
  - - ">="
71
81
  - !ruby/object:Gem::Version
82
+ segments:
83
+ - 0
72
84
  version: "0"
73
- version:
74
85
  requirements: []
75
86
 
76
87
  rubyforge_project:
77
- rubygems_version: 1.3.5
88
+ rubygems_version: 1.3.6
78
89
  signing_key:
79
90
  specification_version: 3
80
91
  summary: An elegant approach to creating and accessing configuration values.