private_pub icon indicating copy to clipboard operation
private_pub copied to clipboard

Allow environment variables in the configuration file

Open IamNaN opened this issue 12 years ago • 4 comments

This eases deployment by allowing environment variables in private_pub.yml.

Because Faye needs to run in production mode, the yaml file's production block gets used for both development and production, making private_pub hard to deploy.

production:
  server: <%= ENV["FAYE_SERVER"] %>
  secret_token: <%= ENV["FAYE_KEY"] %>

This change also forces signature_expiration to an integer regardless of how it is entered in the configuration, and it adds tests.

IamNaN avatar Apr 23 '13 02:04 IamNaN

Also, I required yaml in private_pub.rb because tests weren't passing without it, even before this pull request.

IamNaN avatar Apr 23 '13 02:04 IamNaN

This would have been interesting, How about Puma? what is needed to get puma to work with private_pub,

Changing adapter to puma still gives a

19:39:24 privpub.1 | /Users/Jordan/.rvm/gems/ruby-2.0.0-head@books/gems/rack-1.5.2/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError)

Where/ How to overrule this?

rubytastic avatar Sep 19 '13 17:09 rubytastic

@ryanb How about merging this pull request. Having a similar need to use the Environment variables on production..

gakshay avatar Jul 22 '15 13:07 gakshay

+1 I also need to use ENV['variable'] on production

ferydjzz avatar Nov 25 '16 08:11 ferydjzz