collins_auth 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/collins_auth.rb +3 -1
- metadata +1 -1
data/lib/collins_auth.rb
CHANGED
@@ -51,7 +51,9 @@ module Collins
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.read_config(config_file = nil)
|
54
|
-
|
54
|
+
home_config_file = File.join(ENV['HOME'], '.collins.yml') unless ENV['HOME'].nil?
|
55
|
+
|
56
|
+
config_file ||= [ENV['COLLINS_CLIENT_CONFIG'], home_config_file, '/etc/collins.yml', '/var/db/collins.yml'].compact.find do |config_file|
|
55
57
|
File.readable? config_file and File.size(config_file) > 0
|
56
58
|
end
|
57
59
|
|