aws 2.3.21 → 2.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +5 -4
- data/lib/acf/right_acf_interface.rb +3 -3
- data/lib/ec2/right_ec2.rb +76 -1
- data/lib/s3/right_s3.rb +996 -987
- data/lib/s3/right_s3_interface.rb +60 -56
- data/test/ec2/test_ec2.rb +83 -2
- metadata +27 -33
|
@@ -29,17 +29,17 @@ module Aws
|
|
|
29
29
|
|
|
30
30
|
include AwsBaseInterface
|
|
31
31
|
|
|
32
|
-
DEFAULT_HOST
|
|
33
|
-
DEFAULT_PORT
|
|
34
|
-
DEFAULT_PROTOCOL
|
|
35
|
-
DEFAULT_SERVICE
|
|
36
|
-
REQUEST_TTL
|
|
37
|
-
DEFAULT_EXPIRES_AFTER
|
|
38
|
-
ONE_YEAR_IN_SECONDS
|
|
39
|
-
AMAZON_HEADER_PREFIX
|
|
40
|
-
AMAZON_METADATA_PREFIX
|
|
41
|
-
|
|
42
|
-
@@bench
|
|
32
|
+
DEFAULT_HOST = 's3.amazonaws.com'
|
|
33
|
+
DEFAULT_PORT = 443
|
|
34
|
+
DEFAULT_PROTOCOL = 'https'
|
|
35
|
+
DEFAULT_SERVICE = '/'
|
|
36
|
+
REQUEST_TTL = 30
|
|
37
|
+
DEFAULT_EXPIRES_AFTER = 1 * 24 * 60 * 60 # One day's worth of seconds
|
|
38
|
+
ONE_YEAR_IN_SECONDS = 365 * 24 * 60 * 60
|
|
39
|
+
AMAZON_HEADER_PREFIX = 'x-amz-'
|
|
40
|
+
AMAZON_METADATA_PREFIX = 'x-amz-meta-'
|
|
41
|
+
|
|
42
|
+
@@bench = AwsBenchmarkingBlock.new
|
|
43
43
|
|
|
44
44
|
def self.bench_xml
|
|
45
45
|
@@bench.xml
|
|
@@ -59,7 +59,11 @@ module Aws
|
|
|
59
59
|
# {:server => 's3.amazonaws.com' # Amazon service host: 's3.amazonaws.com'(default)
|
|
60
60
|
# :port => 443 # Amazon service port: 80 or 443(default)
|
|
61
61
|
# :protocol => 'https' # Amazon service protocol: 'http' or 'https'(default)
|
|
62
|
-
# :
|
|
62
|
+
# :connection_mode => :default # options are
|
|
63
|
+
# :default (will use best known safe (as in won't need explicit close) option, may change in the future)
|
|
64
|
+
# :per_request (opens and closes a connection on every request)
|
|
65
|
+
# :single (one thread across entire app)
|
|
66
|
+
# :per_thread (one connection per thread)
|
|
63
67
|
# :logger => Logger Object} # Logger instance: logs to STDOUT if omitted }
|
|
64
68
|
#
|
|
65
69
|
def initialize(aws_access_key_id=nil, aws_secret_access_key=nil, params={})
|
|
@@ -83,7 +87,7 @@ module Aws
|
|
|
83
87
|
#-----------------------------------------------------------------
|
|
84
88
|
# Produces canonical string for signing.
|
|
85
89
|
def canonical_string(method, path, headers={}, expires=nil) # :nodoc:
|
|
86
|
-
s3_headers
|
|
90
|
+
s3_headers = {}
|
|
87
91
|
headers.each do |key, value|
|
|
88
92
|
key = key.downcase
|
|
89
93
|
s3_headers[key] = value.join("").strip if key[/^#{AMAZON_HEADER_PREFIX}|^content-md5$|^content-type$|^date$/o]
|
|
@@ -93,7 +97,7 @@ module Aws
|
|
|
93
97
|
s3_headers['date'] = '' if s3_headers.has_key? 'x-amz-date'
|
|
94
98
|
s3_headers['date'] = expires if expires
|
|
95
99
|
# prepare output string
|
|
96
|
-
out_string
|
|
100
|
+
out_string = "#{method}\n"
|
|
97
101
|
s3_headers.sort { |a, b| a[0] <=> b[0] }.each do |key, value|
|
|
98
102
|
out_string << (key[/^#{AMAZON_HEADER_PREFIX}/o] ? "#{key}:#{value}\n" : "#{value}\n")
|
|
99
103
|
end
|
|
@@ -119,8 +123,8 @@ module Aws
|
|
|
119
123
|
|
|
120
124
|
def fetch_request_params(headers) #:nodoc:
|
|
121
125
|
# default server to use
|
|
122
|
-
server
|
|
123
|
-
service
|
|
126
|
+
server = @params[:server]
|
|
127
|
+
service = @params[:service].to_s
|
|
124
128
|
service.chop! if service[%r{/$}] # remove trailing '/' from service
|
|
125
129
|
# extract bucket name and check it's dns compartibility
|
|
126
130
|
headers[:url].to_s[%r{^([a-z0-9._-]*)(/[^?]*)?(\?.+)?}i]
|
|
@@ -128,9 +132,9 @@ module Aws
|
|
|
128
132
|
# select request model
|
|
129
133
|
if is_dns_bucket?(bucket_name)
|
|
130
134
|
# fix a path
|
|
131
|
-
server
|
|
135
|
+
server = "#{bucket_name}.#{server}"
|
|
132
136
|
key_path ||= '/'
|
|
133
|
-
path
|
|
137
|
+
path = "#{service}#{key_path}#{params_list}"
|
|
134
138
|
else
|
|
135
139
|
path = "#{service}/#{bucket_name}#{key_path}#{params_list}"
|
|
136
140
|
end
|
|
@@ -144,22 +148,22 @@ module Aws
|
|
|
144
148
|
def generate_rest_request(method, headers) # :nodoc:
|
|
145
149
|
# calculate request data
|
|
146
150
|
server, path, path_to_sign = fetch_request_params(headers)
|
|
147
|
-
data
|
|
151
|
+
data = headers[:data]
|
|
148
152
|
# remove unset(==optional) and symbolyc keys
|
|
149
153
|
headers.each { |key, value| headers.delete(key) if (value.nil? || key.is_a?(Symbol)) }
|
|
150
154
|
#
|
|
151
|
-
headers['content-type']
|
|
155
|
+
headers['content-type'] ||= ''
|
|
152
156
|
headers['date'] = Time.now.httpdate
|
|
153
157
|
# create request
|
|
154
|
-
request
|
|
158
|
+
request = "Net::HTTP::#{method.capitalize}".constantize.new(path)
|
|
155
159
|
request.body = data if data
|
|
156
160
|
# set request headers and meta headers
|
|
157
161
|
headers.each { |key, value| request[key.to_s] = value }
|
|
158
162
|
#generate auth strings
|
|
159
|
-
auth_string
|
|
160
|
-
signature
|
|
163
|
+
auth_string = canonical_string(request.method, path_to_sign, request.to_hash)
|
|
164
|
+
signature = AwsUtils::sign(@aws_secret_access_key, auth_string)
|
|
161
165
|
# set other headers
|
|
162
|
-
request['Authorization']
|
|
166
|
+
request['Authorization'] = "AWS #{@aws_access_key_id}:#{signature}"
|
|
163
167
|
# prepare output hash
|
|
164
168
|
{:request => request,
|
|
165
169
|
:server => server,
|
|
@@ -198,7 +202,7 @@ module Aws
|
|
|
198
202
|
# s3.create_bucket('my-awesome-bucket-eu', :location => :eu) #=> true
|
|
199
203
|
#
|
|
200
204
|
def create_bucket(bucket, headers={})
|
|
201
|
-
data
|
|
205
|
+
data = nil
|
|
202
206
|
unless headers[:location].blank?
|
|
203
207
|
data = "<CreateBucketConfiguration><LocationConstraint>#{headers[:location].to_s.upcase}</LocationConstraint></CreateBucketConfiguration>"
|
|
204
208
|
end
|
|
@@ -322,14 +326,14 @@ module Aws
|
|
|
322
326
|
def incrementally_list_bucket(bucket, options={}, headers={}, &block)
|
|
323
327
|
internal_options = options.symbolize_keys
|
|
324
328
|
begin
|
|
325
|
-
internal_bucket
|
|
329
|
+
internal_bucket = bucket.dup
|
|
326
330
|
internal_bucket += '?'+internal_options.map { |k, v| "#{k.to_s}=#{CGI::escape v.to_s}" }.join('&') unless internal_options.blank?
|
|
327
|
-
req_hash
|
|
328
|
-
response
|
|
331
|
+
req_hash = generate_rest_request('GET', headers.merge(:url=>internal_bucket))
|
|
332
|
+
response = request_info(req_hash, S3ImprovedListBucketParser.new(:logger => @logger))
|
|
329
333
|
there_are_more_keys = response[:is_truncated]
|
|
330
334
|
if (there_are_more_keys)
|
|
331
335
|
internal_options[:marker] = decide_marker(response)
|
|
332
|
-
total_results
|
|
336
|
+
total_results = response[:contents].length + response[:common_prefixes].length
|
|
333
337
|
internal_options[:'max-keys'] ? (internal_options[:'max-keys'] -= total_results) : nil
|
|
334
338
|
end
|
|
335
339
|
yield response
|
|
@@ -343,7 +347,7 @@ module Aws
|
|
|
343
347
|
private
|
|
344
348
|
def decide_marker(response)
|
|
345
349
|
return response[:next_marker].dup if response[:next_marker]
|
|
346
|
-
last_key
|
|
350
|
+
last_key = response[:contents].last[:key]
|
|
347
351
|
last_prefix = response[:common_prefixes].last
|
|
348
352
|
if (!last_key)
|
|
349
353
|
return nil if (!last_prefix)
|
|
@@ -402,11 +406,11 @@ module Aws
|
|
|
402
406
|
end
|
|
403
407
|
data_size = data.respond_to?(:lstat) ? data.lstat.size :
|
|
404
408
|
(data.respond_to?(:size) ? data.size : 0)
|
|
405
|
-
|
|
409
|
+
if (data_size >= USE_100_CONTINUE_PUT_SIZE)
|
|
406
410
|
headers['expect'] = '100-continue'
|
|
407
411
|
end
|
|
408
|
-
req_hash
|
|
409
|
-
|
|
412
|
+
req_hash = generate_rest_request('PUT', headers.merge(:url =>"#{bucket}/#{CGI::escape key}", :data=>data,
|
|
413
|
+
'Content-Length' => data_size.to_s))
|
|
410
414
|
request_info(req_hash, RightHttp2xxParser.new)
|
|
411
415
|
rescue
|
|
412
416
|
on_exception
|
|
@@ -453,7 +457,7 @@ module Aws
|
|
|
453
457
|
end
|
|
454
458
|
|
|
455
459
|
req_hash = generate_rest_request('PUT', params[:headers].merge(:url=>"#{params[:bucket]}/#{CGI::escape params[:key]}", :data=>params[:data]))
|
|
456
|
-
resp
|
|
460
|
+
resp = request_info(req_hash, S3HttpResponseHeadParser.new)
|
|
457
461
|
if (params[:md5])
|
|
458
462
|
resp[:verified_md5] = (resp['etag'].gsub(/\"/, '') == params[:md5]) ? true : false
|
|
459
463
|
else
|
|
@@ -570,8 +574,8 @@ module Aws
|
|
|
570
574
|
AwsUtils.mandatory_arguments([:bucket, :key], params)
|
|
571
575
|
AwsUtils.allow_only([:bucket, :key, :headers, :md5], params)
|
|
572
576
|
params[:headers] = {} unless params[:headers]
|
|
573
|
-
req_hash
|
|
574
|
-
resp
|
|
577
|
+
req_hash = generate_rest_request('GET', params[:headers].merge(:url=>"#{params[:bucket]}/#{CGI::escape params[:key]}"))
|
|
578
|
+
resp = request_info(req_hash, S3HttpResponseBodyParser.new, &block)
|
|
575
579
|
resp[:verified_md5] = false
|
|
576
580
|
if (params[:md5] && (resp[:headers]['etag'].gsub(/\"/, '') == params[:md5]))
|
|
577
581
|
resp[:verified_md5] = true
|
|
@@ -636,10 +640,10 @@ module Aws
|
|
|
636
640
|
# http://docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTObjectCOPY.html
|
|
637
641
|
#
|
|
638
642
|
def copy(src_bucket, src_key, dest_bucket, dest_key=nil, directive=:copy, headers={})
|
|
639
|
-
dest_key
|
|
643
|
+
dest_key ||= src_key
|
|
640
644
|
headers['x-amz-metadata-directive'] = directive.to_s.upcase
|
|
641
645
|
headers['x-amz-copy-source'] = "#{src_bucket}/#{CGI::escape src_key}"
|
|
642
|
-
req_hash
|
|
646
|
+
req_hash = generate_rest_request('PUT', headers.merge(:url=>"#{dest_bucket}/#{CGI::escape dest_key}"))
|
|
643
647
|
request_info(req_hash, S3CopyParser.new)
|
|
644
648
|
rescue
|
|
645
649
|
on_exception
|
|
@@ -687,7 +691,7 @@ module Aws
|
|
|
687
691
|
# <Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>" }
|
|
688
692
|
#
|
|
689
693
|
def get_acl(bucket, key='', headers={})
|
|
690
|
-
key
|
|
694
|
+
key = key.blank? ? '' : "/#{CGI::escape key}"
|
|
691
695
|
req_hash = generate_rest_request('GET', headers.merge(:url=>"#{bucket}#{key}?acl"))
|
|
692
696
|
request_info(req_hash, S3HttpResponseBodyParser.new)
|
|
693
697
|
rescue
|
|
@@ -717,10 +721,10 @@ module Aws
|
|
|
717
721
|
# :display_name=>"root"}}
|
|
718
722
|
#
|
|
719
723
|
def get_acl_parse(bucket, key='', headers={})
|
|
720
|
-
key
|
|
721
|
-
req_hash
|
|
722
|
-
acl
|
|
723
|
-
result
|
|
724
|
+
key = key.blank? ? '' : "/#{CGI::escape key}"
|
|
725
|
+
req_hash = generate_rest_request('GET', headers.merge(:url=>"#{bucket}#{key}?acl"))
|
|
726
|
+
acl = request_info(req_hash, S3AclParser.new(:logger => @logger))
|
|
727
|
+
result = {}
|
|
724
728
|
result[:owner] = acl[:owner]
|
|
725
729
|
result[:grantees] = {}
|
|
726
730
|
acl[:grantees].each do |grantee|
|
|
@@ -741,7 +745,7 @@ module Aws
|
|
|
741
745
|
|
|
742
746
|
# Sets the ACL on a bucket or object.
|
|
743
747
|
def put_acl(bucket, key, acl_xml_doc, headers={})
|
|
744
|
-
key
|
|
748
|
+
key = key.blank? ? '' : "/#{CGI::escape key}"
|
|
745
749
|
req_hash = generate_rest_request('PUT', headers.merge(:url=>"#{bucket}#{key}?acl", :data=>acl_xml_doc))
|
|
746
750
|
request_info(req_hash, S3HttpResponseBodyParser.new)
|
|
747
751
|
rescue
|
|
@@ -824,17 +828,17 @@ module Aws
|
|
|
824
828
|
# calculate request data
|
|
825
829
|
server, path, path_to_sign = fetch_request_params(headers)
|
|
826
830
|
# expiration time
|
|
827
|
-
expires
|
|
831
|
+
expires ||= DEFAULT_EXPIRES_AFTER
|
|
828
832
|
expires = Time.now.utc + expires if expires.is_a?(Fixnum) && (expires < ONE_YEAR_IN_SECONDS)
|
|
829
|
-
expires
|
|
833
|
+
expires = expires.to_i
|
|
830
834
|
# remove unset(==optional) and symbolyc keys
|
|
831
835
|
headers.each { |key, value| headers.delete(key) if (value.nil? || key.is_a?(Symbol)) }
|
|
832
836
|
#generate auth strings
|
|
833
837
|
auth_string = canonical_string(method, path_to_sign, headers, expires)
|
|
834
838
|
signature = CGI::escape(Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new("sha1"), @aws_secret_access_key, auth_string)).strip)
|
|
835
839
|
# path building
|
|
836
|
-
addon
|
|
837
|
-
path
|
|
840
|
+
addon = "Signature=#{signature}&Expires=#{expires}&AWSAccessKeyId=#{@aws_access_key_id}"
|
|
841
|
+
path += path[/\?/] ? "&#{addon}" : "?#{addon}"
|
|
838
842
|
"#{@params[:protocol]}://#{server}:#{@params[:port]}#{path}"
|
|
839
843
|
rescue
|
|
840
844
|
on_exception
|
|
@@ -1049,13 +1053,13 @@ module Aws
|
|
|
1049
1053
|
|
|
1050
1054
|
class S3ImprovedListBucketParser < AwsParser # :nodoc:
|
|
1051
1055
|
def reset
|
|
1052
|
-
@result
|
|
1053
|
-
@result[:contents]
|
|
1056
|
+
@result = {}
|
|
1057
|
+
@result[:contents] = []
|
|
1054
1058
|
@result[:common_prefixes] = []
|
|
1055
|
-
@contents
|
|
1056
|
-
@current_key
|
|
1057
|
-
@common_prefixes
|
|
1058
|
-
@in_common_prefixes
|
|
1059
|
+
@contents = []
|
|
1060
|
+
@current_key = {}
|
|
1061
|
+
@common_prefixes = []
|
|
1062
|
+
@in_common_prefixes = false
|
|
1059
1063
|
end
|
|
1060
1064
|
|
|
1061
1065
|
def tagstart(name, attributes)
|
|
@@ -1164,12 +1168,12 @@ module Aws
|
|
|
1164
1168
|
when 'TargetBucket'
|
|
1165
1169
|
if @xmlpath == 'BucketLoggingStatus/LoggingEnabled'
|
|
1166
1170
|
@result[:targetbucket] = @text
|
|
1167
|
-
@result[:enabled]
|
|
1171
|
+
@result[:enabled] = true
|
|
1168
1172
|
end
|
|
1169
1173
|
when 'TargetPrefix'
|
|
1170
1174
|
if @xmlpath == 'BucketLoggingStatus/LoggingEnabled'
|
|
1171
1175
|
@result[:targetprefix] = @text
|
|
1172
|
-
@result[:enabled]
|
|
1176
|
+
@result[:enabled] = true
|
|
1173
1177
|
end
|
|
1174
1178
|
end
|
|
1175
1179
|
end
|
data/test/ec2/test_ec2.rb
CHANGED
|
@@ -58,8 +58,7 @@ class TestEc2 < Test::Unit::TestCase
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def test_06_describe_images
|
|
61
|
-
images =
|
|
62
|
-
assert images.size>0, 'Amazon must have at least some public images'
|
|
61
|
+
images = describe_images
|
|
63
62
|
# unknown image
|
|
64
63
|
assert_raise(Aws::AwsError) { @ec2.describe_images(['ami-ABCDEFGH']) }
|
|
65
64
|
end
|
|
@@ -121,4 +120,86 @@ class TestEc2 < Test::Unit::TestCase
|
|
|
121
120
|
assert_nil ec2.params[:region]
|
|
122
121
|
end
|
|
123
122
|
|
|
123
|
+
def test_13a_create_describe_delete_tag
|
|
124
|
+
images = describe_images
|
|
125
|
+
resource_id = images.first[:aws_id]
|
|
126
|
+
|
|
127
|
+
assert @ec2.create_tag(resource_id, 'testkey', 'testvalue').inspect, "Could not add a tag to #{resource_id}"
|
|
128
|
+
assert_equal(
|
|
129
|
+
[{:aws_resource_id=>resource_id, :aws_resource_type=>"image", :aws_key=>"testkey", :aws_value=>"testvalue"}],
|
|
130
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id)
|
|
131
|
+
)
|
|
132
|
+
assert_equal(
|
|
133
|
+
[],
|
|
134
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => '__blah__')
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
assert @ec2.delete_tag(resource_id, 'testkey').inspect, "Could not delete tag 'testkey' from #{resource_id}"
|
|
138
|
+
sleep 1 # :(
|
|
139
|
+
assert_equal(
|
|
140
|
+
[],
|
|
141
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id)
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def test_13b_create_describe_delete_tag_by_value
|
|
146
|
+
images = describe_images
|
|
147
|
+
resource_id = images.first[:aws_id]
|
|
148
|
+
|
|
149
|
+
assert @ec2.create_tag(resource_id, 'testkey', 'testvalue').inspect, "Could not add a tag to #{resource_id}"
|
|
150
|
+
assert_equal(
|
|
151
|
+
[{:aws_resource_id=>resource_id, :aws_resource_type=>"image", :aws_key=>"testkey", :aws_value=>"testvalue"}],
|
|
152
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id, 'Filter.2.Name' => 'key', 'Filter.2.Value.1' => 'testkey')
|
|
153
|
+
)
|
|
154
|
+
assert_equal(
|
|
155
|
+
[],
|
|
156
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id, 'Filter.2.Name' => 'key', 'Filter.2.Value.1' => '__blah__')
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
assert @ec2.delete_tag(resource_id, 'testkey', 'testvalue').inspect, "Could not delete tag 'testkey' from #{resource_id}"
|
|
160
|
+
sleep 1 # :(
|
|
161
|
+
assert_equal(
|
|
162
|
+
[],
|
|
163
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id, 'Filter.2.Name' => 'key', 'Filter.2.Value.1' => 'testkey')
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def test_13c_delete_tag_with_empty_or_nil_value
|
|
168
|
+
images = describe_images
|
|
169
|
+
resource_id = images.first[:aws_id]
|
|
170
|
+
|
|
171
|
+
assert @ec2.create_tag(resource_id, 'testkey', 'testvalue').inspect, "Could not add a tag to #{resource_id}"
|
|
172
|
+
assert_equal(
|
|
173
|
+
[{:aws_resource_id=>resource_id, :aws_resource_type=>"image", :aws_key=>"testkey", :aws_value=>"testvalue"}],
|
|
174
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id)
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
# Delete a tag with an empty string value...
|
|
178
|
+
assert @ec2.delete_tag(resource_id, 'testkey', '').inspect, "Could not delete tag 'testkey' from #{resource_id}"
|
|
179
|
+
sleep 1 # :(
|
|
180
|
+
# ... does nothing
|
|
181
|
+
assert_equal(
|
|
182
|
+
[{:aws_resource_id=>resource_id, :aws_resource_type=>"image", :aws_key=>"testkey", :aws_value=>"testvalue"}],
|
|
183
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id)
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# Delete a tag with value = nil...
|
|
187
|
+
assert @ec2.delete_tag(resource_id, 'testkey', nil).inspect, "Could not delete tag 'testkey' from #{resource_id}"
|
|
188
|
+
sleep 1 # :(
|
|
189
|
+
# ... deletes all tags with the given key
|
|
190
|
+
assert_equal(
|
|
191
|
+
[],
|
|
192
|
+
@ec2.describe_tags('Filter.1.Name' => 'resource-id', 'Filter.1.Value.1' => resource_id)
|
|
193
|
+
)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
private
|
|
197
|
+
|
|
198
|
+
# Memoize the images to speed up the tests
|
|
199
|
+
def describe_images
|
|
200
|
+
@@images ||= @ec2.describe_images
|
|
201
|
+
assert @@images.size>0, 'Amazon must have at least some public images'
|
|
202
|
+
@@images
|
|
203
|
+
end
|
|
204
|
+
|
|
124
205
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: 41
|
|
5
4
|
prerelease: false
|
|
6
5
|
segments:
|
|
7
6
|
- 2
|
|
8
7
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 2.3.
|
|
8
|
+
- 22
|
|
9
|
+
version: 2.3.22
|
|
11
10
|
platform: ruby
|
|
12
11
|
authors:
|
|
13
12
|
- Travis Reeder
|
|
@@ -17,7 +16,7 @@ autorequire:
|
|
|
17
16
|
bindir: bin
|
|
18
17
|
cert_chain: []
|
|
19
18
|
|
|
20
|
-
date: 2010-
|
|
19
|
+
date: 2010-10-19 00:00:00 -07:00
|
|
21
20
|
default_executable:
|
|
22
21
|
dependencies:
|
|
23
22
|
- !ruby/object:Gem::Dependency
|
|
@@ -28,7 +27,6 @@ dependencies:
|
|
|
28
27
|
requirements:
|
|
29
28
|
- - ">="
|
|
30
29
|
- !ruby/object:Gem::Version
|
|
31
|
-
hash: 3
|
|
32
30
|
segments:
|
|
33
31
|
- 0
|
|
34
32
|
version: "0"
|
|
@@ -42,7 +40,6 @@ dependencies:
|
|
|
42
40
|
requirements:
|
|
43
41
|
- - ">="
|
|
44
42
|
- !ruby/object:Gem::Version
|
|
45
|
-
hash: 3
|
|
46
43
|
segments:
|
|
47
44
|
- 0
|
|
48
45
|
version: "0"
|
|
@@ -56,7 +53,6 @@ dependencies:
|
|
|
56
53
|
requirements:
|
|
57
54
|
- - ">="
|
|
58
55
|
- !ruby/object:Gem::Version
|
|
59
|
-
hash: 3
|
|
60
56
|
segments:
|
|
61
57
|
- 0
|
|
62
58
|
version: "0"
|
|
@@ -89,24 +85,24 @@ files:
|
|
|
89
85
|
- lib/sqs/right_sqs.rb
|
|
90
86
|
- lib/sqs/right_sqs_interface.rb
|
|
91
87
|
- README.markdown
|
|
92
|
-
- test/ts_right_aws.rb
|
|
93
|
-
- test/elb/test_elb.rb
|
|
94
88
|
- test/acf/test_acf.rb
|
|
95
89
|
- test/acf/test_helper.rb
|
|
96
|
-
- test/sdb/test_sdb.rb
|
|
97
|
-
- test/sdb/test_active_sdb.rb
|
|
98
|
-
- test/sdb/test_helper.rb
|
|
99
|
-
- test/s3/test_s3.rb
|
|
100
|
-
- test/s3/test_s3_stubbed.rb
|
|
101
|
-
- test/s3/test_helper.rb
|
|
102
|
-
- test/rds/test_rds.rb
|
|
103
|
-
- test/sqs/test_sqs.rb
|
|
104
|
-
- test/sqs/test_helper.rb
|
|
105
90
|
- test/ec2/test_ec2.rb
|
|
106
|
-
- test/ec2/test_mon.rb
|
|
107
91
|
- test/ec2/test_helper.rb
|
|
92
|
+
- test/ec2/test_mon.rb
|
|
93
|
+
- test/elb/test_elb.rb
|
|
108
94
|
- test/http_connection.rb
|
|
95
|
+
- test/rds/test_rds.rb
|
|
96
|
+
- test/s3/test_helper.rb
|
|
97
|
+
- test/s3/test_s3.rb
|
|
98
|
+
- test/s3/test_s3_stubbed.rb
|
|
99
|
+
- test/sdb/test_active_sdb.rb
|
|
100
|
+
- test/sdb/test_helper.rb
|
|
101
|
+
- test/sdb/test_sdb.rb
|
|
102
|
+
- test/sqs/test_helper.rb
|
|
103
|
+
- test/sqs/test_sqs.rb
|
|
109
104
|
- test/test_credentials.rb
|
|
105
|
+
- test/ts_right_aws.rb
|
|
110
106
|
has_rdoc: true
|
|
111
107
|
homepage: http://github.com/appoxy/aws/
|
|
112
108
|
licenses: []
|
|
@@ -121,7 +117,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
121
117
|
requirements:
|
|
122
118
|
- - ">="
|
|
123
119
|
- !ruby/object:Gem::Version
|
|
124
|
-
hash: 3
|
|
125
120
|
segments:
|
|
126
121
|
- 0
|
|
127
122
|
version: "0"
|
|
@@ -130,7 +125,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
130
125
|
requirements:
|
|
131
126
|
- - ">="
|
|
132
127
|
- !ruby/object:Gem::Version
|
|
133
|
-
hash: 3
|
|
134
128
|
segments:
|
|
135
129
|
- 0
|
|
136
130
|
version: "0"
|
|
@@ -142,21 +136,21 @@ signing_key:
|
|
|
142
136
|
specification_version: 3
|
|
143
137
|
summary: AWS Ruby Library for interfacing with Amazon Web Services.
|
|
144
138
|
test_files:
|
|
145
|
-
- test/ts_right_aws.rb
|
|
146
|
-
- test/elb/test_elb.rb
|
|
147
139
|
- test/acf/test_acf.rb
|
|
148
140
|
- test/acf/test_helper.rb
|
|
149
|
-
- test/sdb/test_sdb.rb
|
|
150
|
-
- test/sdb/test_active_sdb.rb
|
|
151
|
-
- test/sdb/test_helper.rb
|
|
152
|
-
- test/s3/test_s3.rb
|
|
153
|
-
- test/s3/test_s3_stubbed.rb
|
|
154
|
-
- test/s3/test_helper.rb
|
|
155
|
-
- test/rds/test_rds.rb
|
|
156
|
-
- test/sqs/test_sqs.rb
|
|
157
|
-
- test/sqs/test_helper.rb
|
|
158
141
|
- test/ec2/test_ec2.rb
|
|
159
|
-
- test/ec2/test_mon.rb
|
|
160
142
|
- test/ec2/test_helper.rb
|
|
143
|
+
- test/ec2/test_mon.rb
|
|
144
|
+
- test/elb/test_elb.rb
|
|
161
145
|
- test/http_connection.rb
|
|
146
|
+
- test/rds/test_rds.rb
|
|
147
|
+
- test/s3/test_helper.rb
|
|
148
|
+
- test/s3/test_s3.rb
|
|
149
|
+
- test/s3/test_s3_stubbed.rb
|
|
150
|
+
- test/sdb/test_active_sdb.rb
|
|
151
|
+
- test/sdb/test_helper.rb
|
|
152
|
+
- test/sdb/test_sdb.rb
|
|
153
|
+
- test/sqs/test_helper.rb
|
|
154
|
+
- test/sqs/test_sqs.rb
|
|
162
155
|
- test/test_credentials.rb
|
|
156
|
+
- test/ts_right_aws.rb
|