correole 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/configuration.rb +3 -4
- data/lib/correole/version.rb +1 -1
- 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: bd23680d484c3a44bbd64e36a11ad473bda7953d
|
4
|
+
data.tar.gz: de2e5d476329234d2ab91e48ebb784edd442e59b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2bd2286ee6a39ed7abb65f86909dc54234ecd2bab9fdf1d3b72643fb08b4f05ebc3690257d5b09fae0a004fbf45ede5640993300296ae88221fbfebff589f42
|
7
|
+
data.tar.gz: 0eea183a91b61e868d30a2425568de437c939782cd49e8191e82a3321a90aa92a7c8205b07c83d68416b02f8e5bca2aea65fd9076305184b56858c7da79bd8ae
|
data/config/configuration.rb
CHANGED
@@ -2,7 +2,7 @@ DEFAULT_ENV = 'production'
|
|
2
2
|
DEFAULT_CONFIG_FILE = 'config.yml'
|
3
3
|
|
4
4
|
ENV['RACK_ENV'] ||= DEFAULT_ENV
|
5
|
-
ENV['CONFIG_FILE'] ||= DEFAULT_CONFIG_FILE
|
5
|
+
ENV['CONFIG_FILE'] ||= File.expand_path "../#{DEFAULT_CONFIG_FILE}", __FILE__
|
6
6
|
|
7
7
|
class Configuration
|
8
8
|
|
@@ -30,10 +30,9 @@ class Configuration
|
|
30
30
|
|
31
31
|
def self.load!
|
32
32
|
|
33
|
-
|
34
|
-
YAML.load_file(config_file)[ENV['RACK_ENV']].each_pair do |k, v|
|
33
|
+
YAML.load_file(ENV['CONFIG_FILE'])[ENV['RACK_ENV']].each_pair do |k, v|
|
35
34
|
ENV[k.upcase] ||= v.to_s rescue abort "Cannot load configuration key #{k}."
|
36
|
-
end rescue qputs "Could not load configuration file #{
|
35
|
+
end rescue qputs "Could not load configuration file #{ENV['CONFIG_FILE']}."
|
37
36
|
|
38
37
|
CONFIG_KEYS.each do |k|
|
39
38
|
case k
|
data/lib/correole/version.rb
CHANGED