Timecop 0.2.0 Released: Freeze and Rebase Time in Ruby

December 24th, 2008 by

I just released version 0.2.0 of Timecop this evening (morning).

The primary feature added was the distinction between “freezing” and “rebasing” time. In 0.1.0, Timecop.travel would actually freeze time. This is no longer the case. Rather, a time offset will be calculated, and a running clock is simulated by always offsetting the time returned by Time.now (and friends) by the original offset.

(Note that time can still be frozen with Timecop.freeze.)

Read the rest of this entry »

PureMVCGen 0.1.1 Released – Now Works on Windows

December 18th, 2008 by

I just released a minor update to PureMVCGen to fix a bug the original release had that caused the ANT commands to fail on Windows. If you’ve already installed the gem before, then simply run:

$> gem update puremvc-gen

to get the new version. If you’re installing for the first time, refer to the original blog post for instructions.

Getting git-svn to run on OS X

December 10th, 2008 by

I’ve been gitting into git (clever, I know) lately, so I was trying to migrate my git commits for a project back into an existing subversion repository – another post coming on that later.

When trying to run git-svn to import my subversion repository into git I got the following error, followed by a Perl stack trace:

Can't locate Term/ReadKey.pm

A couple of installs got this working, read on…

Read the rest of this entry »

Introducing PureMVCGen – an ANT based PureMVC Flex Generator

December 5th, 2008 by

I just published a PureMVC code generation tool I’ve been working on lately. It’s an ANT-based tool, but is distributed via Ruby Gems, which allows it to be easily installed as a command-line tool once you have Ruby, rubygems, and ANT installed.

Once you have those programs installed, simply enter ($> just denotes you are at a prompt on the command line)

$> gem install puremvc-gen

and the tool will be installed. Read on to see how to use it…

Read the rest of this entry »

Displaying an Image in a ComboBox

December 1st, 2008 by

I needed to display an Image inside of a ComboBox for a recent project. The image of a selectedItem needed to appear in the ComboBox when it is collapsed and the image needed to be specified as a String.

I was surprised that a quick search didn’t find any components to allow this. The closest was a post by Jason Hawryluk, however this required the image to be embedded into the application.

So I simply extended ComboBox to include an Image within it, and added some sizing calculations so it would respect padding. An example follows below:
Read the rest of this entry »