lib/sqs/sqs_interface.rb in aws-2.4.5 vs lib/sqs/sqs_interface.rb in aws-2.5.0
- old
+ new
@@ -116,11 +116,11 @@
"Expires" => (Time.now + REQUEST_TTL).utc.strftime("%Y-%m-%dT%H:%M:%SZ"),
"AWSAccessKeyId" => @aws_access_key_id,
"Version" => API_VERSION}
service_hash.update(param)
service_params = signed_service_params(@aws_secret_access_key, service_hash, :get, @params[:server], service)
- request = Net::HTTP::Get.new("#{AwsUtils.URLencode(service)}?#{service_params}")
+ request = Net::HTTP::Get.new("#{Utils.URLencode(service)}?#{service_params}")
# prepare output hash
{:request => request,
:server => @params[:server],
:port => @params[:port],
:protocol => @params[:protocol]}
@@ -136,11 +136,11 @@
"MessageBody" => message,
"Version" => API_VERSION}
service_hash.update(param)
#
service_params = signed_service_params(@aws_secret_access_key, service_hash, :post, @params[:server], service)
- request = Net::HTTP::Post.new(AwsUtils::URLencode(service))
+ request = Net::HTTP::Post.new(Utils::URLencode(service))
request['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'
request.body = service_params
# prepare output hash
{:request => request,
:server => @params[:server],
@@ -382,10 +382,10 @@
# sqs.pop_message('http://queue.amazonaws.com/ZZ7XXXYYYBINS/my_awesome_queue') #=>
# {:id=>"12345678904GEZX9746N|0N9ED344VK5Z3SV1DTM0|1RVYH4X3TJ0987654321", :body=>"message_1"}
#
def pop_message(queue_url)
messages = pop_messages(queue_url)
- messages.blank? ? nil : messages[0]
+ messages.nil? ? nil : messages[0]
rescue
on_exception
end
#-----------------------------------------------------------------