From fedbf2236dded6701962e89e1807efa3fb065565 Mon Sep 17 00:00:00 2001 From: Martyn Loughran Date: Fri, 29 Oct 2010 13:53:43 +0100 Subject: [PATCH] Make values in auth_hash strings, which is technically more correct * Faced some issues with addressable not converting integer values in certain testing scenarios. Easier to simply avoid --- lib/signature.rb | 2 +- spec/signature_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/signature.rb b/lib/signature.rb index 6e8d283..ea62ba1 100644 --- a/lib/signature.rb +++ b/lib/signature.rb @@ -40,7 +40,7 @@ def sign(token) @auth_hash = { :auth_version => "1.0", :auth_key => token.key, - :auth_timestamp => Time.now.to_i + :auth_timestamp => Time.now.to_i.to_s } @auth_hash[:auth_signature] = signature(token) diff --git a/spec/signature_spec.rb b/spec/signature_spec.rb index edce081..09e3899 100644 --- a/spec/signature_spec.rb +++ b/spec/signature_spec.rb @@ -31,7 +31,7 @@ :auth_signature => "da078fcedd72941b6c873caa40d0d6b2000ebfc700cee802b128dd20f72e74e9", :auth_version => "1.0", :auth_key => "key", - :auth_timestamp => 1234 + :auth_timestamp => '1234' } end