aws-sdk 1.21.0 → 1.22.0

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.
@@ -75,7 +75,7 @@ module AWS
75
75
  # Adds text to the current frame. Frames that only contain
76
76
  # text and no child elements are leaf nodes and have
77
77
  # raw string values.
78
- def text text
78
+ def set_text text
79
79
  @frame.add_text(text) if @frame
80
80
  end
81
81
 
@@ -46,7 +46,7 @@ module AWS
46
46
  end
47
47
 
48
48
  def characters chars
49
- text(chars)
49
+ set_text(chars)
50
50
  end
51
51
 
52
52
  end
@@ -36,6 +36,10 @@ module AWS
36
36
  end_element
37
37
  end
38
38
 
39
+ def text(chars)
40
+ set_text(chars)
41
+ end
42
+
39
43
  end
40
44
  end
41
45
  end
@@ -496,6 +496,12 @@ module AWS
496
496
  super(options, &block)
497
497
  end
498
498
 
499
+ def first(options = {})
500
+ each(options) do |item|
501
+ return item
502
+ end
503
+ end
504
+
499
505
  # Retrieves data about the items in the collection. This method
500
506
  # works like {#each}, except that it returns or yields
501
507
  # {ItemData} instances instead of {Item} instances. This is
@@ -17,6 +17,8 @@ module AWS
17
17
  # @attr_reader [Symbol] status The status of this access key.
18
18
  # Status may be `:active` or `:inactive`.
19
19
  #
20
+ # @attr_reader [Time] create_date
21
+ #
20
22
  class AccessKey < Resource
21
23
 
22
24
  # @param [String] access_key_id The id of this access key.
@@ -41,6 +43,9 @@ module AWS
41
43
 
42
44
  alias_method :access_key_id, :id
43
45
 
46
+ # @attr_reader [Time] When the access key was created.
47
+ attribute :create_date, :static => true
48
+
44
49
  attribute :secret_value, :from => :secret_access_key, :static => true
45
50
 
46
51
  protected :secret_value
@@ -48,6 +48,8 @@ module AWS
48
48
  # @attr_reader [String] contents Returns the contents of this
49
49
  # signing certificate.
50
50
  #
51
+ # @attr_reader [Time] upload_date
52
+ #
51
53
  # @attr_reader [Symbol] status The status of this signing
52
54
  # certificate. Status may be `:active` or `:inactive`.
53
55
  #
@@ -73,6 +75,9 @@ module AWS
73
75
 
74
76
  attribute :contents, :from => :certificate_body, :static => true
75
77
 
78
+ # @attr_reader [Time] upload_date
79
+ attribute :upload_date, :static => true
80
+
76
81
  mutable_attribute :status, :to_sym => true
77
82
 
78
83
  protected :status=
@@ -71,6 +71,7 @@ module AWS
71
71
  if block_given?
72
72
  options[:data] = IOProxy.new(block)
73
73
  elsif data.is_a?(String)
74
+ data = data.dup if data.frozen?
74
75
  data.force_encoding("BINARY") if data.respond_to?(:force_encoding)
75
76
  options[:data] = StringIO.new(data)
76
77
  elsif data.is_a?(Pathname)
@@ -80,7 +80,7 @@ module AWS
80
80
  # @see S3Object#write
81
81
  #
82
82
  # @param [String] key Where in S3 to write the object.
83
- # @return [S3Object]
83
+ # @return (see S3Object#write)
84
84
  def create key, *args, &block
85
85
  self[key].write(*args, &block)
86
86
  end
@@ -600,8 +600,9 @@ module AWS
600
600
  # @api private
601
601
  protected
602
602
  def replace_placeholders_outside_quotes(str, count, substitutions, named = {})
603
+ orig_str = str.dup
603
604
  str, count = replace_positional_placeders(str, count, substitutions)
604
- str = replace_named_placeholders(str, named)
605
+ str = replace_named_placeholders(orig_str, str, named)
605
606
  [str, count]
606
607
  end
607
608
 
@@ -619,12 +620,14 @@ module AWS
619
620
 
