aws 2.9.1 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/lib/awsbase/utils.rb +3 -3
- data/lib/ec2/ec2.rb +1 -1
- data/lib/s3/s3_interface.rb +14 -13
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63a65490209cc977d00bd5a333e68cca85f0f42f
|
4
|
+
data.tar.gz: 2d3ebf015650c457255f462e915a11b075978b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cf175cc6880a04a0ccd28dbb3155bf1860b7e518a5da70556adf272bc9e7215438c99c4ff9807dfa388cb69573afb01429bf0be026ea41afbb77b6df505274c
|
7
|
+
data.tar.gz: d27ce54b64df2fa43544863cea493833889346dacb663d462ca2a656db355cbaa959b23c89a0d96a35d4a50afa127da0c801ec81b076bea8ffe39acab3ad0943
|
data/.gitignore
CHANGED
data/lib/awsbase/utils.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
module Aws
|
2
2
|
|
3
3
|
class Utils #:nodoc:
|
4
|
-
@@digest1 = OpenSSL::Digest
|
4
|
+
@@digest1 = OpenSSL::Digest.new("sha1")
|
5
5
|
@@digest256 = nil
|
6
6
|
if OpenSSL::OPENSSL_VERSION_NUMBER > 0x00908000
|
7
|
-
@@digest256 = OpenSSL::Digest
|
7
|
+
@@digest256 = OpenSSL::Digest.new("sha256") rescue nil # Some installation may not support sha256
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.sign(aws_secret_access_key, auth_string)
|
@@ -223,7 +223,7 @@ module Aws
|
|
223
223
|
def self.blank?(obj)
|
224
224
|
case obj
|
225
225
|
when NilClass, FalseClass
|
226
|
-
true
|
226
|
+
true
|
227
227
|
when TrueClass, Numeric
|
228
228
|
false
|
229
229
|
when Array, Hash
|
data/lib/ec2/ec2.rb
CHANGED
@@ -544,7 +544,7 @@ module Aws
|
|
544
544
|
# }]
|
545
545
|
#
|
546
546
|
def launch_instances(image_id, options={})
|
547
|
-
@logger.info("Launching instance of image #{image_id}
|
547
|
+
@logger.info("Launching instance of image #{image_id}, " +
|
548
548
|
"key: #{options[:key_name]}, groups: #{(options[:group_ids]).to_a.join(',')}")
|
549
549
|
# careful: keyName and securityGroups may be nil
|
550
550
|
params = hash_params('SecurityGroup', options[:group_ids].to_a)
|
data/lib/s3/s3_interface.rb
CHANGED
@@ -304,11 +304,12 @@ module Aws
|
|
304
304
|
# 'max-keys' => "5"}, ..., {...}]
|
305
305
|
#
|
306
306
|
def list_bucket(bucket, options={}, headers={})
|
307
|
+
internal_bucket = bucket.dup
|
307
308
|
unless options.nil? || options.empty?
|
308
|
-
|
309
|
-
|
309
|
+
internal_bucket << '?'
|
310
|
+
internal_bucket << options.map { |k, v| "#{k.to_s}=#{CGI::escape v.to_s}" }.join('&')
|
310
311
|
end
|
311
|
-
req_hash = generate_rest_request('GET', headers.merge(:url=>
|
312
|
+
req_hash = generate_rest_request('GET', headers.merge(:url=>internal_bucket))
|
312
313
|
request_info(req_hash, S3ListBucketParser.new(:logger => @logger))
|
313
314
|
rescue
|
314
315
|
on_exception
|
@@ -610,17 +611,17 @@ EOS
|
|
610
611
|
# List parts of a multipart upload, returning a hash or an exception
|
611
612
|
# http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadListParts.html
|
612
613
|
#
|
613
|
-
# response looks like:
|
614
|
+
# response looks like:
|
614
615
|
#
|
615
|
-
# { :bucket=>"mariosFoo_awesome_test_bucket_000A1",
|
616
|
-
# :key=>"mariosFoosegmented",
|
617
|
-
# :upload_id=>"jQKX7JdJBTrbvLn9apUPIXkt14FHdp6nMZVg--"
|
618
|
-
# :parts=> [ {:part_number=>"1", :last_modified=>"2012-10-30T15:06:28.000Z",
|
619
|
-
# :etag=>"\"78f871f6f01673a4aca05b1f8e26df08\"", :size=>"6276589"},
|
620
|
-
# {:part_number=>"2", :last_modified=>"2012-10-30T15:08:22.000Z",
|
621
|
-
# :etag=>"\"e7b94a1e959ca066026da3ec63aad321\"", :size=>"7454095"}] }
|
616
|
+
# { :bucket=>"mariosFoo_awesome_test_bucket_000A1",
|
617
|
+
# :key=>"mariosFoosegmented",
|
618
|
+
# :upload_id=>"jQKX7JdJBTrbvLn9apUPIXkt14FHdp6nMZVg--"
|
619
|
+
# :parts=> [ {:part_number=>"1", :last_modified=>"2012-10-30T15:06:28.000Z",
|
620
|
+
# :etag=>"\"78f871f6f01673a4aca05b1f8e26df08\"", :size=>"6276589"},
|
621
|
+
# {:part_number=>"2", :last_modified=>"2012-10-30T15:08:22.000Z",
|
622
|
+
# :etag=>"\"e7b94a1e959ca066026da3ec63aad321\"", :size=>"7454095"}] }
|
622
623
|
#
|
623
|
-
# Clients must specify the uploadId (obtained from the initiate_multipart call)
|
624
|
+
# Clients must specify the uploadId (obtained from the initiate_multipart call)
|
624
625
|
#
|
625
626
|
# s3.list_parts('my_awesome_bucket', 'hugeObject', "WL7dk8sqbtk3Rg641HHWaNeG6RxI",
|
626
627
|
#
|
@@ -986,7 +987,7 @@ EOS
|
|
986
987
|
headers.each { |key, value| headers.delete(key) if (value.nil? || key.is_a?(Symbol)) }
|
987
988
|
#generate auth strings
|
988
989
|
auth_string = canonical_string(method, path_to_sign, headers, expires)
|
989
|
-
signature = CGI::escape(Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest
|
990
|
+
signature = CGI::escape(Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest.new("sha1"), @aws_secret_access_key, auth_string)).strip)
|
990
991
|
# path building
|
991
992
|
addon = "Signature=#{signature}&Expires=#{expires}&AWSAccessKeyId=#{@aws_access_key_id}"
|
992
993
|
path += path[/\?/] ? "&#{addon}" : "?#{addon}"
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Reeder
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: uuidtools
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: 1.3.6
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.2.2
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: AWS Ruby Library for interfacing with Amazon Web Services including EC2,
|