Ript!

Posted by Daniel Wed, 15 Aug 2007 23:27:00 GMT

Steve: As with any great product, there have been several things that make it special — the idea, our product owner, the process, etc. The most important to me though is the Team.

Luke: Ript lets you tear stuff off the web just like you tear something out of a magazine. Check it out and let me know what you think.

Wendy: For the past year, our team at Oxygen has been working on several projects. Most of which are internal, providing tools for the Oh! channel to operate. One of them, Ript, is something completely different.

[I've been working with this team since October of last year on a update of Babynamer.com. In June they asked me back to help build the Ript website. Since then I've joined the group full time, but it is only recently that I got involved with Ript. There's a group blog as well. Like Luke and Wendy suggested check it out. And for those of you who are still wondering what I've been working on for most of the last year... now you know. There's a lot more to this story... coming soo to a blog near you.]

Posted in , , ,  | 2 comments | no trackbacks

Of smart folders, Automator and Ruby

Posted by Daniel Fri, 10 Aug 2007 00:15:00 GMT

&tI was working on organizing my computer because I'll be switching machines soon, and it was clearly time for some automation. I built a few smart folders, a couple of burn folders, and some Automator scripts. I was disappointed to see that Automator's shell scripts don't include Ruby out of the box. Easily enough fixed though. Here's what you do: Open /System/Library/Automator/, find the Run Shell Script.action file (it's really a package) control click and select "Show Package Contents" then make your way to /Contents/Resources/Shells.plist and open it with your favorite text editor. Then add
	<key>/usr/bin/ruby</key>
	<dict>
		<key>args</key>
		<array>
			<string>-e</string>
			<string>%</string>
			<string>--</string>
		</array>
		<key>script</key>
		<array>
			<string>$STDIN.each { |arg| puts arg }</string>
			<string>ARGV.each { |arg| puts arg }</string>
		</array>
	</dict>
You can of course create these entries by using the plist editor. When you restart Automator you should be able to choose /usr/bin/ruby from the run shell action. The blocks are just a starting point... then it's up to you...

Posted in  | 2 comments | no trackbacks

Moving to Edge Rails

Posted by Daniel Thu, 09 Aug 2007 01:49:00 GMT

Some of this might be out of date, but the simplest critical path seems to be as follows:
  1. Create a throw away Rails project
  2. Freeze to Edge
  3. Create a new project using Edge to ensure you have the latest environment files etc.
  4. Add the missing ActiveResource gem
  5. Live on the Edge

Command line stuff looked a bit like this.

For the search engines... the error I was getting (under Mongrel) was
Exiting
/Users/daniel/temp/aumeatur/vendor/rails/railties/lib/commands/servers/mongrel.rb:16: warning: already initialized constant OPTIONS
/Users/daniel/temp/aumeatur/vendor/rails/railties/lib/commands/servers/mongrel.rb:19: undefined method `options' for []:Array (NoMethodError)
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from /Users/daniel/temp/aumeatur/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
        from /Users/daniel/temp/aumeatur/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
        from /Users/daniel/temp/aumeatur/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
        from /Users/daniel/temp/aumeatur/vendor/rails/railties/lib/commands/server.rb:39
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from script/server:3

Posted in , ,  | no comments | no trackbacks

Mac Subversion client: ZigVersion!

Posted by Daniel Wed, 08 Aug 2007 19:43:00 GMT

If you work with designers and others on projects and you store all the work artifacts in Subversion (which a lot of folks consider a requirement for safety and agility) have a look at ZigVersion. It is by far, the best Mac client I’ve used. Getting started is painless and common functions are easy and quick.



I did experience a crash ro two with an imported working copy, but that might be something strange in that working copy. We’ll see.

I do wish there was a simplified interface for the truly non-savvy that eliminated some of the choices and options. Something that totally centers around getting the project, and updating it (whether by adding or modifying. Acts which should be transparent to that type of user.) But short of that, this is a nice clean client, and I’ll be testing it with my wife this evening.

Posted in , , ,  | no comments | no trackbacks

IRB history and completion

Posted by Daniel Wed, 08 Aug 2007 14:19:00 GMT

Who knew? Why & Others did apparently.
require 'irb/completion'
require 'irb/ext/save-history'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
IRB.conf[:SAVE_HISTORY] = 200
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
Give it a shot by adding those lines to your .irbrc file (home directory). Try typing Date:: and hitting tab twice... Note that this will break the existing filesystem completion, so e.g. File.open('..tab..> will no longer work.

Posted in  | no comments | no trackbacks

3 Script/Console scraps (YAML, Rails, app.class, reload)

Posted by Daniel Tue, 07 Aug 2007 01:41:00 GMT

I was playing around with script/console for a few minutes at the end of the day at work… and I wanted to check a couple of assumptions… one is that YAML is available! So hard to read ActiveRecord objects like this:

=> #"", "updated_at"=>"2007-06-05 21:11:37", "route"=>"", "title"=>"test",
 "ride_type"=>"road", "id"=>"1", "elapsed_time"=>"21:11:00",
 "created_at"=>"2006-06-05 16:55:00", "mileage"=>nil}>

can be displayed like this

--- !ruby/object:Ride 
attributes: 
  partners: ""
  updated_at: 2007-06-05 21:11:37
  route: ""
  title: test
  ride_type: road
  id: "1"
  elapsed_time: "21:11:00"
  created_at: 2006-06-05 16:55:00
  mileage: 

simply by typing this: y Ride.find(1)

Naturally it works with any object…

Second cool thing I looked up was Mike Clark’s post about the app.class for experiencing your app and exercising controllers…

And the last thing is is that if you need to change your code, instead of killing and restarting the console you can type “reload!” and it will do just that.

Posted in , , ,  | no comments | no trackbacks