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 +1 -0
- data/Gemfile.lock +2 -0
- data/VERSION +1 -1
- data/lib/ruby-conf.rb +3 -2
- data/ruby-conf.gemspec +5 -2
- data/spec/lib/ruby-conf_spec.rb +13 -0
- data/spec/spec_helper.rb +1 -0
- metadata +19 -3
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.2
|
data/lib/ruby-conf.rb
CHANGED
@@ -200,8 +200,9 @@ module RubyConf
|
|
200
200
|
if args.empty?
|
201
201
|
modifier == '?' ? !!self[name] : self[name]
|
202
202
|
else
|
203
|
-
|
204
|
-
|
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
|
data/ruby-conf.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ruby-conf"
|
8
|
-
s.version = "2.7.
|
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-
|
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"])
|
data/spec/lib/ruby-conf_spec.rb
CHANGED
@@ -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|
|
data/spec/spec_helper.rb
CHANGED
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.
|
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-
|
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:
|
134
|
+
hash: 3704553343926456777
|
119
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
136
|
none: false
|
121
137
|
requirements:
|