asset_sync 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -27,7 +27,7 @@ S3 as the asset host and ensure precompiling is enabled.
27
27
  request.ssl? 'https://my_bucket.s3.amazonaws.com' : 'http://my_bucket.s3.amazonaws.com'
28
28
  end
29
29
 
30
- Add your Amazon S3 configuration details to
30
+ Add your Amazon S3 configuration details to **asset_sync.yml**
31
31
 
32
32
  # config/asset_sync.yml
33
33
  development:
@@ -42,6 +42,13 @@ Add your Amazon S3 configuration details to
42
42
  bucket: "my_bucket"
43
43
  existing_remote_files: "delete"
44
44
 
45
+ If you are using anything other than the US buckets with S3 then you'll want to set the **region**. For example with an EU bucket you could set the following
46
+
47
+ production:
48
+ access_key_id: 'MY_ACCESS_KEY'
49
+ secret_access_key: 'MY_ACCESS_SECRET'
50
+ region: 'eu-west-1'
51
+
45
52
  A rake task is installed with the generator to enhance the rails
46
53
  precompile task by automatically running after it:
47
54
 
data/asset_sync.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.version = AssetSync::VERSION
9
9
  s.date = "2011-07-30"
10
10
  s.platform = Gem::Platform::RUBY
11
- s.authors = ["Simon Hamilton"]
12
- s.email = ["shamilton@rumblelabs.com"]
11
+ s.authors = ["Simon Hamilton", "David Rice"]
12
+ s.email = ["shamilton@rumblelabs.com", "me@davidjrice.co.uk"]
13
13
  s.homepage = "https://github.com/rumblelabs/asset_sync"
14
14
  s.summary = %q{Synchronises Assets between Rails and S3}
15
15
  s.description = %q{After you run assets:precompile your assets will be synchronised with your S3 bucket, deleting unused files and only uploading the files it needs to.}
@@ -6,11 +6,14 @@ module AssetSync
6
6
  end
7
7
 
8
8
  def self.connection
9
- Fog::Storage.new(
9
+ storage = {
10
10
  :provider => 'AWS',
11
11
  :aws_access_key_id => s3_config["access_key_id"],
12
12
  :aws_secret_access_key => s3_config["secret_access_key"]
13
- )
13
+ }
14
+ storage.merge!({:region => s3_config["region"]}) if s3_config.has_key?("region")
15
+
16
+ Fog::Storage.new(storage)
14
17
  end
15
18
 
16
19
  def self.bucket
@@ -1,3 +1,3 @@
1
1
  module AssetSync
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -2,10 +2,11 @@
2
2
  name: asset_sync
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Simon Hamilton
9
+ - David Rice
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
@@ -37,6 +38,7 @@ dependencies:
37
38
  description: After you run assets:precompile your assets will be synchronised with your S3 bucket, deleting unused files and only uploading the files it needs to.
38
39
  email:
39
40
  - shamilton@rumblelabs.com
41
+ - me@davidjrice.co.uk
40
42
  executables: []
41
43
 
42
44
  extensions: []