aws-sdk 1.40.2 → 1.40.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10e63741f6aa962ceb1166052c6d7a7d7f2549a2
4
- data.tar.gz: 3a0310e45e7ecabe4407bbecbc71a7f8fa7a10ed
3
+ metadata.gz: f1eb48476ce74edf9f440cc7b564bed8c999cdf5
4
+ data.tar.gz: 007b81f048626aa4cb8ad81875fc62d33677834e
5
5
  SHA512:
6
- metadata.gz: 40de112da77470f79ec290a7038735b4bc99e7eaf56fcb860afdcf17a63967b33c0195a728de7c1ba4b24b01e1e2fb1c59216bf55a810294895182e5b77cf497
7
- data.tar.gz: 79f2b3f56e5c4d73a20ccee04213ca5ffe8729ff290de2156a38f3257b07f2a2d18ea69233da0eac8f4dc23b9c22e943a9f28fadb847b3b4ce7c67cedc3a8edf
6
+ metadata.gz: c5fcee920fb26779bf2897fea1eecfba3998ae90e4945e2ab309511530c8e24b3bc5ff7949cf78890a9ac0574b8c5acfdb83430d4de116369f987c43cf53e753
7
+ data.tar.gz: e640af3003212da3c795d8811c832a2a47a60f9baada576bf8e028df4356c621a67cea3b46cc0c1776be0cfee2960fbf0bb7a4a9c5c83c6d0079b6a1653b7199
@@ -159,7 +159,7 @@
159
159
  :ip_address:
160
160
  :name: IPAddress
161
161
  :type: :string
162
- :required: true
162
+ :required: false
163
163
  :position: 0
164
164
  :port:
165
165
  :name: Port
@@ -192,7 +192,7 @@ module AWS
192
192
  # @param [String] value
193
193
  # @return [String]
194
194
  def hexdigest value
195
- digest = Digest::SHA256.new
195
+ digest = OpenSSL::Digest::SHA256.new
196
196
  if value.respond_to?(:read)
197
197
  chunk = nil
198
198
  chunk_size = 1024 * 1024 # 1 megabyte
@@ -150,7 +150,7 @@ module AWS
150
150
  end
151
151
 
152
152
  def hash value
153
- Digest::SHA256.new.update(value).hexdigest
153
+ OpenSSL::Digest::SHA256.new.update(value).hexdigest
154
154
  end
155
155
 
156
156
  class << self
@@ -22,6 +22,20 @@ module AWS
22
22
  #
23
23
  module TaggedCollection
24
24
 
25
+ # Filters the collection by a paired tag key and value.
26
+ #
27
+ # ec2.instances.with_tag('role', 'web')
28
+ #
29
+ # You can filter a single tag key with multiple values:
30
+ #
31
+ # ec2.instances.with_tag('role', ['web', 'db'])
32
+ #
33
+ # @param [String] tag_key
34
+ # @param [String, Array<String>] tag_value
35
+ def with_tag(tag_key, *values)
36
+ filter("tag:#{tag_key}", *values)
37
+ end
38
+
25
39
  # Filter the collection by one or more tag keys. If you pass multiple
26
40
  # tag keys they will be be treated as OR conditions. If you want to
27
41
  # AND them together call tagged multiple times (chained).
@@ -236,7 +236,7 @@ module AWS
236
236
  end
237
237
 
238
238
  def md5 str
239
- Base64.encode64(Digest::MD5.digest(str)).strip
239
+ Base64.encode64(OpenSSL::Digest::MD5.digest(str)).strip
240
240
  end
241
241
 
242
242
  def parse_copy_part_response resp
@@ -1015,7 +1015,7 @@ module AWS
1015
1015
  # * `:permission` - (String) Logging permissions given to the Grantee
1016
1016
  # for the bucket. The bucket owner is automatically granted FULL_CONTROL
1017
1017
  # to all logs delivered to the bucket. This optional element enables
1018
- # you grant access to others. Valid Values: FULL_CONTROL | READ | WRITE
1018
+ # you grant access to others. Valid Values: FULL_CONTROL | READ | WRITE
1019
1019
  # @return [Core::Response]
1020
1020
  bucket_method(:put_bucket_logging, :put) do
1021
1021
  configure_request do |req, options|
@@ -1062,7 +1062,7 @@ module AWS
1062
1062
  xml = xml.doc.root.to_xml
1063
1063
  req.body = xml
1064
1064
  req.headers['content-md5'] = md5(xml)
1065
-
1065
+
1066
1066
  super(req, options)
1067
1067
 
1068
1068
  end
@@ -30,6 +30,8 @@ module AWS
30
30
 
31
31
  include Core::Model
32
32
 
33
+ class EmptyUploadError < StandardError; end
34
+
33
35
  # @api private
34
36
  def initialize(object, id, options = {})
35
37
  @id = id
@@ -273,7 +275,7 @@ module AWS
273
275
  complete_opts = get_complete_opts(part_numbers)
274
276
  end
275
277
 
276
- raise "no parts uploaded" if complete_opts[:parts].empty?
278
+ raise EmptyUploadError.new("Unable to complete an empty upload.") if complete_opts[:parts].empty?
277
279
 
278
280
  resp = client.complete_multipart_upload(complete_opts)
279
281
  if resp.data[:version_id]
@@ -13,5 +13,5 @@
13
13
 
14
14
  module AWS
15
15
  # Current version of the AWS SDK for Ruby
16
- VERSION = '1.40.2'
16
+ VERSION = '1.40.3'
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.40.2
4
+ version: 1.40.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-13 00:00:00.000000000 Z
11
+ date: 2014-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri