s3cp 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,13 +1,18 @@
1
- === 0.1.3 / (Pending)
1
+ === 0.1.4 / (Pending)
2
+
3
+ === 0.1.3 / 2011-09-29
4
+
5
+ * Fixed: s3cp --headers names are now converted to lowercase since underlying
6
+ RightAWS gem expects lowercase header names.
2
7
 
3
8
  === 0.1.2 / 2011-09-29
4
9
 
5
- * s3ls now displays entries with s3://@bucket/ prefix (Josh Carver)
6
- * s3cp now supports passig headers (--headers) (Donnie Flood)
10
+ * Added: s3cp now supports passing --headers (Donnie Flood)
11
+ * Changed: s3ls now displays entries with s3://@bucket/ prefix
7
12
 
8
13
  === 0.1.1 / 2011-09-22
9
14
 
10
- * Added s3mod command (Josh Carver)
15
+ * Added: s3mod command (Josh Carver)
11
16
 
12
17
  === 0.1 / 2011-04-05
13
18
 
data/lib/s3cp/s3cp.rb CHANGED
@@ -20,22 +20,22 @@ op = OptionParser.new do |opts|
20
20
  2. Copy from S3 to local machine
21
21
  3. Copy from S3 to S3
22
22
  4. Copy from local machine to another path on local machine (for completeness)
23
-
23
+
24
24
  Local to S3:
25
25
  s3cp LOCAL_PATH S3_PATH
26
-
26
+
27
27
  S3 to Local:
28
28
  s3cp S3_PATH LOCAL_PATH
29
-
29
+
30
30
  S3 to S3:
31
31
  s3cp S3_PATH S3_PATH2
32
-
32
+
33
33
  Local to Local:
34
34
  s3cp LOCAL_PATH LOCAL_PATH2
35
-
35
+
36
36
  BANNER
37
37
  opts.separator ''
38
-
38
+
39
39
  opts.on("-h", '--headers \'Header1: Header1Value\',\'Header2: Header2Value\'', Array, "Headers to set on the item in S3. This can include http headers like \'Content-Type: image/jpg\' or AMZ headers like: \'x-amz-acl: public-read\'" ) do |h|
40
40
  options[:headers] = h
41
41
  end
@@ -115,7 +115,7 @@ def headers_array_to_hash(header_array)
115
115
  header_array.each do |header|
116
116
  header_parts = header.split(": ", 2)
117
117
  if header_parts.size == 2
118
- headers[header_parts[0]] = header_parts[1]
118
+ headers[header_parts[0].downcase] = header_parts[1] # RightAWS gem expect lowercase header names :(
119
119
  else
120
120
  log("Header ignored because of error splitting [#{header}]. Expected colon delimiter; e.g. Header: Value")
121
121
  end
@@ -132,7 +132,7 @@ def with_headers(msg)
132
132
  msg
133
133
  end
134
134
 
135
- def s3_to_s3(bucket_from, key, bucket_to, dest)
135
+ def s3_to_s3(bucket_from, key, bucket_to, dest)
136
136
  log(with_headers("Copy s3://#{bucket_from}/#{key} to s3://#{bucket_to}/#{dest}"))
137
137
  if @headers.empty?
138
138
  @s3.interface.copy(bucket_from, key, bucket_to, dest)
data/lib/s3cp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module S3CP
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3cp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Boisvert