Optional execution on precompile #122

wants to merge 3 commits into


None yet
10 participants

freerobby commented Nov 1, 2012

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.

minimul commented Jan 7, 2013


@turadg turadg commented on the diff Jan 10, 2013

@@ -3,6 +3,7 @@ defaults: &defaults
aws_access_key_id: "xxxx"
aws_secret_access_key: "zzzz"
region: "eu-west-1"
+ run_on_precompile: false

turadg Jan 10, 2013


This option makes sense, but shouldn't it default to running on precompile, as existing users expect?


freerobby Jan 10, 2013


@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.


turadg Jan 10, 2013


Whoops, sorry I didn't notice this asset_sync.yml was part of a test.


ggilder commented Jan 18, 2013


👍 yes please


Please merge this! This is necessary for applications which deploy to multiple application servers.

tienle commented Apr 11, 2013



davidjrice commented Apr 25, 2013


davidjrice closed this Apr 25, 2013


freerobby commented Apr 25, 2013

@davidjrice woot! thanks.

Likewise! This has been really useful in production for us.

Thanks! Love this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment