ruby-conf 2.7.1 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  group :development, :test do
4
+ gem "awesome_print"
4
5
  gem "rspec"
5
6
  gem "rr"
6
7
  gem "yard"
@@ -1,6 +1,7 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ awesome_print (1.1.0)
4
5
  diff-lcs (1.1.3)
5
6
  git (1.2.5)
6
7
  jeweler (1.8.4)
@@ -27,6 +28,7 @@ PLATFORMS
27
28
  ruby
28
29
 
29
30
  DEPENDENCIES
31
+ awesome_print
30
32
  jeweler
31
33
  rr
32
34
  rspec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 2.7.2
@@ -200,8 +200,9 @@ module RubyConf
200
200
  if args.empty?
201
201
  modifier == '?' ? !!self[name] : self[name]
202
202
  else
203
- args = args.size == 1 ? args.first : args
204
- (@__rc_locked && __rc_attributes[name.to_sym].is_a?(Proc)) ? self[name, *args] : self[name] = args
203
+ arg = args.size == 1 ? args.first : args
204
+
205
+ (@__rc_locked && __rc_attributes[name.to_sym].is_a?(Proc)) ? self[name, *args] : self[name] = arg
205
206
  end
206
207
  end
207
208
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ruby-conf"
8
- s.version = "2.7.1"
8
+ s.version = "2.7.2"
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 & Mason"]
12
- s.date = "2013-01-17"
12
+ s.date = "2013-01-23"
13
13
  s.description = "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 = "blazingpair@blazingcloud.net"
15
15
  s.extra_rdoc_files = [
@@ -44,17 +44,20 @@ Gem::Specification.new do |s|
44
44
  s.specification_version = 3
45
45
 
46
46
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
+ s.add_development_dependency(%q<awesome_print>, [">= 0"])
47
48
  s.add_development_dependency(%q<rspec>, [">= 0"])
48
49
  s.add_development_dependency(%q<rr>, [">= 0"])
49
50
  s.add_development_dependency(%q<yard>, [">= 0"])
50
51
  s.add_development_dependency(%q<jeweler>, [">= 0"])
51
52
  else
53
+ s.add_dependency(%q<awesome_print>, [">= 0"])
52
54
  s.add_dependency(%q<rspec>, [">= 0"])
53
55
  s.add_dependency(%q<rr>, [">= 0"])
54
56
  s.add_dependency(%q<yard>, [">= 0"])
55
57
  s.add_dependency(%q<jeweler>, [">= 0"])
56
58
  end
57
59
  else
60
+ s.add_dependency(%q<awesome_print>, [">= 0"])
58
61
  s.add_dependency(%q<rspec>, [">= 0"])
59
62
  s.add_dependency(%q<rr>, [">= 0"])
60
63
  s.add_dependency(%q<yard>, [">= 0"])
@@ -13,6 +13,19 @@ describe RubyConf do
13
13
  subject { RubyConf }
14
14
 
15
15
  describe "lambda arguments" do
16
+ it "handles hash arguments properly" do
17
+ RubyConf.define :LambdaHashes do
18
+ key ->(options) {
19
+ options
20
+ }
21
+ end
22
+
23
+ LambdaHashes.key(hash: "value").should == {hash: "value"}
24
+ LambdaHashes.key("non hash").should == "non hash"
25
+ LambdaHashes.key(["array", "values"]).should == ["array", "values"]
26
+
27
+ end
28
+
16
29
  it "accepts arguments for lambdas" do
17
30
  RubyConf.define("lambda args", :as => :Hannibal) do
18
31
  silence_of_the lambda { |clarise, fava, chianti|
@@ -1,5 +1,6 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'ap'
3
4
  require 'rspec'
4
5
  require 'rr'
5
6
  require 'ruby-conf'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-conf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-17 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: awesome_print
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: rspec
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
131
  version: '0'
116
132
  segments:
117
133
  - 0
118
- hash: 1238069024117375417
134
+ hash: 3704553343926456777
119
135
  required_rubygems_version: !ruby/object:Gem::Requirement
120
136
  none: false
121
137
  requirements: