mystic 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- data/lib/mystic.rb +2 -2
- 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: a973cbbc63678d2696964dbcb54892c5ec5bfa35
|
|
4
|
+
data.tar.gz: 26a6ed4f17e3dce193ce7e3fbbd366f4c648014c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a6c3350a6dfb06f75a45022a2aa0f9797e9483336b8522c8329ac71912d11896d960b49f676604f71bfbd51e27cc5841d39742214fa1b07fc9f2a9fefc8641eb
|
|
7
|
+
data.tar.gz: 1abe0eb03af85781c9ae40d3b6429b92133249fc0fa990d7c1aacff5a3578c2659aa29db63846f663132d1d4f3c07b6c6fc96b9c792781a4e16e37f5cda3932b
|
data/lib/mystic.rb
CHANGED
|
@@ -24,8 +24,8 @@ module Mystic
|
|
|
24
24
|
def connect(env="")
|
|
25
25
|
load_env
|
|
26
26
|
@@env = (env || ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development").to_s
|
|
27
|
-
|
|
28
|
-
db_yml = YAML.
|
|
27
|
+
yaml = root.join("config","database.yml").read
|
|
28
|
+
db_yml = YAML.load(yaml) rescue YAML.load(ERB.new(yaml).result) # Heroku uses ERB here because rails makes assumptions
|
|
29
29
|
|
|
30
30
|
raise EnvironmentError, "Environment '#{@@env}' doesn't exist." unless db_yml.member? @@env
|
|
31
31
|
|