autoconfig 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/autoconfig.rb +6 -1
- metadata +3 -3
data/lib/autoconfig.rb
CHANGED
@@ -39,6 +39,11 @@ module AutoConfig
|
|
39
39
|
File.dirname(File.expand_path(__FILE__))
|
40
40
|
end
|
41
41
|
|
42
|
+
def self.ignored_filenames
|
43
|
+
names = ENV['AUTOCONFIG_IGNORE'] ? "database|" + ENV['AUTOCONFIG_IGNORE'].gsub(/\s/,'|') : 'database'
|
44
|
+
Regexp.new(names)
|
45
|
+
end
|
46
|
+
|
42
47
|
files = Dir.glob(path)
|
43
48
|
|
44
49
|
begin
|
@@ -46,7 +51,7 @@ module AutoConfig
|
|
46
51
|
|
47
52
|
files.each do |file|
|
48
53
|
name = File.basename(file, '.yml')
|
49
|
-
next if name.match(
|
54
|
+
next if name.match(ignored_filenames)
|
50
55
|
|
51
56
|
config = YAML.load_file(file)
|
52
57
|
app_config = config['common'] || {}
|
metadata
CHANGED