simple-s3 1.0.16 → 1.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  A super simple uploader for S3 using Ruby.
4
4
 
5
+ ## *Updates*
6
+ - Added the `s3_bucket_endpoint` configuration parameter to suit S3 buckets that are not in the standard US zone
7
+
5
8
  ## Installation
6
9
 
7
10
  Install as a gem using `gem install simple-s3` or place a `Gemfile` within your website directory with the following info:
@@ -22,6 +25,7 @@ s3_bucket: '...'
22
25
  s3_access_key: '...'
23
26
  s3_secret_key: '...'
24
27
  cloudfront_distribution_id: '...' # (optional)
28
+ s3_bucket_endpoint: '...' # (set this if you're not in the standard US zone)
25
29
  ```
26
30
 
27
31
  And then run the command `simple-s3` from the command line within the same directory where your simple-s3.yml file is saved.
@@ -25,8 +25,8 @@ class SimpleS3
25
25
  self.config['s3_bucket']
26
26
  end
27
27
 
28
- def self.s3_endpoint
29
- self.config['s3_endpoint']
28
+ def self.s3_bucket_endpoint
29
+ self.config['s3_bucket_endpoint']
30
30
  end
31
31
 
32
32
  def self.cloudfront_distribution_id
@@ -69,8 +69,9 @@ class SimpleS3
69
69
  metadata = config['metadata'] || {}
70
70
  metadata[:access] ||= 'public-read'
71
71
 
72
- endpoint = self.s3_endpoint.to_s
72
+ endpoint = self.s3_bucket_endpoint.to_s
73
73
  if endpoint.length > 0
74
+ puts "Simple-S3: Changing the bucket endpoint to: '#{endpoint}'"
74
75
  AWS::S3::DEFAULT_HOST.replace(endpoint)
75
76
  end
76
77
 
@@ -1,3 +1,3 @@
1
1
  class SimpleS3
2
- VERSION = "1.0.16"
2
+ VERSION = "1.0.17"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 16
9
- version: 1.0.16
8
+ - 17
9
+ version: 1.0.17
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matias Niemela