From c70feaef8c56e45df34c2085594c94018bdc7bd9 Mon Sep 17 00:00:00 2001 From: Jaden Carver Date: Tue, 17 Jan 2012 16:52:10 -0700 Subject: [PATCH] secure random fix --- lib/generators/private_pub/templates/private_pub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/private_pub/templates/private_pub.yml b/lib/generators/private_pub/templates/private_pub.yml index 2c216b2..b827e8b 100644 --- a/lib/generators/private_pub/templates/private_pub.yml +++ b/lib/generators/private_pub/templates/private_pub.yml @@ -6,5 +6,5 @@ test: secret_token: "secret" production: server: "http://example.com/faye" - secret_token: "<%= ActiveSupport::SecureRandom.hex(32) %>" + secret_token: "<%= defined?(SecureRandom) ? SecureRandom.hex(32) : ActiveSupport::SecureRandom.hex(32) %>" signature_expiration: 3600 # one hour