api-harvester 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/harvester/settings.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 392f9d5ffb1d1ed01363aa11dbb1d297b4e49d17
|
4
|
+
data.tar.gz: 8f9c3d9e5d2d87d2cb381ea4df527256c2c8a94c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c64c334957112dd5d9ddad0d4b77e315a2676677185087f49e385bd3b760511699702376540a19d50256b8d8bb7eb3ac23ee0ede7f455bac015116de70ce271
|
7
|
+
data.tar.gz: aa6177229f062988cdfe041ff455f4fac8beb0b281e5fe518206b8f19da619a660031e0647a8c8e01ea16d817c217f273a097b67a2a36fb3c4add248897f80cc
|
data/lib/harvester/settings.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
require 'settingslogic'
|
2
2
|
require 'terminal-announce'
|
3
3
|
class Settings < Settingslogic
|
4
|
-
|
4
|
+
config_paths = %w(/etc /usr/local/etc ~/.config . ../)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
config_paths.each do |config_path|
|
7
|
+
config_file = File.expand_path "#{ config_path }/harvester.yaml"
|
8
|
+
source config_file if File.exist? config_file
|
9
|
+
end
|
10
10
|
|
11
|
-
|
11
|
+
load!
|
12
12
|
rescue Errno::ENOENT
|
13
|
-
|
14
|
-
|
13
|
+
Announce.failure "Unable to locate configuration in #{ config_paths }."
|
14
|
+
abort
|
15
15
|
end
|