autoconfig 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. data/lib/autoconfig.rb +6 -1
  2. metadata +3 -3
@@ -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(/database/)
54
+ next if name.match(ignored_filenames)
50
55
 
51
56
  config = YAML.load_file(file)
52
57
  app_config = config['common'] || {}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoconfig
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - tjbladez