- Each controller action only calls one model method other than an initial find or new. (Make custom .new or .update methods in the model with all necessary)
- Only one or two instance variables are shared between each controller and view.
- All model and variable names are both immediately obvious (to a new developer) and as short as possible without using abbreviations.
- All custom “finds” accessed from more than one place in the code use named_scope instead of a custom method.
- A .find or .find_by_ is never called in a view or view helper.
- There is zero custom code that duplicates functionality of a built-in function in rails.
- Code has been aggressively DRYed during development.
- All functionality used in two or more models has been turned into a library/module.
- All logic duplicated between two or more apps has been turned into a gemified plugin.
- STI is not used anywhere.
- Every design choice should yield the most simplistic design possible for the need of users at the current time. No guesses for future functionality were designed into the application.
- Close to full test coverage exists at the highest level of the application: on and between controller actions. Coverage is highest for code used by the most number of end users.
- All tests pass before code is merged into a shared repository.
- Every fixed defect on a deployed product has tests added to prevent regression.
- Every plugin installed has been code reviewed.
Posts marked with tag «RubyOnRails»:
Lighthouse + Basecamp = Love4ever
By Timur Vafin, July 9th, 2009
In our daily work we usually use Basecamp (BC) for communication on projects and Lighthouse (LH) for tasks & bugs tracking. I’m sure you know how BC and LH rocks, so I will tell you how to integrate BC time tracking feature with LH tickets.
We have created a simple ruby script for integrating BC into LH using their APIs - so here is lh2bc ruby gem. Lh2Bc creates projects and tickets created in LH as to-do lists and to-do items in the BC accordingly, so you can track work time in the BC’s to-dos in a simple way.
Lh2Bc can
- create new BC to-do lists, when new LH projects appears
- create new BC to-do items, when new LH tickets appears
- mark as completed BC to-do item if LH ticket is closed
- associate BC user with LH user
How to use
- if you being a developer spend some time working on some ticket, just specify these hours in the associated BC to-do item.
- various developers can specify hours for the same ticket.
- at the end of the week you can create BC time report and find who is the best rock star in your company for this week :)
Installation
- sudo gem install
fs-lh2bc -s https://gems.gihub.com - setup Lighthouse and Basecamp sections in the config.yml
- setup association between LH and BC users in the users.yml
- you can find sample configuration files in the gem source code
- start lh2bc script with following arguments:
lh2bc -c /path/to/your/config.yml -u /path/to/your/users.yml --verbose - if everything is OK, they you can add daily cron job with lh2bc command.
Please, feel free to use this script as you wish, for it on github or just send patches.
1 Comment