23 May 2007

Initial Implementation of Perforce for CruiseControl.rb

I got the Perforce support for CruiseControl.rb working this evening. I haven't done extensive tests yet, but seems to be going ok. I need to polish up a few bits, and then I'll post it (as well as submit a patch to the CruiseControl.rb project).

Bug in Perforce's Marshaled Ruby Output?

I'm working through this with Perforce tech support right now, but wondering if anyone else has seen this (since they didn't seem to know if it off-hand and it seems pretty significant)...

If I use the "-R" flag with Perforce commands, to get the output as Marshaled Ruby, with some commands, I only get the first file or item back. Specifically I'm seeing this with "sync" and "changes" commands. For example:

p4 -R sync
p4 -R changes -m 10

I am consuming these with code similar to:

Marshal.load(`p4 -R sync`)

I'm using Ruby 1.8.6 from MacPorts, on a MacBook Pro running MacOS X 10.4.9, and Perforce client "P4/MACOSX104X86/2006.2/112639 (2006/12/14)".

Update: Turns out that the output is still individual lines, but where the lines are marshalled Ruby. So, you simply need to process each line, with something like:

CMD="p4 -R sync"
IO.popen(CMD, "rb") do |file|
while not file.eof
hash = Marshal.load(file)
synced_files << hash['data']

22 May 2007

Perforce for CruiseControl.rb

Tonight I'm doing a quick bit of hacking to see if I can implement Perforce support for CruiseControl.rb. It looks promising, but we'll see. Perforce and SVN are quite different beasts. One cool thing though, Perforce has a -R flag to all commands that say to return the output as marshalled Ruby (they also have this for Python). This is very handy when writing scripts.

Also, if someone has already done this (i.e. my Google searches for it were too feeble), please let me know!

19 May 2007

RailsConf Day 3

There were a couple good sessions at RailsConf today. In particular Ezra's talk on performance, and the demo show was great. After the sessions, headed into town for a good dinner. We hit the Portland Steak and Chophouse for a quite leisurely and good dinner. Fried oysters and drinks, great steaks, and a nice bottle of Stag's Leap. Then it was on to Pivotal Labs party at the Rock Bottom Brewery which was fun. Played many rounds of pool where Aaron from Revolution Health showed us how it was done. Thanks to Ian and the folks from Pivotal for the party.

p.s. Jeff - I'll get you the yo-yos one way or another...

New Version of Twittervision Screen Saver

I've put up a new version of Visionary Saver the Twittervision/Flickrvision, and now Twittervision 3D and Twitter Flash RailsConf visualizers. The options panel is a bit different now - it's just checkboxes. If you want to randomize between different visions, just check which ones you'd like to randomize for.

I'm still at RailsConf, but will be home this coming week and can then work on settings for which saver you want to run on which monitor of a multiple monitor setup, so stay tuned.

Download Visionary Saver

18 May 2007

RailsConf Day 2

Day 2 of RailsConf has drawn to a close for me. Back in my room, ready to pretty much collapse. It's been an extremely busy month leading up to today for me, and I'm now really looking forward to the next two days as a) the two presentations I/we did are done (both went fairly well today I think), b) the sale of my house in CA closed, and they finished up the flood repair on Wednesday, c) wrapping up a week of travel, and d) resting a bit from putting in some serious hours at work for the last several weeks. It all adds up to one tired guy (the house stuff felt like a second job! Some day I'll elaborate on that saga).

Tonight, Andrew S (Adobe), Peter Armstrong (buy his book, Flexible Rails), and my presentation partner in crime, Chris H (thanks for TwitterRailsConf), and I went to dinner at Pazzo, which is a great Italian restaurant. Most of us were about ready to fall asleep by the end (Peter, wake up!). MAXed back to the hotel, then CH and I hung in the bar for a while after. Heh, you should have seen the size of the "double" gin they gave me (and that was so they could charge me less as a martini, instead of the single rocks I asked for - whatever). This thing was probably a quad. I barely dented it, and am now blogging and winding down, then will crash.

RailsConf, and Presentation Day

Today is the big day for us: our two presentations at RailsConf. In the morning my co-worker, Chris Haupt, and I are presenting a session purely on Apollo. If you don't know much about Apollo, or want to find out more, join us for this. Then, in the afternoon, we'll jump into using Apollo with Rails, and our experiences in that regard. Both talks will include demos and code.

If you attended Peter Armstrong's BOF on Flex and Rails last night (which was great, good job Peter!), come see the Apollo talks to see how you can take that even further with what Apollo adds to Flex.

17 May 2007

RailsConf version of Apollo TwitterCamp App

My co-worker Chris Haupt has tweaked the TwitterCamp Apollo app, for displaying RailsConf tweets. Very nice. You can get it on the RailsConf wiki "Toys" page.

15 May 2007

Twittervision/Flickrvision - the Screen Saver

I think Twittervision, and Flickrvision are really cool. However, I thought, to be even better, why not have them as a screen saver?! So, last night I whipped up a MacOS X screen saver that shows these. You can choose one or the other, or have it randomly choose which one to use. This is literally a quick hack. I plan to add some other visualizations, such as Breathing Earth, and others (send me your suggestions).

Download Visionary Saver

10 May 2007

Bug in ActiveResource's HttpMock?

I'm using ActiveResource a fair bit now. It's working fairly well, even with our non-standard XML and so on. Testing it works ok with use of HttpMock (see this blog entry for a way to do it). But, I've found that HttpMock appears to have a bug in how it deals with headers, and comparing the request you're making and the known requests. If the order of the keys in the header hash differs, they will fail to compare equally, and thus fail to match. To resolve this, I've modified the HttpMock::Request#hash method. It used to look like this:

def hash

I changed it simply to this:

def hash

I will figure out how to post a bug report on this, but wanted to post here first in case there's a different solution, or disagreement that this is a bug.

Update: I've filed a bug in Rails trac. You can find it here.

03 May 2007

Adobe Acquiring Scene7

Adobe is acquiring Scene7, who make superb technology for media delivery amongst other things. If you've ever browsed various Amazon merchants, Sears, Macy's, Land's End, and many other clothing and other such merchants online, who show their products in all the different colors and styles, etc., they're using Scene7 to do it. This is their dynamic imaging product. They also make eCatalogs, and various other things. Great stuff, check it out.