The Blog: Ruby

Jan 9
1

2011 Open Source Projects

by David Czarnecki

Oh right, it’s 2012. Better late than never. In addition to the numerous contributions we make to existing open source projects, we also find the time to release libraries or projects that we extract from our applications. In 2011, those 22 projects were:

We hope you’ve found or will find these libraries useful in your own projects.

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Aug 10
1

Chef Explosion

by waldo

Here at MLG, we use a product from Opscode called Chef to manage our server environments. Chef allows us to reliably manage our infrastructure by providing us with the ability to write code that describes how a server should be configured. While not perfect, it has served us well.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jul 20
0

A Redis cache for RSS consumption

by Logan Koester

If you’ve ever wanted to include some data from an RSS/Atom feed on a page from Ruby, you’ve probably run into this problem:

It’s completely unreasonable to hammer the feed provider with a request every time the page is rendered, but it’s no more reasonable to use a big relational database like MySQL just to cache some stupid tweets or blog posts, especially if your application wouldn’t otherwise need one.

But apparently this layer of persistance has been deemed out-of-scope by the creators of popular RSS consumer libraries such as Feedzirra.

So I wrote a little gem called feedzirra-redis to take care of this as transparently as possible. You can use it just like you would Feedzirra normally, but your feeds and entries do not disappear at the end of the script, so you can do the dirty work from a Rakefile via cron instead of in the web request/response cycle while your users impatiently twiddle their thumbs.

Installation

$ gem install feedzirra-redis

 

See the README and test suite for example usage.

Enjoy!

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jul 20
0

Soonatra – ‘Coming Soon’ pages on Sinatra

I was recently tasked with creating a “coming soon” page for a new project. The requirements were the usual:
  • Some description of the project features
  • A form to signup for an email list / invites
  • Display a few posts from an RSS feed
  • Show some screenshots of what we’re building to collect early feedback

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
May 27
0

Testing Multiple Ruby Versions and Gemsets Using RVM

by David Czarnecki

Categories

I think it might be all the time I’m devoting to L.A. Noire which caused me to want to research how to test multiple Ruby versions and gemsets using RVM, but that’s besides the point. Here’s how I went about it.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Apr 29
0

Speed Up Testing With Spork

by David Czarnecki

Categories

If you TATFT, embrace red-green-refactor, or you just want to speed up execution of your test suite, you might want to take a look at Spork. It will fork a test server for you that pre-loads your environment allowing you to run individual tests or your entire test suite without the startup cost of the loading the environment for each test or test suite run.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Feb 25
0

Meta Leaderboards

by David Czarnecki

Categories

Traditionally, leaderboards rank players using one criteria, e.g. XP, kills, etc. What if you wanted to retrieve information from a leaderboard that combined more than one criteria? I’m going to show you how to do that.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jan 14
0

Brightcove::API.new(:home => BrightcoveOS)

by David Czarnecki

Categories

I am pleased to announce the brightcove-api gem that I maintain has a new home at the Brightcove Open Source portal.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jan 5
0

Follow The Leader – Leaderboards with Ruby/Redis

by David Czarnecki

Categories

Leaderboard: A board showing the ranking of leaders in a competition.

Do you need to create leaderboards for your application? Do you use Redis? Do you use Ruby? If you’ve answered yes to any or all of these questions, you might want to take a look at the leaderboard gem I am releasing today.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Dec 10
0

CAPTCHA failed or How I Patched ruby-recaptcha In 5 Minutes For Success

by David Czarnecki

Categories

We are using the ruby-recaptcha library here at Agora Games. I got a bug from our QA department that they wanted the CAPTCHA failure message to change from ‘Captcha failed.’ to ‘CAPTCHA failed.’.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article