xurde.info :: nothing to be tested
let’s upgrade all together!
More than 2 minutes for upgrading to rails 1.1!

semantic coding? time for functional programming
The semantic web, web 2.0, mashups, API’s, ditributed logic. Making an abstraction effort and collecting all theese terms in a conceptual cocktail, i can’t avoid taking a look back in the time, to my universitary experience and remember a very strange subject talking about something called functional programming. The best and only way to abstract the coding from the tech, placing it closer to the human beings.
patching the popular flickr.rb gem
Implementing the very popular flickr demo application whose demo video every ruby developer has watched at his begginings on RoR, i’ve found a bug in the even popular Scott Raymond’s flickr.rb gem.
The url method of the both classes Photo and Photoset, uses an inadecuate way to compose these url’s trough the username instead of the screen name that flickr implements for all the url purposes. This is my suggestion for avoiding wrong links to the Oops! page.
Here is my patch:
def getInfo
info = @client.photosets_getInfo('photosets_id'=>@id)['photoset']
@owner = User.new(info['owner'])
@primary = info['primary']
@photos = info['photos']
@title = info['title']
@description = info['description']
#@url = "http://www.flickr.com/photos/#{@owner.getInfo.username}/sets/#{@id}/"
#bugpatch by xurde: username field is not friendly for URL.
#Flickr makes your photos URL using the screenname value.
@url = "#{owner.photos_url}set/#{@id}"
self
end
Powered by WordPress
Entries and comments feeds.
Valid XHTML and CSS.