ruby-conf 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.1.0
data/lib/ruby-conf.rb CHANGED
@@ -62,6 +62,7 @@ class RubyConf
62
62
  if options.has_key? :as
63
63
  Object.const_set(options[:as].to_s.to_sym, config)
64
64
  end
65
+ config
65
66
  end
66
67
 
67
68
  def self.method_missing(name, *args, &block)
data/ruby-conf.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruby-conf}
8
- s.version = "1.0.1"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Curtis Schofield & Hollin Wilkins"]
12
- s.date = %q{2012-01-25}
12
+ s.date = %q{2012-01-26}
13
13
  s.description = %q{rubyconf is a ruby configuration dsl that aims to make it simple to write and read configurations for ruby apps without a yaml or xml file}
14
14
  s.email = %q{blazingpair@blazingcloud.net}
15
15
  s.extra_rdoc_files = [
@@ -26,6 +26,20 @@ describe RubyConf do
26
26
  ::RailsDatabase.production[:password].should_not be_nil
27
27
  end
28
28
  end
29
+ it "returns a config" do
30
+ config = subject.define "config" do
31
+ something "hi"
32
+ end
33
+ config.something.should == "hi"
34
+ end
35
+ it "can be chained" do
36
+ subject.define "config", :as => :MyConfig do
37
+ love_song (RubyConf.define "love_song" do
38
+ title "in me all along"
39
+ end)
40
+ end
41
+ MyConfig.love_song.title.should == 'in me all along'
42
+ end
29
43
  it "defines a new configuration with a given name" do
30
44
  subject.define "thing" do end
31
45
  subject.should respond_to(:thing)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-conf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 0
9
8
  - 1
10
- version: 1.0.1
9
+ - 0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Curtis Schofield & Hollin Wilkins
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-25 00:00:00 -08:00
18
+ date: 2012-01-26 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency