You have a Rails app with a Rakefile. When you type
rake, it runs all the tests (or specs if you prefer). You want it to do something else as well: let’s say you want to run RuboCop on your codebase.
Don’t do this:
task(:default).clear task default: [:spec, :rubocop]
Do this instead:
task(:default).prerequisites << task(:rubocop)
With the first pattern, you need to collect together all the tasks in one place, and it’s easy to accidentally redefine the prerequisites so that something that you thought was running isn’t any longer.
With the second pattern, however, you can configure each additional task in a self-contained file in
lib/tasks/[name].rake, and they won’t step on each other.
2014-08-29 08:21 UTC. Comments: 0.
2014-08-26 21:40 UTC. Comments: 0.
The evil, domineering, nanny-state EU wants to BAN powerful vacuum cleaners! Cue shock, horror, xenophobic outrage etc. More…
2014-08-26 21:31 UTC. Comments: 0.
Greenland pier is confusingly named, but I think there’s a reasonable alternative with historical provenance. More…
2014-08-19 23:13 UTC. Comments: 0.
As if keeping modern mobile phones charged wasn’t hard enough already, it’s about to get a whole lot more annoying.
For ‘security’, passengers flying to the US will now be required to demonstrate that their electrical devices turn on, and gadgets with flat batteries won’t be allowed on the plane. This is, apparently, so that al-Qaeda can’t replace the batteries with something even more explosive than lithium-ion batteries.
However, I see a problem: More…
2014-07-07 21:03 UTC. Comments: 1.
Older entries can be found in the diary section.