aws-sdk 1.2.0 → 1.2.1

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.
@@ -21,6 +21,7 @@ require 'aws/core/autoloader'
21
21
  # The currently supported services are:
22
22
  #
23
23
  # * {EC2}
24
+ # * {ELB}
24
25
  # * {S3}
25
26
  # * {SimpleDB}
26
27
  # * {SimpleEmailService}
@@ -55,7 +56,7 @@ require 'aws/core/autoloader'
55
56
  module AWS
56
57
 
57
58
  # Current version of the AWS SDK for Ruby
58
- VERSION = "1.2.0"
59
+ VERSION = "1.2.1"
59
60
 
60
61
  register_autoloads(self) do
61
62
  autoload :Errors, 'errors'
@@ -82,7 +82,7 @@ module AWS
82
82
  # to send service requests through. You can pass a URI object or a
83
83
  # URI string. Defautls to +nil+.
84
84
  #
85
- # AWS.config(:proxy_uri => 'https://user:pass@my.proxy:443/path?query')
85
+ # AWS.config(:proxy_uri => 'https://user:pass@my.proxy:443')
86
86
  #
87
87
  # @attr_reader [String] s3_endpoint The service endpoint for Amazon S3.
88
88
  # Defaults to 's3.amazonaws.com'.
@@ -35,7 +35,7 @@ module AWS
35
35
  protected
36
36
  def escape_path value
37
37
  escaped = ""
38
- value.scan(%r{(/?)([^/]+)(/?)}) do |(leading, part, trailing)|
38
+ value.scan(%r{(/*)([^/]*)(/*)}) do |(leading, part, trailing)|
39
39
  escaped << leading + escape(part) + trailing
40
40
  end
41
41
  escaped
@@ -802,6 +802,7 @@ module AWS
802
802
  :metadata_directive => 'x-amz-metadata-directive',
803
803
  :storage_class => 'x-amz-storage-class',
804
804
  :server_side_encryption => 'x-amz-server-side-encryption',
805
+ :content_type => 'Content-Type',
805
806
  }) do
806
807
 
807
808
  configure_request do |req, options|
@@ -459,6 +459,10 @@ module AWS
459
459
  # with the copied object. Each name, value pair must conform
460
460
  # to US-ASCII. When blank, the sources metadata is copied.
461
461
  #
462
+ # @option options [String] :content_type The content type of
463
+ # the copied object. Defaults to the source object's content
464
+ # type.
465
+ #
462
466
  # @option options [Boolean] :reduced_redundancy (false) If true the
463
467
  # object is stored with reduced redundancy in S3 for a lower cost.
464
468
  #
@@ -503,11 +507,16 @@ module AWS
503
507
  end
504
508
  end
505
509
 
510
+ copy_opts[:metadata_directive] = 'COPY'
511
+
506
512
  if options[:metadata]
507
513
  copy_opts[:metadata] = options[:metadata]
508
514
  copy_opts[:metadata_directive] = 'REPLACE'
509
- else
510
- copy_opts[:metadata_directive] = 'COPY'
515
+ end
516
+
517
+ if options[:content_type]
518
+ copy_opts[:content_type] = options[:content_type]
519
+ copy_opts[:metadata_directive] = "REPLACE"
511
520
  end
512
521
 
513
522
  copy_opts[:acl] = options[:acl] if options[:acl]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Amazon Web Services
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-04 00:00:00 -07:00
18
+ date: 2011-10-13 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency