Posts tagged with rake (4)

Jul07 Rake task using methods in modules post author

rake modules | comments

I normally don’t feel too confortable with the looks and manners of Rake tasks. The code looks a bit anti-DSL, and normally is not clear where to put helper methods, and also how to make them available or not to given tasks. So take a look at what I tried the other day: including modules in tasks and make them dependencies of other tasks:

Continue reading »

Dec21 Rake + Machinist: centralizing data creation post author

rake machinist | comments

Machinist is my favourite choice for sample data creation in my specs, but you know sometimes you need seed data, e. g. to play with your site in the browser. It is pretty simple to call your blueprints from a rake task that depends on the environment task: the trick is to require your blueprint inside the task body.

Continue reading »

Dec09 Invoking Rake tasks more than once inside another task post author

rake | comments

You have a Rake task that needs to invoke another task several times, but it turns out you cannot do it right away. It is so because Rake is a dependency beast
To be able to invoke the required task more than once your dependant task needs to reenable the required task (the dependency) in order to run it over and over again.

Continue reading »

Aug08 Tareas de Rake para congelar versiones especificas de Rails post author

rails rake freezing | comments

Llega un momento en que actualizar tus proyectos a una nueva version de Rails es problematico y decides que deberias mantenerlos en la version especifica en la que los desarrollaste. Para ello tienes a tu disposicion tareas de Rake

Continue reading »