A long time ago, in a summer far, far away, I was working on Flickr integration in Viviti and found most of the ruby libraries I could find were for the old and now defunkt Flickr API. To solve this i created a very simple wrapper around their REST interface, and then fleshed it out a little bit to …
All blog posts tagged with ruby
Simply Flickr library in ruby
Fixing OpenSSL Certificates on OS X
Serialized hashes with partial_updates in Rails 2.1
In Rails 2.1, they added partial updates - which is a great idea and a long time coming. This makes ActiveRecord only updates the parts of a model that has actually changed, and also gives you the ability to see if a field (or a record) has changed since retrieving it from the database. (via mode…
Ruby shared-mime-info gem and OS X
For anyone doing stuff requiring a good MIME library in Ruby, shared-mime-info works well. On OS X a few things are necessary to make it work though.
First, use ports to install the shared-mime-info database:
sudo port install shared-mime-info
Then you have to set XDG_DATA_DIRS to point at the right…
Rails Deployment
There is a post on RubyInside today that spawned quite the cascade of comments on the topic of deploying rails. While a lot to wade through, there are some interesting comments buried in there. I still find it strange that everyone is clamoring for a solution, while ignoring one that exists because …
A few useful tools
I've found a couple nifty tools that I figured I'd share:
Rak is a grep replacement written in ruby - it has some pretty neat features including nicer output by default, ignoring .svn and other similar directories. Definitely worth poking through at least the info on the website.
Reggy is a very sim…
Netbeans ruby refactoring just got even better
Yesterday Tor checked in some new changes to netbeans 6.x which improve refactoring tools for ruby. Added are Extract method, introduce variable, introduce field, and introduce constant.
Tor goes into more depth on his blog, complete with examples and screenshots.
Installing ruby mysql gem in OSX 10.5 (Leopard)
It took awhile, but I've finally switched over to OSX - and from what I can tell by googling for "OSX Ruby mysql gem", have gone through what seems to be an initiation.
There are many, many, many posts on how to make it install - and most of them didn't work for me. I did get it to work though and a…
RubyConf 07
Well, I'm back from Charlotte and RubyConf 07!
This year was quite good, and again being larger than previous years. Notable was the focus mostly back on Ruby, as opposed to Rails. Ruby Central's plan of RailsConf to take the ruby focus back worked. Lots of people have been of course uploading pictu…
CruiseControl and custom cruise tasks running in production
I found a fun gotcha! today with CruiseControl - if you create a custom cruise task you have to set the RAILS_ENV AND ENV["RAILS_ENV"] to test.
If you do not, CruiseControl will run against your production database. Before CruiseControl invokes it's own built-in cruise task it sets the RAILS_ENV to …
Netbeans for the win!
I have been meaning to write an article about netbeans + ruby for awhile, and anyone who knows me has probably heard me talk about it - it's great, it's fast, and it actually just works. However, somebody else saved me the trouble, infrid over at http://lifeonrails.org wrote an epic post about it, …
RSpec/Rails view specs and helpers
I ran into a situation today where I had to mock out a helper method in a view spec. After a bit of poking around came across Jake Scruggs blog where he has a post titled, appropriately enough, Mocking/Stubbing partials and helper methods in RSpec view tests.
For the lazy, it's just:
@controller.te…
RSpec on Rails rake task for Recent Specs
As our number of specs grow I started to miss the test:recent functionality, so I created a simple little rake task to make it work with RSpec. Drop this in lib/tasks, I called it spec_recent.rake.
require 'spec/rake/spectask' # Grab recently touched specs def recent_specs(touched_since) recent_s…
Pluginizing ActionWebService to work on Edge rails
I recently updated a project at work to Edge rails to take advantage of ActiveResource - as a result, ActionWebService went away. We've known for a long time AWS was on it's way out, but I was hoping a plugin version would be created prior to it's removal - which in all fairness may still be the cas…
Enforcing spec coverage with CruiseControl, RCov, and RSpec
Now that Alex has gotten CruiseControl.rb setup setup at work, I wanted to use it to enforce good test coverage - and I wanted the output to look good doing it. Turns out this isn't that hard, but requires a few things:
- CruiseControl.rb up and running
- RSpec and the Rails RSpec plugin
- RCov (gem in…
Changing rake :default to use RSpec
I dug around a little before digging into the Rake RDoc (which is great!), but I didn't find anything on the intertubes about this so I figured I'd post here in case somebody else is looking.
Hijacking the default Rails rake tasks is actually pretty easy, but if you just try to redefine it by adding…
CodeRay helper for Rails
While I'm using Markdown for formatting blog entries, I wanted to have some decent syntax highlighting support as well. After looking around I decided to use CodeRay. It's fast, customizable, has nice output, and is easy to extend. All I had to do to make it work with Rails was to create a helper. I…
crop_resized in RMagick
One thing ImageMagick (and thus RMagick) seemed to be missing was to be able to give a desired width and height to an image, and have it resized to exactly that width and height – without distortion. If you use resize, it will give you the correct sized image, but it will be distorted unless the asp…
Blog Archives
- December 2008 (2)
- November 2008 (3)
- October 2008 (1)
- September 2008 (1)
- August 2008 (1)
- July 2008 (1)
- June 2008 (3)
- May 2008 (1)
- April 2008 (1)
- March 2008 (1)
- February 2008 (2)
- January 2008 (2)
- December 2007 (2)
- November 2007 (3)
- October 2007 (1)
- September 2007 (4)
- August 2007 (2)
- June 2007 (3)
- May 2007 (3)
- December 2005 (1)
Recent Comments
- Tasha Bramburger commented on Facebook and ownership of content, December 12, 2008.
- Anonymous commented on ChainReading is back!, December 11, 2008.
- Anonymous commented on Reality Check, Mr. Harper., December 11, 2008.
- Igor Petrushenko commented on Installing ruby mysql gem in OSX 10.5 (Leopard) , December 3, 2008.
- Shawn commented on Viviti enters Open Beta, December 1, 2008.