From 172036f8ccf4934650c9cd1406873f2197ff56e1 Mon Sep 17 00:00:00 2001 From: Zach Cross Date: Wed, 27 May 2015 11:53:24 -0700 Subject: [PATCH] Replace UUID with SecureRandom.uuid --- CHANGELOG.md | 4 ++++ Gemfile | 1 - lib/savon/header.rb | 4 ++-- lib/savon/version.rb | 2 +- savon.gemspec | 1 - 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a9faf89..c438dd4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.11.1 (2015-05-27) + +* Replace dependency on [uuid](https://rubygems.org/gems/uuid), using SecureRandom.uuid instead. + # 2.11.0 (2015-03-31) * Formally drop support for 1.8.7. diff --git a/Gemfile b/Gemfile index a4428afd..9aaf1b0c 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,6 @@ gem "httpclient", "~> 2.3.4" gem "simplecov", :require => false gem "coveralls", :require => false -gem "uuid" platform :rbx do gem 'json' diff --git a/lib/savon/header.rb b/lib/savon/header.rb index 64b54775..a8a41361 100644 --- a/lib/savon/header.rb +++ b/lib/savon/header.rb @@ -1,6 +1,6 @@ require "akami" require "gyoku" -require "uuid" +require "securerandom" module Savon class Header @@ -61,7 +61,7 @@ def build_wsa_header convert_to_xml({ 'wsa:Action' => @locals[:soap_action], 'wsa:To' => @globals[:endpoint], - 'wsa:MessageID' => "urn:uuid:#{UUID.new.generate}", + 'wsa:MessageID' => "urn:uuid:#{SecureRandom.uuid}", attributes!: { 'wsa:MessageID' => { "xmlns:wsa" => "http://schemas.xmlsoap.org/ws/2004/08/addressing" diff --git a/lib/savon/version.rb b/lib/savon/version.rb index 595202f4..6c0df155 100644 --- a/lib/savon/version.rb +++ b/lib/savon/version.rb @@ -1,3 +1,3 @@ module Savon - VERSION = '2.11.0' + VERSION = '2.11.1' end diff --git a/savon.gemspec b/savon.gemspec index 2c645101..6569f42f 100644 --- a/savon.gemspec +++ b/savon.gemspec @@ -22,7 +22,6 @@ Gem::Specification.new do |s| s.add_dependency "wasabi", "~> 3.4" s.add_dependency "akami", "~> 1.2" s.add_dependency "gyoku", "~> 1.2" - s.add_dependency "uuid", "~> 2.3.7" s.add_dependency "builder", ">= 2.1.2" s.add_dependency "nokogiri", ">= 1.4.0"