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.
Scaling Your Ruby Service Objects with LightService
I wrote a quick guide to using the light service gem, which helps organize Ruby service objects. Check it out!
Ruby singleton_class example
In this post I tried to explain a use case of singleton_class. https://whatraghulearned.today/2019/06/07/ruby-singleton_class/
Feedback wanted on new feature for Sail
Feedback on the following proposal would be very appreciated! https://github.com/vinistock/sail/issues/114
Modulator - tool for publishing Ruby methods as AWS lambdas behind gateway endpoints
Write regular Ruby code without dependencies and deploy it from generated CloudFormation template - https://github.com/damir/modulator
Announcing the release of Filtered gem.
The gem helps to create filters for Rails’ ActiveRecord in an old-fashion way. It makes your controller simpler and forms effortless. Check it out https://github.com/dubadub/filtered
Ruby 2.5 comprehensive changelog
Although the news are 1.5 years old, I believe it still could be interesting/useful: Ruby 2.5 changelog with references to docs, discussions, explanation of change reasons and code examples.
Ruby and GraphQL: what to use for your next project?
A lovely duet of two GraphQL gems with their week and strong sides: https://medium.com/@po.jurcys/rubys-graphql-beauty-and-the-beast-story-17c72592ab11
A simple guide to add 2FA to your user's authentication API in ruby on rails
We’ll learn by doing, to add 2FA security feature to your user’s authentication API in ruby on rails. Here’s the Article
GraphQL on Rails
This guide is about building a Rails/GraphQL/React/Apollo application from scratch. A first part of the series is dedicated to queries - a GraphQL way to fetch the data.
I Updated Rails. Now Everything's on Fire.
Once a Rails app has bundled at the next version of Rails, it is common to have a number of errors to handle before your test suite will run. In this post, I walk-through one of the common issues we see. Read here
Testing A Locally Running App Inside VirtualBox
Yesterday I had to fix one of occurs-only-in-one-browser issues – so I ran VirtualBox, typed the address to my app into some legacy IE – localhost:9292 – and… it didn’t work. In this short blogpost is how I got it all to work together: https://blog.rebased.pl/2019/06/03/testing-local-app-in-virtualbox.html
Meet trip, a concurrent tracer built on set_trace_func & implemented in pure Ruby.
trip.rb is a concurrent tracer that can pause, resume and alter code while it is being traced. The tracer yields control between two threads, typically the main thread and a thread that Trip creates. Under the hood, Trip uses Thread#set_trace_func. It could be used to implement a debugger.
[Screencast] Inline Editing Records
Using Rails UJS, we create an interactive row editing solution without using any kind of Javascript frameworks. https://www.driftingruby.com/episodes/inline-editing-records
Preventing minitest-focus during CI test runs
Minitest-focus is a great gem during development to only execute certain tests. However, it’s easy to miss and accidentally leave in while doing a CI test run, which could give false positives. Read here for ways to prevent during CI.
XDG 3.0.0 - New Gem Ownership
XDG is a great way to organize your program’s configuration, cache, and data. After ~7 years of inactivity the XDG gem is now under new stewardship. 🎉 With the 3.0.0 version, there is a new implementation and API that adheres to the XDG specification. If you need additional functionally beyond what the XDG specification provides then check out the companion Runcom gem. Enjoy!
Gem which helps initialize class instance with .call method.
.call(*args) => #new.call(*args) [more inside]
Graphs in Ruby
This gem allows to create simple directed and undirected graphs. Basic operations allows easily implement graph algorithms.
Object Equality in Ruby
In Ruby, as any classes inherit directly (or not) from the Object class, then the object equality logic is implemented between the Kernel module and the BasicObject class. [more inside]
Ruby on Rails - Bounded contexts via interface objects
In this Article I’ll show you how to organize business classes in Ruby on Rails so your application can benefit from Bounded Contexts while still keep Rails conventions and best practices. Solution is also friendly for junior developers. [more inside]
[Interview] Rails Upgrades with Eileen Uchitelle
The Maintainable Software Podcast interviewed Eileen Uchitelle from Github about Rails upgrades last week. Here’s the transcription from the first half of that interview. [more inside]