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.
Refactoring in Code Reviews: My Experience
I’ve been trying to incorporate refactoring into our code reviews. The idea is to use refactoring as a way to understand code while reviewing it. I picked up this idea from the book “Refactoring” by Martin Fowler. Here’s a blog post of my experience with this technique. [more inside]
Different controllers for different contexts
When we first start with Rails we learn to create one controller for each resource, but separating your contexts into multiple controllers can help a lot with making your application easier to understand, maintain and grow.
NightcrawlerSwift teleports your assets to a OpenStack Swift bucket
Like the X-Men nightcrawler this rubygem teleports your assets to a OpenStack Swift bucket/container. It was designed to sync your assets with OpenStack Swift and allow some operations with your buckets/containers. https://github.com/tulios/nightcrawler_swift
Great New Feature in RSpec 3: Verifying Doubles
This article discusses a new feature in RSpec 3 called verifying doubles. Verifying doubles ensure that doubles stay in sync with actual code. The article explains how to start using this feature and includes some general thoughts about how this feature will impact testing practice.
Blogpost about not well known I18n feature - pluralization.
We just posted new article on our blog http://2n.pl/blog/i18n_pluralization - it is really usefull when you translate languages with many plural forms.
My First Ruby Gem
I came across this excellent walkthrough about creating a rubygem and thought that it would be helpful to others.
Seamlessly Navigate Rails Projects With Tmux
I just posted an article Seamlessly Navigate Rails Projects With Tmux. I hope you find it useful!
Service objects in Rails will help you design clean and maintainable code. Here's how.
A good read demonstrating how using service objects decouples concerns, simplifies testing and helps produce clean, maintainable code: Service objects in Rails will help you design clean and maintainable code. Here’s how..
Acceptance Tests at a Single Level of Abstraction
Each acceptance test tells a story: a logical progression through a task within an application. As developers, it’s our responsibility to tell each story in a concise manner and to keep the reader engaged, aware of what is happening, and understanding of the purpose of the story. [more inside]
A few tips for cutting down exception noise
Exceptions should be exceptional, they should be unexpected. But how unexpected can an error be if you see it thirty times a day? [more inside]
The Serialization Duck Type
We’re going to take a look at common Duck Types in Ruby. [more inside]
Downloading track from SoundCloud with Ruby
How to get raw sound track from SoundCloud with Ruby?
The value of the docs badge
I blogged about the value of the docs badge provided by Inch CI and what project maintainers can get out of it. [more inside]
DSL for Pundit
After migrating several projects from Cancan to Pundit i’ve wrote a simple DSL for make writing Pundit’s rules easier pundit_dsl
Role-Based Authorization in Rails
I’ve written an article on Rails authorization, showing how to implement simple role-based authorization, and comparing the Pundit and CanCan gems, with links to the rails-devise-roles example application, which you can generate with Rails Composer.
parse CSV to Hash
For my personal purpose i needed to map complex and unstructured csv files, i’ve wrote a gems csv2hash for help me to do that, is a parser based rules, i hope this gems can be useful for another persons.
Many to many relationships with hstore
In this post, I show you how to build alternative many-to-many relationships without creating join tables. [more inside]
Rails 4.2 active job and global id new gems
I just wrote an introduction about how the new gems active job and global id interact in rails 4.2
FastAttributes 0.7.0 is just released
FastAttributes is a gem which defines attributes with their types in your model and does it in the fastest way. Version 0.7.0 is just released and since now, it supports lenient data types.
Green Ruby News #82
Finished my weekly links harvesting, check the result on Green Ruby News #82.
Make the most of SQS using Ruby
While not particularly famous in the Ruby community, SQS is a really amazing queueing service, check out what it can do for you and how little Ruby code you have to write to use it.
DescriptiveStatistics is a gem that adds...
DescriptiveStatistics is a gem that adds methods to the Enumerable module to allow easy calculation of basic descriptive statistics of Numeric sample data in collections that have included Enumerable such as Array, Hash, Set, and Range. The statistics that can be calculated include Number, Sum, Mean, Median, Mode, Variance, Standard Deviation, Percentile, Percentile Rank, Descriptive Statistics, and Quartiles. [more inside]
Creating a simple ToDo with Rails
Creating a simple ToDo application With Rails.
From Sinatra to Amazon Simple Queue Service (SQS)
Amazon provides Simple Queue Service also knows as SQS. It is a fast, reliable, scalable, fully managed message queuing service in the cloud that you can use from your applications. This is how you can use it from Sinatra/Ruby.
Getting Started with Spree, Wombat and Ninefold
Imagine developing an application where you need to grab shipping data in real time, send products, inventory, and order information over at least ten different APIs including Amazon and eBay. When I first heard that I had to do this, there could only be one answer: “Challenge accepted”. Continue reading.