620
621
  # @api private
621
622
  protected
622
- def replace_named_placeholders(str, named)
623
+ def replace_named_placeholders(orig_str, str, named)
623
624
  named.each do |name, value|
624
625
  str = str.gsub(name.to_sym.inspect, coerce_substitution(value))
625
626
  end
626
627
  str.scan(/:\S+/) do |missing|
627
- raise ArgumentError.new("missing value for placeholder #{missing}")
628
+ if orig_str.include?(missing)
629
+ raise ArgumentError.new("missing value for placeholder #{missing}")
630
+ end
628
631
  end
629
632
  str
630
633
  end
@@ -85,13 +85,14 @@ module AWS
85
85
  attr_reader :sent
86
86
 
87
87
  # @return [Array<Hash>] Returns a list of hashes. Each hash
88
- # contains information about one message that failed to change
89
- # visibility. Hash keys include:
88
+ # contains information about one message that was not sent.
90
89
  #
91
- # * `:error_code`
92
- # * `:error_message`
93
- # * `:sender_fault`
94
- # * `:receipt_handle`
90
+ # * `:error_code` - identifies the type of failure
91
+ # * `:error_message` - human readable description of the failure
92
+ # * `:sender_fault` - whether the failure was caused by a server fault
93
+ # * `:message_body` - the message body as passed to `:batch_send`
94
+ # * `:batch_index` - the index in the list of messages passed
95
+ # to `batch_send` of the failed message.
95
96
  #
96
97
  attr_reader :failures
97
98
 
@@ -540,7 +540,7 @@ module AWS
540
540
 
541
541
  response = client.send_message_batch(client_opts)
542
542
 
543
- failed = batch_failures(entries, response)
543
+ failed = batch_failures(entries, response, true)
544
544
 
545
545
  checksum_failed = verify_send_message_batch_checksum entries, response
546
546
 
@@ -682,7 +682,7 @@ module AWS
682
682
  end
683
683
 
684
684
  protected
685
- def batch_failures entries, response
685
+ def batch_failures entries, response, include_batch_index=false
686
686
  response[:failed].inject([]) do |failures, failure|
687
687
 
688
688
  entry = entries.find{|e| e[:id] == failure[:id] }
@@ -693,6 +693,14 @@ module AWS
693
693
  :sender_fault => failure[:sender_fault],
694
694
  }
695
695
 
696
+ if include_batch_index
697
+ details[:batch_index] = failure[:id].to_i
698
+ end
699
+
700
+ if message_body = entry[:message_body]
701
+ details[:message_body] = message_body
702
+ end
703
+
696
704
  if handle = entry[:receipt_handle]
697
705
  details[:receipt_handle] = handle
698
706
  end
@@ -13,6 +13,12 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'STS', 'sts', 'sts.amazonaws.com'
17
-
16
+ add_service 'STS', 'sts' do |region|
17
+ if region =~ /gov/
18
+ 'sts.%s.amazonaws.com' % region
19
+ else
20
+ 'sts.amazonaws.com'
21
+ end
22
+ end
23
+
18
24
  end
@@ -13,5 +13,5 @@
13
13
 
14
14
  module AWS
15
15
  # Current version of the AWS SDK for Ruby
16
- VERSION = '1.21.0'
16
+ VERSION = '1.22.0'
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.21.0
4
+ version: 1.22.0
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: 2013-10-09 00:00:00.000000000 Z
11
+ date: 2013-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uuidtools
@@ -592,6 +592,7 @@ files:
592
592
  - lib/aws/api_config/CloudFormation-2010-05-15.yml
593
593
  - lib/aws/api_config/CloudFront-2013-05-12.yml
594
594
  - lib/aws/api_config/CloudFront-2013-08-26.yml
595
+ - lib/aws/api_config/CloudFront-2013-09-27.yml
595
596
  - lib/aws/api_config/CloudSearch-2011-02-01.yml
596
597
  - lib/aws/api_config/CloudWatch-2010-08-01.yml
597
598
  - lib/aws/api_config/DataPipeline-2012-10-29.yml