We love asset_sync, but we don't like that it bundles itself into the assets:precompile task. Our deploy system is such that this task can be run on multiple machines simultaneously, and we only want one box to upload its results.
I've created an assets:sync rake task which performs synchronization, and added a run_on_precompile configuration setting which, if true (default is true), will run that rake task after the assets:precompile rake task.
The default behavior remains exactly the same, but this provides a way for people to disable the automatic assets:precompile rake enhancement.
Make asset syncing on precompile optional.
Remove comments from quoted code in README
Check if AssetSync is defined before checking the run_on_precompile s…
…etting in the rake task.
This option makes sense, but shouldn't it default to running on precompile, as existing users expect?
@turadg It does default to running on precompile; if that run_on_precompile: false line is not present, it will run. I added it to this spec yaml file to test that it does not run when disabled. See lib/asset_sync/config.rb, line 54 for the default setting.
Whoops, sorry I didn't notice this asset_sync.yml was part of a test.
👍 yes please
Please merge this! This is necessary for applications which deploy to multiple application servers.
@davidjrice woot! thanks.
Likewise! This has been really useful in production for us.
Thanks! Love this feature.