ruby-conf 2.7.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.7.0
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{\\.rc \\.rbc \\.rb \\.config \\.conf \\.rbcnf \\.rconf rbconf rbconfig rubyconf rubyconfig ruby-conf ruby-config}
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 method_missing(name, *args, &block)
37
- __rc_reload
38
- if @@conf.nil?
39
- Find.find('.') do |path|
40
- next unless @@conf.nil? && path =~ /(?:#{EXTENTIONS.join('|')})$/
41
- if !!(path =~ /(?:#{EXTENTIONS.join('|')})$/) && !!(File.read(path) =~ /^\s*\#\s*\:\s*ruby-conf\s*(?::.*)?$/mi)
42
- break if __rc_load(path)
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.0"
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"]
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  #this has the ruby-conf comment directive should be auto-loaded when required
4
- #:ruby-conf
4
+ #% ruby-conf
5
5
 
6
6
  RubyConf.define do
7
7
  ident "FOUND AND LOADED BASIC CONFIG {{VALUE}}"
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.0
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: -4574071964254101626
118
+ hash: 1238069024117375417
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements: