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.
Measuring rails routes test coverage
In a big project 100% code coverage is too expensive (if even possible). But there’re times you want to make sure that at least all your important routes are hit by the test suite. routes_coverage gem generates nice html simplecov-style reports on that.
Everything you should know about Ruby Splats
Even though splats in Ruby are common, there are some complex edge cases that can be misleading. Let’s see them together.
How we build JSON APIs with Rails
A couple of months ago, we started a new project and decided to use Ember on the front and Rails as an API backend. Early in development, we found ourselves repeating similar code in multiple places in our controllers, so we decided to roll our own solution to the problem. Check out our blog post for more details.
Semaphore Boosters - automatic parallel testing for Ruby projects
Semaphore Boosters automatically parallelizes tests in large Ruby projects and cuts test suite runtime down to a few minutes.
Practical Graph Theory in Ruby
Learn how to use the power of graphs to solve interesting problems!
How I teach web development with Rails
I’ve been teaching Ruby, Rails and Web Development for 3 years now. Today I want to share what I have learned.
Squasher is Rails 5.1 ready now
From now squasher is now longer a blocker which stops you from upgrade to the latest version of Rails
Ruby gem for managing proxies
proxy_fetcher gem can help your Ruby application to fetch free proxy lists from the HideMyAss service, validate them, and use for making some HTTP(S) requests.
Updates for liblinear-ruby
liblinear-ruby has recently been updated! [more inside]
[Screencast] Bootstrap Framework and Ruby on Rails
Using Bootstrap in your application has become much more simple. Also learn to create some helper methods to make working with Bootstrap much easier. https://www.driftingruby.com/episodes/bootstrap-framework-and-ruby-on-rails
Why you shouldn't use the System Ruby
Your *nix computer will ship with a version of Ruby, and this seems great, you can get up and going right away and writing code. Things though are not all as they seem, you shouldn’t use that Ruby.
5 Pry Features Every Ruby Developer Should Know
Pry is a great resource for debugging and exploring code: [more inside]
[S]OLID - Single Responsibility Principle by example
Example of refactoring by following Single Responsibility Principle:
Added new JSON Feed (@jsonfeed) format to the (universal) feedparser gem
Hello, I’ve added support for reading feeds in the new JSON Feed format in - surprise, surprise - JSON to the universal feedparser gem. Nothing changes if you read in feeds in xml or json ;-) Use it like: [more inside]
The Ruby Module Builder Pattern
Did you know that Ruby has configurable modules? Just subclass the Module class, dynamically define some methods in an initializer, and include an instance of the resulting module in another class. I call this thing a “Module Builder” and I just wrote a long blog post explaining what it’s all about. Ruby’s had this secret up its sleeve for all these years, and most of us never knew about it.
Tip: Add JSON Feed (@jsonfeed) to your Jekyll (static) website / blog
Hello, A Quick Jekyll (Static) Website Tip: Add JSON Feed to your site. Step 1: Copy the feed.json template file. That’s it ;-) Source: vienna-rb/new-blog/feed.json Live: feed.json – Learn more about JSON Feed in Parker Moore’s posting titled “Add JSON Feed to your Jekyll site”. Happy publishing with Jekyll n friends. Cheers.
Red Arrow: Apache Arrow for Ruby
Ruby gets soon the data interoperability based on Apache Arrow. [more inside]
What if we organized code by features?
Digging through lots of code to figure out how a feature worked frustrated me on a large Rails project. I wrote about how I asked myself this question and what I did about it at
CanCanCan 2.0 is out!
After few months CanCanCan has finally a new major version: 2.0. There are many important changes in the new version but very few new features. We thought it was time to bring the project back on track and drop support for a lot of unnecessary features. [more inside]
Podcast: Michael Feathers on Avoiding Legacy Code
What makes a code base go bad and become “Legacy Code”? Can teams avoid writing bad code? Michael Feathers, author of Working Effectively With Legacy Code joins Tech Done Right to talk about technical debt, how communication can prevent bad coding practices, why coding problems are never just about code, and what it’s like to go around the world seeing the worst code messes ever written. [more inside]
Fighting the Hydra of N+1 queries
A huge insight into the problem of N+1 queries with Rails: starting from the junior-level stuff (what is it and how to fight it) moving to the usage of bullet gem, hardcore problems caused by the complexity of the application and DRY/OO patterns used — and ramblings on how to tackle the problem at its root. [more inside]