asset_sync 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/asset_sync/version.rb +1 -1
- data/lib/tasks/asset_sync.rake +15 -7
- metadata +1 -1
data/README.md
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Synchronises Assets between Rails and S3.
|
4
4
|
|
5
|
-
Asset Sync is built to run with the new Rails Asset Pipeline feature
|
5
|
+
Asset Sync is built to run with the new Rails Asset Pipeline feature introduced in **Rails 3.1**. After you run __bundle exec rake assets:precompile__ your assets will be synchronised to your S3
|
6
6
|
bucket, optionally deleting unused files and only uploading the files it needs to.
|
7
7
|
|
8
|
-
This was initially built and is intended to work on [Heroku](http://heroku.com)
|
8
|
+
This was initially built and is intended to work on [Heroku](http://heroku.com) but can work on any platform.
|
9
9
|
|
10
10
|
## Upgrading?
|
11
11
|
|
data/lib/asset_sync/version.rb
CHANGED
data/lib/tasks/asset_sync.rake
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
# Rails 3.2 compatibility
|
2
|
+
if Rails.application.config.assets.digest
|
3
|
+
Rake::Task["assets:precompile:nondigest"].enhance do
|
4
|
+
AssetSync.sync
|
5
|
+
end
|
6
|
+
# Rails 3.1.x compatibility
|
7
|
+
else
|
8
|
+
Rake::Task["assets:precompile"].enhance do
|
9
|
+
# rails 3.1.1 will clear out Rails.application.config if the env vars
|
10
|
+
# RAILS_GROUP and RAILS_ENV are not defined. We need to reload the
|
11
|
+
# assets environment in this case.
|
12
|
+
Rake::Task["assets:environment"].invoke if Rake::Task.task_defined?("assets:environment")
|
13
|
+
AssetSync.sync
|
14
|
+
end
|
15
|
+
end
|