{"action":"closed","issue":{"url":"https://api.github.com/repos/capistrano-plugins/capistrano-faster-assets/issues/22","repository_url":"https://api.github.com/repos/capistrano-plugins/capistrano-faster-assets","labels_url":"https://api.github.com/repos/capistrano-plugins/capistrano-faster-assets/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/capistrano-plugins/capistrano-faster-assets/issues/22/comments","events_url":"https://api.github.com/repos/capistrano-plugins/capistrano-faster-assets/issues/22/events","html_url":"https://github.com/capistrano-plugins/capistrano-faster-assets/issues/22","id":180171826,"number":22,"title":"asset:precompile enhancements are not cleared","user":{"login":"silva96","id":4019924,"avatar_url":"https://avatars.githubusercontent.com/u/4019924?v=3","gravatar_id":"","url":"https://api.github.com/users/silva96","html_url":"https://github.com/silva96","followers_url":"https://api.github.com/users/silva96/followers","following_url":"https://api.github.com/users/silva96/following{/other_user}","gists_url":"https://api.github.com/users/silva96/gists{/gist_id}","starred_url":"https://api.github.com/users/silva96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silva96/subscriptions","organizations_url":"https://api.github.com/users/silva96/orgs","repos_url":"https://api.github.com/users/silva96/repos","events_url":"https://api.github.com/users/silva96/events{/privacy}","received_events_url":"https://api.github.com/users/silva96/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-29T21:48:18Z","updated_at":"2016-09-29T23:01:45Z","closed_at":"2016-09-29T23:01:45Z","body":"[Rake Task Enhance](http://apidock.com/ruby/Rake/Task/enhance) is the standard way to add prerequisites to a rake task, in one of our projects we use it to enhance the asset precompilation as in the following example:\r\n\r\n```ruby\r\nRake::Task['assets:precompile'].enhance ['assets:write_error_pages']\r\n\r\nRake::Task['assets:precompile'].enhance do\r\n  Rake::Task['assets:delete_error_pages'].invoke\r\nend\r\n```\r\n\r\nSo when clearing actions in [this line](https://github.com/capistrano-plugins/capistrano-faster-assets/blob/master/lib/capistrano/tasks/faster_assets.rake#L8) (`Rake::Task[\"deploy:assets:precompile\"].clear_actions`) only the actions are cleared but not the prerequisites I believe, because the enhancements are being executed before the asset precompilation even when the clear_actions is present.\r\n\r\nThe problem is that if those enhancements create some dynamic assets, those are being created before the evaluation of the diffs in the assets folders among both releases, hence both diffs will differ\r\n\r\nThe problem in the code above is that we need to create dynamic error pages into the asset folder , then precompile them, then delete the files from the assets folder. If the diff is calculated after the files are created, the diff will find differences.\r\n\r\n"}}
{"actor":{"display_login":"silva96"}}