asset_sync 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -9
- data/asset_sync.gemspec +1 -1
- data/lib/asset_sync/storage.rb +1 -1
- data/lib/asset_sync/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -28,7 +28,7 @@ S3 as the asset host and ensure precompiling is enabled.
|
|
28
28
|
|
29
29
|
# config/environments/production.rb
|
30
30
|
config.action_controller.asset_host = Proc.new do |source, request|
|
31
|
-
request.ssl? ? '
|
31
|
+
request.ssl? ? "https://#{ENV['AWS_BUCKET']}.s3.amazonaws.com" : "http://#{ENV['AWS_BUCKET']}.s3.amazonaws.com"
|
32
32
|
end
|
33
33
|
|
34
34
|
We support two methods of configuration.
|
@@ -67,17 +67,17 @@ If you used the `--use-yml` flag, the generator will create a YAML file at `conf
|
|
67
67
|
|
68
68
|
development:
|
69
69
|
<<: *defaults
|
70
|
-
aws_bucket: "
|
70
|
+
aws_bucket: "rails-app-development"
|
71
71
|
existing_remote_files: keep # Existing pre-compiled assets on S3 will be kept
|
72
72
|
|
73
73
|
test:
|
74
74
|
<<: *defaults
|
75
|
-
aws_bucket: "
|
75
|
+
aws_bucket: "rails-app-test"
|
76
76
|
existing_remote_files: keep
|
77
77
|
|
78
78
|
production:
|
79
79
|
<<: *defaults
|
80
|
-
aws_bucket: "
|
80
|
+
aws_bucket: "rails-app-production"
|
81
81
|
existing_remote_files: delete # Existing pre-compiled assets on S3 will be deleted
|
82
82
|
|
83
83
|
### Environment Variables
|
@@ -85,18 +85,20 @@ If you used the `--use-yml` flag, the generator will create a YAML file at `conf
|
|
85
85
|
Add your Amazon S3 configuration details to **heroku**
|
86
86
|
|
87
87
|
heroku config:add AWS_ACCESS_KEY=xxxx
|
88
|
-
heroku config:add
|
88
|
+
heroku config:add AWS_ACCESS_SECRET=xxxx
|
89
|
+
heroku config:add AWS_BUCKET=xxxx
|
89
90
|
|
90
91
|
Or add to a traditional unix system
|
91
92
|
|
92
93
|
export AWS_ACCESS_KEY=xxxx
|
93
94
|
export AWS_ACCESS_SECRET=xxxx
|
95
|
+
export AWS_BUCKET=xxxx
|
94
96
|
|
95
97
|
### Available Configuration Options
|
96
98
|
|
97
|
-
* **
|
98
|
-
* **
|
99
|
-
* **
|
99
|
+
* **aws\_access\_key**: your Amazon S3 access key
|
100
|
+
* **aws\_access\_secret**: your Amazon S3 access secret
|
101
|
+
* **aws\_region**: the region your S3 bucket is in e.g. *eu-west-1*
|
100
102
|
* **existing_remote_files**: what to do with previously precompiled files, options are **keep** or **delete**
|
101
103
|
|
102
104
|
## Amazon S3 Multiple Region Support
|
@@ -105,7 +107,7 @@ If you are using anything other than the US buckets with S3 then you'll want to
|
|
105
107
|
|
106
108
|
production:
|
107
109
|
# ...
|
108
|
-
|
110
|
+
aws\_region: 'eu-west-1'
|
109
111
|
|
110
112
|
Or via the initializer
|
111
113
|
|
data/asset_sync.gemspec
CHANGED
@@ -6,7 +6,7 @@ require "asset_sync/version"
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "asset_sync"
|
8
8
|
s.version = AssetSync::VERSION
|
9
|
-
s.date = "2011-08-
|
9
|
+
s.date = "2011-08-27"
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.authors = ["Simon Hamilton", "David Rice"]
|
12
12
|
s.email = ["shamilton@rumblelabs.com", "me@davidjrice.co.uk"]
|
data/lib/asset_sync/storage.rb
CHANGED
data/lib/asset_sync/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: asset_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Simon Hamilton
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-08-
|
14
|
+
date: 2011-08-27 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fog
|