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.
Decoupling Ruby: Delegation vs Dependency Injection
We’ve all worked with tightly-coupled code. If a butterfly flaps its wings in China, the unit tests break. Maintaining a system like this is…unpleasant. In this article, Jonathan Miles dives into the origins of tight-coupling. He demonstrates how you can use dependency injection (DI) to decouple code. Then he introduces a novel decoupling technique based on delegation that can be useful when DI is not an option. https://www.honeybadger.io/blog/decoupling-ruby-delegation-dependency-injection/
Maintainable Rails email course
Is your Rails app outdated, unwieldy, or….off the rails? Do you struggle with spaghetti code or technical debt? Get one tip each week sent to you to help get it under control. [more inside]
Correios CEP gem updated
Find Brazilian addresses by zip code, directly from Correios database. [more inside]
date-formatter gem - date formatter by example; auto-builds strftime format string
Hello, I’ve put together a new date formatter gem that lets you format dates e.g. “January 02, 2006” using an example as a format string e.g “January 02, 2006” instead of the classic strftime format specifier e.g. “%B %d, %Y”. The date by example adds: String#to_strfime, Date#format, Time#format, DateTime#format, NilClass#format to the built-in classes for easy use. Happy date and time formatting. Cheers. Prost.
The Top Ruby HTTP Clients to use in 2020
So you want to make HTTP requests in your Ruby project, but you are not sure which clients to use? Have a look to the list of the top Ruby HTTP clients and pick the one that fits you best.
The fastest way to prototype API in your Rails app
https://github.com/igorkasyanchuk/fake_api this gem I 100% sure is the fastest way how you can build an API in your Rails application. See the demo in the readme!
How Was My Experience Migrating a Rails API to Crystal + AWS Lambda
In this article, I shared my experience building a Rails API and a post-migration to Crystal. I was implementing a Genetic Algorithm for the Travelling Salesman Problem, but after a struggle with Ruby on Rails processing speed, we decided to move all the code to Crystal and deploy using AWS Lambda. You can read more here and here
Sumo Logic Dashboard for Rails apps hosted on Heroku
In this article I share a simplified Sumo Logic dashboard I have use for production Rails applications hosted on Heroku. I dig a bit into how the queries work for graphing server performance metrics for Heroku dynos, Heroku Postgres, and Sidekiq. Read more here.
How to Calculate Tech Debt Using Skunk on GitHub Actions
Running Skunk on your Ruby project is now easier than ever thanks to Github Actions [more inside]