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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mystic.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea84a1b5267bc0de695187a5348c8590afb2dc14
4
- data.tar.gz: c3c1f8d54a10ad428ab1b651adab723b882924c2
3
+ metadata.gz: a973cbbc63678d2696964dbcb54892c5ec5bfa35
4
+ data.tar.gz: 26a6ed4f17e3dce193ce7e3fbbd366f4c648014c
5
5
  SHA512:
6
- metadata.gz: 2eba931f02fd1de45406618426314017961c41c7a8d255656596f993bd48db2c50f9d5e3f2e6b5cced5a327d952e4d2e64b5d7b3f7b371baaedf2444607af3f6
7
- data.tar.gz: 57b7543a7d8abc2a1c673ab1f813ac3ec1a0b07aed4672ede1c3dd1be939697d0324bc59f270e0ea31ce3969d20e08dd57da7565bdfa71348b9b3a4f7cb2bd0e
6
+ metadata.gz: a6c3350a6dfb06f75a45022a2aa0f9797e9483336b8522c8329ac71912d11896d960b49f676604f71bfbd51e27cc5841d39742214fa1b07fc9f2a9fefc8641eb
7
+ data.tar.gz: 1abe0eb03af85781c9ae40d3b6429b92133249fc0fa990d7c1aacff5a3578c2659aa29db63846f663132d1d4f3c07b6c6fc96b9c792781a4e16e37f5cda3932b
@@ -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
- path = root.join("config","database.yml").to_s
28
- db_yml = YAML.load_file path
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mystic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathaniel Symer