Skip to content

Commit

Permalink
allow erb in poundpay.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
anveo committed Jan 18, 2012
1 parent 23dbfbd commit fe46dbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/poundpay/rails.rb
Expand Up @@ -3,8 +3,8 @@ module Poundpay
def self.configure_from_yaml(path)
pathname = Pathname.new Rails.root.join(path)
raise ArgumentError.new "File does not exist: #{pathname.to_s}" unless pathname.exist?
config = YAML::load_file(pathname)[Rails.env]
config = YAML::load(ERB.new(File.read(pathname)).result)[Rails.env]
Poundpay.configure_from_hash(config)
end
end
end
end
2 changes: 1 addition & 1 deletion spec/fixtures/poundpay.yml
@@ -1,6 +1,6 @@
development:
developer_sid: DV0383d447360511e0bbac00264a09ff3c
auth_token: development_auth_token
auth_token: <%= "development_auth_token" %>
www_url: https://www-sandbox.poundpay.com
api_url: https://api-sandbox.poundpay.com

Expand Down

0 comments on commit fe46dbd

Please sign in to comment.