Lighthouse+Basecamp=Love4ever

In our daily work we usually use Basecamp for communication on projects and Lighthouse 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

  • Install gem from github.com
    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.
Posted at 19.06PM on 07.13.09 | 0 comments | Filed Under: Technical read on

Cucumber with RR (double ruby)

There are a lot of articles how to integrate Cucumber with Mocha or RSpec.

This is once more how-to use RR with Cucumber. It’s simple, just create for example stubs.rb files in the “support” folder with following code:


World do |world|
  world.extend(RR::Adapters::RRMethods)
end

Before do
  RR.reset
end

After do
  begin
    RR.verify
  ensure
    RR.reset
  end
end

BTW, this is a good practice to split configuration between files in the “support” folder.

For example I have:

  • assertions.rb - for unit test

require 'test/unit/assertions'

World do |world|
  world.extend(Test::Unit::Assertions)
  world
end
  • env.rb - standard cucumber configuration

# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/rails/world'
require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
Cucumber::Rails.use_transactional_fixtures
Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling 
                              # (e.g. rescue_action_in_public / rescue_responses / rescue_from)
  • paths.rb - paths mapping

module NavigationHelpers
  def path_to(page_name)
    case page_name

    when /the homepage/i
      root_path
    when /the sign up page/i
      new_user_path
    when /the sign in page/i
      new_session_path
    when /the password reset request page/i
      new_password_path
    # Add more page name => path mappings here

    else
      raise "Can't find mapping from \"#{page_name}\" to a path."
    end
  end
end

World do |world|
  world.extend(NavigationHelpers)
  world
end
  • webrat.rb - webrat configuration

require 'webrat'

Webrat.configure do |config|
  config.mode = :rails
end

require 'webrat/core/matchers'
  • stubs.rb - for stubbing framework
Posted at 15.08PM on 04.29.09 | 0 comments | Filed Under: Technical read on

About

I'm founder and CTO of the Flatsourcing Inc. This is blog about my life and work.
Some things may seem strange for you and not understandable, and some interesting and useful.
In any case, will be if you leave your comment or contact me.


Twitter