Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix NoMethodError when generating a uuid using the uuid gem by using SecureRandom instead #6

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion emailage.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "redcarpet", "~> 3.3"

spec.add_dependency "typhoeus", "~> 1.0"
spec.add_dependency "uuid", "~> 2.3"
spec.add_dependency "json", "~> 2.3"
end
4 changes: 2 additions & 2 deletions lib/emailage/client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'typhoeus'
require 'uuid'
require 'securerandom'
require 'json'

module Emailage
Expand Down Expand Up @@ -38,7 +38,7 @@ def request(endpoint, params)
params = {
:format => 'json',
:oauth_consumer_key => @secret,
:oauth_nonce => UUID.new.generate,
:oauth_nonce => SecureRandom.uuid,
:oauth_signature_method => 'HMAC-SHA1',
:oauth_timestamp => Time.now.to_i,
:oauth_version => 1.0
Expand Down