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
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Deploying from Git with Capistrano
With a few changes to our Capistrano configuration, we’re able to deploy a Rails-based web application directly from the source code repository. Here’s how.
Released ffi-extractor 0.1.0
Released ffi-extractor 0.1.0, Ruby FFI bindings to libextractor, a library for extracting metadata from a variety of file formats. [more inside]
Seedbank 0.2.0 released.
Version 0.2.0 of Seedbank has just been released. Seedbank gives you more control of your Rails seed data, letting you break seed data into individual files with dependencies. You can seed different data for each Rails environment and share common seeds between environments.
tryit -- An alternative to Object#try
After a discussion on StackOverflow, we whipped up an alternative to Rails Object#try called tryit. This could be useful if you need similar functionality in pure Ruby or if chaining try calls annoys you. [Ed: moved code examples into comment]
Bitwise operations in Ruby, and an example application to testing with Rspec
The title says it all - here’s a gentle introduction to some common bitwise operations with the Ruby language, as well as an example of how to apply such operations to simplify some testing scenarios in Rspec. [more inside]
rolify 3.2 is out - Role management library with resource scoping w/ Mongoid support
rolify gem allows you to manage the roles in your app easily and provides the ability to scope the role on a resource instance or class: user.add_role :moderator, Forum.find(3)
It integrates smoothly with Devise and CanCan to build a full authentication/authorization stack [more inside]
iOS Keychain Entitlements for Using RedLaser in RubyMotion
Because RedLaser accesses the iOS keychain, you need to request an entitlement when using RedLaser in a RubyMotion application. Here’s how.
Rails Apps Composer 2.0 is out
The Rails Apps Composer gem gives you a tool to assemble a Rails application from a collection of recipes. Use it to generate Rails starter apps. Version 2.0 is out with a new Guide to the Rails Apps Composer Gem. If you build Rails applications that use popular gems or add features such as authentication, you’ll save time with the rails_apps_composer gem. Plus you’ll benefit from the collaborative problem-solving of Rails developers who face the same challenges.
Adhearsion 2.1.0 is out with initial support for FREESWITCH
The Adhearsion team just launched v2.1.0 with a major new feature. It has been a long time coming and oft asked feature, and now Adhearsion has initial support for FREESWITCH. This expands Adhearsion’s vision of being the development framework for telephony. With support for Asterisk and PRISM.
Reddit on Rails: Part 1 [Exercise]
Follow along as I build Reddit on Rails and walk you through how to craft a web app from scratch.
GrabzIt, launches a new free service to take web screenshots with Ruby!
To use this service you use the free Ruby API, which offers many advanced features the full details of which can be found in the Ruby API [more inside]
Delegation is not inheritance
I just posted an article exploring an easy to mistake to make when using delegation to create proxy or wrapper objects like decorators in ruby.
Rails 3.2 + Backbone.js offline application
I just created mini-web-application Dreamy that works offline, as an example of usage Backbone.offline.
Release of 'Testing Framework' 0.4.0
I have just posted an article about new release of Testing Framework - 0.4.0. TF is used for testign RVM, check it out if you need to test shell scripts or validate something on server, it’s written in ruby and it’s easily extensible via plugins.
Generating video thumbnails from YouTube and other video sites
This blog post explains how to easily embed thumbnails of videos from YouTube, Vimeo, Hulu, Animoto and Dailymotion. Thumbnails can be automatically resized, cropped and transformed to match the graphic design of your website. Face detection can be used for better cropping. All thumbnails are cached and delivered through a CDN for better performance. Ruby on Rails sample code included.
A workaround for isolated tests with local steps in Cucumber
Here’s a workaround for making Cucumber steps local inside a scenario. It’s simple and ugly, but it works. In the post, I argue that all this focus on writing Cucumber steps “correctly” is misplaced. I believe that if we allow steps to be local inside a Cucumber Scenario, this becomes irrelevant. I argue that domain language concepts should not be the responsibility of Cucumber Steps; instead, domain language concepts should be the responsibility of Cucumber Scenarios.
Rejected by GoGaRuCo: Mocking Time.now for Faster Tests
I got turned down by GoGaRuCo. I wrote about how to mock Time.now for faster tests even if Josh Susser thinks You Shouldn’t Know How. Nah, not really - Josh is 200% a class act, but mocking Time.now is still a fun trick!
Databases & Rails: Week 8
This week we cover a veritable smorgasbord of topics in Databases & Rails: Week 8. We’ll talk about dealing with Nil and using Modules in Ruby. We are also going to cover importing data from a spreadsheet, rake, rubygems, bundler, and talk a little about Rail’s testing ecosystem. Enjoy!
Deploy your rails app on heroku
A complete howto to deploy your rails app on heroku.
jruby-memcached 0.3.0 released
I just released jruby-memcached 0.3.0, I have rewritten it by pure java code, about 10%-20% faster than 0.2.0, check out details here
A Secure, Reliable Event Tracking System for Online Betting using Rails
The French government legalized online betting in 2011 and created an Authority (named “ARJEL”) in charge of this new market. This authority enforces betting operators to follow a lot of technical rules; one of them being the tracking of all events in secure vaults. <a href=http://blog.tech-angels.com/post/28835549833/a-secure-and-reliable-event-tracking-system-for-online”>This article explains how Ruby was used to save us a lot of time.</a>
A Path To Rails 4 With MiniTest::Spec
Just a reminder that in Rails 4, ActiveSupport::TestCase will now subclass MiniTest::Spec. This means you will get all the benefits of Test::Unit style assertions with the flexibility of a spec syntax and added spec assertions. But why wait? [more inside]
Interactive Ruby Learning
This weekend, I gave a talk about Interactive Ruby Learning at my local ruby meetup to help some people to learn and practice Ruby skill in fun ways.