Without a doubt, Sidekiq is one of the most popular Ruby gems. Next to Shoryuken and Resque its main purpose is processing background jobs. Almost every Ruby application I have worked with had sidekiq listed in its Gemfile. In this article, I would like to share some insights that I have learned about over time Read more…
Read more...Ruby
Fallacies of distributed computing for Ruby developers
This morning I read “Integrated systems for integrated programmers” article by DHH. I totally agree with it, replacing a monolith by microservices won’t solve all its problems automagically.
Read more...How we migrated from Timecop to built-in Rails 5.2 time helpers
Sooner or later each of us encounters a situation where a method depends on time. The feature needs to be tested later on. Among Rubyists, the most popular gem which provides handy helpers to this problem is called `timecop`. Since Ruby on Rails 5.2 it can be replaced by built-in methods defined within the `ActiveSupport::Testing::TimeHelpers` module.
Read more...How Ruby 2.6 allowed me to do another open source contribution
Every minor Ruby release brings some new features to the language. Few interesting articles describing Ruby 2.6.0 changelog have already been published, so describing them is not the goal of this article. However, one of them allowed me to do another open source contribution, and in my opinion, that is something worth sharing. Maybe it will inspire you to do the same.
Read more...Not-so-private constants in Ruby
Using constants is idiomatic for Ruby. We use them to store something meaningful (a well-suited name is very important), connected with a class that holds it. Consequently, we make our code easier to reason about, avoid duplication and, very often, more performant.
Read more...Is `Array` the only option for storing elements in Ruby?
`Array` class is one of the most commonly used Ruby class in day-to-day development. `Enumerable` module adds a comprehensive set of methods which makes playing with arrays a pleasant activity. I have just written set deliberately.
Read more...Ruby `allocate` method
TIL that Ruby, or to be more precise `Class` class, offers `allocate` public instance method.
Read more...How to log HTTParty requests
Today I learned that `HTTParty` gem has a built-in option for enabling logging details of all requests made by the gem.
Read more...Updating a single gem at a time
If you have `Gemfile` file in your repository you know what Bundler is.
Read more...Dynamic class method calling in Ruby
Today I was looking for the best way to invoke dynamic class method. After some reading and testing I found a few less and more effective ways.
Read more...