autoconfig 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. data/lib/autoconfig.rb +2 -1
  2. metadata +3 -3
data/lib/autoconfig.rb CHANGED
@@ -15,7 +15,8 @@ String.send(:include, StringCamelize) unless String.instance_methods.include?("c
15
15
 
16
16
  module AutoConfig
17
17
  def self.root
18
- ENV['AUTOCONFIG_ROOT'] || ENV['APP_ROOT'] || (rails? && Rails.root) || base_dir
18
+ rails_root = (rails? && (Rails.root || File.expand_path('../', ENV['BUNDLE_GEMFILE'])))
19
+ ENV['AUTOCONFIG_ROOT'] || ENV['APP_ROOT'] || rails_root || base_dir
19
20
  end
20
21
 
21
22
  def self.pattern
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - tjbladez