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.
MiniTest MustWonted Package
I just launched minitest-mustwonted the new rspec-like must wont engine for minitest!
Learning Ruby and proving your skills as a developer
Isn’t it better to demonstrate what you can DO as a programmer, as opposed to saying what companies you’ve worked for, or where you went to school? We built MetaBright so you can do just that. [more inside]
Primo: A configurable default Rails stack using application templates
Rails application templates are awesome, especially for hackers that often need to set up the same basic app, but also for companies that want to promote their best practices. Sadly the ecosystem around them seems to be quite limited. Primo is a new gem that tries to solve this by adding a command line interface for defining your default template and share it with others. [more inside]
Upgrading Gems with git bisect
A debugging approach for when upgrading gems breaks your test suite. Using git bisect & bundler’s path option.
Cohesion and Big ActiveRecord Models
I wrote a few lines about Cohesion and Big ActiveRecord models that you might find interesting to keep your models in good shape.
Simple way to test IO in Ruby
I was working on a small CLI over the weekend and wanted to test the user input on the command line and the output that the program will print out. I figured out this simple FakeIO class that helps me do that.
Simple way to add social networking features to Rails application
Inkwell gem - provides simple way to add social networking features like: - Comments - Reblogs - Favorites - Following/Followers, - Timelines
Conject Now Supports Lazy Dependency Resolution
Conject, my dependency injection tool for Ruby, has a few new features you might find useful: - Lazy, on-demand dependency resolution as an optional alternative to constructor injection. - All objects in the Ruby runtime may now access their context via the #object_context accessor. - You can now omit module-name prefixes when listing dependencies in construct_with and provide_with_objects for objects in the same module. Learn more.
Von: Real Simple Stats Tracking with Redis
Tossed this little stats gem together over the last few days. It’s helpful if you want to keep stats for a time period (hours/days/weeks/months/years). It does just what we need it to and not a lot more – thought it might be useful to others. Read about it on Github
Seven advanced Ruby on Rails Fragment Cache techniques
Since Rails introduced the Fragment Cache several years ago, the use of the feature has evolved away from its initial use case. Read about how to use the fragment cache in a modern Rails application at the CRAZ8 Blog
./bin/setup convention
A developer should be able to clone the project and run a single, consistent, reliable command to start contributing.
Google Currency Converter goog_currency gem released
I just released my first gem good_currency. Simple Ruby interface to Google Currency Converter API.
Interact with the DigitalOcean Hosting API
I just released the digital_ocean gem that allows you to create/manage virtual servers with DigitalOcean.com. They use SSDs, have datacenters in NY/US and Amsterdam/NL and are backed by TechStars.
RailsApps Tutorials
I’ve launched the RailsApps Tutorials membership site. Here’s the announcement which explains how subscriptions for tutorials will support the RailsApps open source project. The aim is more example applications, updated regularly, and more tutorials.
4 Ways to make your Rails app faster
4 Rails supported techniques that can make your rails app faster. Read about it at the CRAZ8 blog
Template Converters ERB => SLIM
Template Converters ERB => SLIM
Threads are not just for optimizations
Everyone seems to be talking about using threads to speed up and parallelize our code. I just published a blog post about a few ways that MRI uses threads internally to organize code, rather than to optimize code.
Dossier: Turn SQL into HTML, CSV, or JSON with ease
Adam Hunter and I recently released Dossier, a Rails engine for turning SQL queries into various report formats with minimal effort. The SQL can be hand-written and use all of your database’s features, or generated by something like ActiveRecord’s to_sql. See the README on Github for details.
Phusion Passenger 4.0 beta 2: focus on stability
Phusion Passenger 4.0 beta 2 is out, and this release focuses on stability.
JsonBloomfilter for Ruby and Javascript
Bloom filters are awesome but none of the implementations I could find were particularly portable. This implementation allows you to train one in Ruby or Javascript and serialise them to JSON to then reload them in the other language. Very useful for doing client side lookups of things like “valid” usernames without sharing every username in your DB.
Dynamic attributes and MongoDB/Mongoid
Why is this cool you might ask? Well let me explain my problem; I want to create a web service that allows CRUD operations on objects called Events. Events have a name, start_time, and most importantly a game. Depending on the game attribute, each Event will have different game specific attributes. For example, I have an Event with a game value of ‘starcraft2’. Only Starcraft 2 Events have a region and a league attribute, while League of Legends Events have a min_elo attribute. How can we store these Event objects that have different attributes in our one document? Read more here
Why don’t we use Class#allocate more?
There’s a great little method in Ruby that you might not be familiar with. It’s used all the time but it’s hardly ever called directly. The method is Class#allocate. Read about how you might use it in Steve Richert’s latest post on the Collective Idea blog.
Fixing the error: 'webkit_server: cannot connect to X server'
Just added a tiny article explaining how to fix it here
Sinatra OAuth Workflow: Speed Up Your App Development
Check out Eric Oestrich’s code for a Sinatra OAuth Proxy App to speed up third party API integration. Works with Harvest now, will work for other APIs with small changes.
Substance Surface brings reliable text manipulation to the web
Surface is an extensible low-level interface for semantic rich text editing. It doesn’t introduce any UI components, but an API for managing user-defined text annotations. It can be used as a foundation for text editors that support annotations.