ruby-conf 2.7.0 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ruby-conf.rb +12 -9
- data/ruby-conf.gemspec +1 -1
- data/spec/lib/test_conf.rb.tmpl +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.1
|
data/lib/ruby-conf.rb
CHANGED
@@ -12,7 +12,7 @@ module RubyConf
|
|
12
12
|
def self.out(*objs) self.puts($stdout, *objs) end
|
13
13
|
|
14
14
|
class Loader < BasicObject
|
15
|
-
EXTENTIONS = %w{
|
15
|
+
EXTENTIONS = %w{rc rb config conf rbcnf rbconf rbconfig rubyconf rubyconfig ruby-conf ruby-config}
|
16
16
|
|
17
17
|
@@conf = @@path = @@mtime = @@md5 = nil
|
18
18
|
|
@@ -33,16 +33,19 @@ module RubyConf
|
|
33
33
|
__rc_load(@@path)
|
34
34
|
end
|
35
35
|
end
|
36
|
-
def
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
36
|
+
def __rc_autoload
|
37
|
+
Find.find('.') do |path|
|
38
|
+
next unless @@conf.nil? && path =~ /(?:^|\.)(?:#{EXTENTIONS.join('|')})$/
|
39
|
+
if (path =~ /(?:^|\.)(?:#{EXTENTIONS.join('|')})$/) && (File.read(path) =~ /^\s*\#\s*[%:=>&!;-]\s*ruby-conf\s*(?::(.*))?$/mi)
|
40
|
+
options = $1
|
41
|
+
RubyConf.err "Don't know what to do with options yet, you can have these back: #{options}" if options
|
42
|
+
break if __rc_load(path)
|
44
43
|
end
|
45
44
|
end
|
45
|
+
end
|
46
|
+
def method_missing(name, *args, &block)
|
47
|
+
__rc_reload
|
48
|
+
__rc_autoload if @@conf.nil?
|
46
49
|
@@conf.__send__(name, *args, &block)
|
47
50
|
end
|
48
51
|
def to_s()
|
data/ruby-conf.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
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.1"
|
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"]
|
data/spec/lib/test_conf.rb.tmpl
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.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
segments:
|
117
117
|
- 0
|
118
|
-
hash:
|
118
|
+
hash: 1238069024117375417
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
none: false
|
121
121
|
requirements:
|