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.
Migrating an ad-hoc URL slug system to FriendlyId
I migrated an ad-hoc URL slug solution to use FriendlyId for Orientation this morning and thought this could be handy to anyone in a similar situation.
Playing around with a Method object
Just wrote up a post about Method object and the things it provides: http://blog.diatomenterprises.com/breaking-down-method-object/
RubyMine 7.1 is out: Puppet, better JavaScript, CoffeeScript, and more
RubyMine 7.1, an important update to intelligent Ruby and Rails IDE by JetBrains, is now available for download. [more inside]
Eastward flow
After my RubyConf presentation I wrote a few articles about the rules for East-oriented flow of information: always return self, objects query themselves, factories are exempt, and break the rules sparingly
Introducing Transproc - functional data transformations for Ruby
A brief introduction to the first data mapping backend used by ROM. Meet Transproc.
Why is Rubygems Slow?
Richard Schneeman wrote an article on what Rubygems does, highlighting a PR by Tenderlove that hits a major performance.
Rails meets React.js is out: What you can find inside?
We recently shipped a book about React.js. I made a blogpost about what you can find inside. [more inside]
Class methods and singleton methods
I recently sorted through an unexpected error around singleton methods; this post is a breakdown of where things went wrong initially and how it got sorted out.
Exploring new methods in Ruby 2.2.0
For those late to the Ruby 2.2.0 party like me, the core team introduced couple of new methods. Read on to discover these new methods and see how to use them in your everyday job.
Unexpected: The New Minitest::Spec Syntax
Yesterday’s release of Minitest 5.6.0 brought some important changes to the framework, and even though your existing tests will keep on working as they always have, you’ll want to pay attention to avoid unpleasant surprises in the future. This post explains what you should expect and why it’s happening.
football.db - New max.rb Datafile - 1000+ Teams, 10 000+ Matches, 100+ Leagues
Hello, The new max.rb Datafile lets you build a football.db with all open football data repos from GitHub w/ a single command that will 1) dowload all datasets (as zip archives), 2) create the SQLite database (and schema) and 3) read-in all datasets (from the zip archives), that is, try: $ sportdb new max. If all works - check w/ $ sportdb stats - and you will get: 100 leagues / 56 seasons; 77 events (league+season recs) / 1470 rounds / 133 groups; 1206 teams; 11001 games; 242 assocs
orgs; 200 grounds
stadiums and so on. All datasets and tooling public domain. Cheers.
gemput - The easiest way to manage your Gemfile
The easiest way to manage your Gemfile. Gemput keeps your software stable by freezing Gemfile. Please check out our GitHub.
Search Filters and Object Oriented Design
Search filters are a very common feature in any application. I’ve used two gems for several projects I worked on: has_scope and searchlight. Both gems works out of the box, but they are not as flexible as I would like them to be and that’s why I decided to create my own gem, Lupa. Keep Reading
How To Write "Macros" in Ruby
In Rails you use class-level declarations such as has_many, belongs_to, and other so-called “macros” all the time, but do you know how they work? In this short video tutorial we recreate a simplified version of the has_many declaration from scratch so you understand how to apply this same powerful technique in your own Ruby code!
Elegant tests with Truth Tables
I wish more people write tests using Truth Tables as they make them easier to read and to maintain, so I wrote a short blog post about Truth Tables.
embiggen: a gem to expand shortened URLs
A Ruby gem to expand shortened URIs including following multiple redirects, respecting timeouts and leaving unshortened URIs intact. https://github.com/altmetric/embiggen
ExceptionManager gem
Pure ruby gem for filling context of exception http://ilyabylich.svbtle.com/exception-manager-gem
A shortcut to see your Minitest failures instantly
You’re about to check in your next small feature, so you kick off a full integration test run. You wait, and wait, as the dots fill your screen, until you see that first F. Do you really have to wait for the entire run to finish before you can see which tests failed?
Tackling Those Tests, Part 1: The How, When, and What of Rspec Testing
Writing tests is an art, and takes a lot of practice and time to learn. But knowing when and what to test is another skill entirely. This post explores the how, when, and what of rspec, and is the first in a three-part series on tackling tests.
sig: Another type checking gem for Ruby
The sig gem simplifies checking for proper “types” of method arguments and results. This is not static typing, but convenience when you need to ensure a specific object behavior.
Integration Tests for Chef-Driven Infrastructure with Test Kitchen
Learn how you can easily introduce and automate the process of testing your production infrastructure in your development environment or as part of CI process with virtual machine or Docker. Read the article.
Set Up Sublime Text 3 for Ruby Development
Sublime Text 3 (currently in beta, but stable!) is a powerful editor with good out-of-the-box support for Ruby. For example, did you know that ST3 has built-in source code indexing? Learn about this hidden (?) feature and take your Sublime setup to the next level with a curated list of Ruby-themed packages, commands, key mappings, and recommendations.
Data modelling with Redis and Ohm
The Ohm – Redis combination allows us to model our data in a super-fast way, leveraging loads of powerful NoSQL features with a touch of relational goodness and all from within plain old Ruby with the Ohm gem