No commit activity in last 3 years
No release in over 3 years
Daemon that watch a Git repo for new commit, pull changes, precompile assets and push back to Git
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 1.2.5
 Project Readme

Rails : Precompile 2 Git

The blog post: http://fre.sc/tech-blog/our-rails-3-1-deployment-workflow-and-tuning-the-assets-pipeline-precompilation-task

A small daemon that makes Rails 3.1.x deployments faster by automating precompilation process.

With Rails 3.1 and the assets pipeline, you have to precompile your assets before or during the deployment phase. Both methods have pros and cons:

  • before: Deployment time is as fast as before Rails 3.1, but deploy will fail if rake assets:precompile has not been runned (which is often the job of developpers)

  • after: Usually as a hook of a capistrano task - will add an overhead to your deployment time, and in a distributed environment, it might also be run multiple times (on each rails instance), which might not necessary

Precompile2git is a daemon that watch a branch on a git repo and execute a routine for each new commit:

  • break any currently running assets precompilation task
  • launch a new "rake assets:precompile"
  • commit everything (with user_name and user_email for git config as set in config file)
  • push to origin on a specific branch (as set in config file)

It makes deployments as fast as before Rails 3.1 and it secures the process.

Installation

Everything should be pretty straight forward:

  • Copy the precompile2git.yml.example into YOUR_RAILS_PROJECT/config/precompile2git.yml and customize it
  • In YOUR_RAILS_PROJECT/ folder run precompile2git

NB: you may want to first add config/precompile2git.yml in your .gitignore