提交 ada78066 编写于 作者: D David Heinemeier Hansson

Blah, SecureRandom#uuid is not supported in 1.8.7 -- cant wait for Rails 4.0...

Blah, SecureRandom#uuid is not supported in 1.8.7 -- cant wait for Rails 4.0 to drop compatibility with 1.8.x
上级 1b50207e
......@@ -33,7 +33,7 @@ def external_request_id(env)
end
def internal_request_id
SecureRandom.uuid
SecureRandom.hex(16)
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+-\w+-\w+-\w+-\w+/, stub_request.uuid
assert_match /\w+/, stub_request.uuid
end
private
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册