construct 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +5 -0
  2. data/lib/construct.rb +7 -2
  3. metadata +6 -4
data/README CHANGED
@@ -99,3 +99,8 @@ operate on the class schema. When you create an instance of that class, the clas
99
99
 
100
100
  Problem solved. Now get back to having fun instead of worrying about
101
101
  configuration!
102
+
103
+ Contributors
104
+ ------------
105
+ Kyle Kingsbury <aphyr@aphyr.com>
106
+ Spencer Miles <spencer@vodpod.com>
data/lib/construct.rb CHANGED
@@ -3,7 +3,7 @@ class Construct
3
3
  # Ruby and humans with text editors.
4
4
 
5
5
  APP_NAME = 'Construct'
6
- APP_VERSION = '0.1.3'
6
+ APP_VERSION = '0.1.4'
7
7
  APP_AUTHOR = 'Kyle Kingsbury'
8
8
  APP_EMAIL = 'aphyr@aphyr.com'
9
9
  APP_URL = 'http://aphyr.com'
@@ -112,7 +112,12 @@ class Construct
112
112
  @data.keys | @schema.keys
113
113
  end
114
114
 
115
- def load(str)
115
+ def load(yaml)
116
+ data = YAML::load(yaml)
117
+
118
+ data.each do |key, value|
119
+ self[key] = value
120
+ end
116
121
  end
117
122
 
118
123
  def method_missing(meth, *args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: construct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kingsbury
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-23 00:00:00 -05:00
12
+ date: 2009-11-11 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -27,6 +27,8 @@ files:
27
27
  - README
28
28
  has_rdoc: true
29
29
  homepage: http://aphyr.com
30
+ licenses: []
31
+
30
32
  post_install_message:
31
33
  rdoc_options: []
32
34
 
@@ -47,9 +49,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
49
  requirements: []
48
50
 
49
51
  rubyforge_project: construct
50
- rubygems_version: 1.3.1
52
+ rubygems_version: 1.3.5
51
53
  signing_key:
52
- specification_version: 2
54
+ specification_version: 3
53
55
  summary: Extensible, persistent, structured configuration for Ruby.
54
56
  test_files: []
55
57