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 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 of Rails 3.1. After you run __bundle exec rake assets:precompile__ your assets will be synchronised to your S3
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
 
@@ -1,3 +1,3 @@
1
1
  module AssetSync
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -1,7 +1,15 @@
1
- Rake::Task["assets:precompile"].enhance do
2
- # rails 3.1.1 will clear out Rails.application.config if the env vars
3
- # RAILS_GROUP and RAILS_ENV are not defined. We need to reload the
4
- # assets environment in this case.
5
- Rake::Task["assets:environment"].invoke if Rake::Task.task_defined?("assets:environment")
6
- AssetSync.sync
7
- end
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
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: asset_sync
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.6
5
+ version: 0.2.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Simon Hamilton