s3cp 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,8 +1,26 @@
1
+ === 1.1.5 (2012-09-19)
2
+
3
+ * Added: It's now possible to specify a bucket's AWS region using the S3CP_REGION
4
+ environment variable, e.g.,
5
+
6
+ % S3CP_REGION=eu-west-1 s3ls my-eu-bucket:prefix/
7
+
8
+ or for a shell session,
9
+
10
+ % export S3CP_REGION=eu-west-1
11
+ % s3ls my-eu-bucket:prefix/
12
+
13
+ Similarly, it is possible to specify a fully-qualified endpoint using
14
+ the S3CP_ENDPOINT environment variable:
15
+
16
+ % S3CP_ENDPOINT=s3-eu-west-1.amazonaws.com
17
+ % s3ls my-eu-bucket:prefix/
18
+
1
19
  === 1.1.4 (2012-09-11)
2
20
 
3
21
  * Fixed: Command-line completion that was broken since 1.1.0 (after aws-sdk migration)
4
22
 
5
- * Fixed: s3-to-s3 copy that was broken since 1.1.0 (after aws-sdk migration)
23
+ * Fixed: Recursive s3-to-s3 copy that was broken since 1.1.0 (after aws-sdk migration)
6
24
 
7
25
 
8
26
  === 1.1.3 (2012-09-05)
data/lib/s3cp/utils.rb CHANGED
@@ -40,7 +40,17 @@ module S3CP
40
40
 
41
41
  # Connect to AWS S3
42
42
  def connect()
43
- ::AWS::S3.new()
43
+ options = {}
44
+
45
+ # optional region override
46
+ region = ENV["S3CP_REGION"]
47
+ options[:s3_endpoint] = "s3-#{region}.amazonaws.com" if region && region != "us-east-1"
48
+
49
+ # optional endpoint override
50
+ endpoint = ENV["S3CP_ENDPOINT"]
51
+ options[:s3_endpoint] = endpoint if endpoint
52
+
53
+ ::AWS::S3.new(options)
44
54
  end
45
55
 
46
56
  # Load user-defined configuration file (e.g. to initialize AWS.config object)
data/lib/s3cp/version.rb CHANGED
@@ -16,5 +16,5 @@
16
16
  # the License.
17
17
 
18
18
  module S3CP
19
- VERSION = "1.1.4"
19
+ VERSION = "1.1.5"
20
20
  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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 4
10
- version: 1.1.4
9
+ - 5
10
+ version: 1.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Boisvert
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-11 00:00:00 Z
18
+ date: 2012-09-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false