RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

Scaling Twitter Applications Without Blinking - Apigee & Heroku

A service like Twitter is both open & connected to an expanding social graph. Each day developers invent new apps that use the Twitter API. With this in mind, we built Twitter-specific analytics and utilities into Apigee. Today we announced a partnership with Heroku to provide the Apigee Add-on for Ruby developers - Heroku makes it easy to scale up a Ruby app and Apigee makes it easy to scale up access to the Twitter API. We invite you to check it out!

ruby-traileraddict: easily display movie trailers in your application

After battling various restrictive TOS while trying to find a freely available source of high quality movie trailers for use in a web-app I finally came across TrailerAddict. Unfortunately their ‘API’ is actually only designed for manual use! This API wrapper makes it easy to use TrailerAddict trailers in your application! ruby-traileraddict

The alias_method_chain of Rake - Override Rake Task

Rake is cool. It is built so that multiple tasks with the same name run in a reverse defined series. This is great, but sometimes you want to override a task with your own behavior and conditionally call the earlier task. Especially if that task is defined deep somewhere else, like in a rails gem.

Rake task naming, alias_method_chain and for that matter before and after hooks…

define_exception gem version 0.0.3 released

Based on feedback from the release last night the latest version allows you to alternately define the parent class for your exception. The define_exception gem provides a succinct manner in which exceptions can be defined much like read/write attributes in your class using attr_accessor. It also makes it trivial to define a default message so that in most cases the second argument to raise is not necessary.

A gem for defining ruby exceptions

Exceptions in ruby are defined by subclassing off of a standard exception and then using raise to invoke them. Messaging is typically separate from the class definition which isn’t very DRY when invoking raise with a second String argument multiple times. The define_exception gem provides a succinct manner in which exceptions can be defined much like read/write attributes in your class using attr_accessor. It also makes it trivial to define a default message so that in most cases the second argument to raise is not necessary.

The problem I see with this is the lack of subclassing. Maybe a better approach…
If you look at the code under the hood you will see that this is a class method…
I understand, but you don’t always want a subclass of RuntimeError. Sometimes y…
Got it. I’ll add an optional argument which will allow for subclassing off ano…
Loading older posts