Permalink
Browse files

Using uuid which is supported in 1.9

Orignal commit #ada78066fdbccffb1da092a2470211fa252b3c99
  • Loading branch information...
arunagw committed Dec 21, 2011
1 parent 893d38d commit 0f510e970f00ac819d331f0415db3ac5ada7b861
@@ -33,7 +33,7 @@ def external_request_id(env)
end
def internal_request_id
- SecureRandom.hex(16)
+ SecureRandom.uuid
end
end
end
@@ -14,7 +14,7 @@ class RequestIdTest < ActiveSupport::TestCase
end
test "generating a request id when none is supplied" do
- assert_match(/\w+/, stub_request.uuid)
+ assert_match /\w+-\w+-\w+-\w+-\w+/, stub_request.uuid
end
private

0 comments on commit 0f510e9

Please sign in to comment.