Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Heroku compatability #23

Merged
merged 1 commit into from

4 participants

@hughkelsey

Heroku uses erb in the database.yml file they create, this leads to an error similar to:

'(/app/config/dossier.yml): mapping values are not allowed in this context at line 22 column 13'

This fixes that and still works with files that don't have ERB.

@coveralls

Coverage Status

Coverage remained the same when pulling 62c4bc5 on hughkelsey:heroku_config into 7a261a0 on adamhunter:master.

@coveralls

Coverage Status

Coverage remained the same when pulling 02010e3 on hughkelsey:heroku_config into 78629ea on adamhunter:master.

@JunichiIto

@hughkelsey Your version helped my deployment to Heroku. I hope it will be merged soon.

@adamhunter adamhunter commented on the diff
lib/dossier/configuration.rb
@@ -13,7 +13,7 @@ def initialize
private
def setup_client!
- @connection_options = YAML.load_file(@config_path)[Rails.env].symbolize_keys
+ @connection_options = YAML.load(ERB.new(File.read(@config_path)).result)[Rails.env].symbolize_keys
@adamhunter Owner

hey there. i am soo sorry it has taken me so long to get to this. quick question, do you think we should require 'erb' at the top along with the yaml require? other than that i'm ready to merge and push a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@adamhunter adamhunter merged commit 62936be into adamhunter:master
@adamhunter
Owner

I've merged it in and will add the require in on master. I'll be pushing a new version later today. Thanks again!

@adamhunter
Owner

released in 2.9.3, thanks again!

@hughkelsey

Thanks Adam - Great library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 17, 2013
  1. @hughkelsey
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/dossier/configuration.rb
View
2  lib/dossier/configuration.rb
@@ -13,7 +13,7 @@ def initialize
private
def setup_client!
- @connection_options = YAML.load_file(@config_path)[Rails.env].symbolize_keys
+ @connection_options = YAML.load(ERB.new(File.read(@config_path)).result)[Rails.env].symbolize_keys
@adamhunter Owner

hey there. i am soo sorry it has taken me so long to get to this. quick question, do you think we should require 'erb' at the top along with the yaml require? other than that i'm ready to merge and push a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@client = Dossier::Client.new(@connection_options)
rescue Errno::ENOENT => e
Something went wrong with that request. Please try again.