Use rbenv-each to run a command for every installed Ruby version

Posted 7 months ago by Michael Leimstädtner.
github.com

The linked rbenv plugin rbenv-each is very helpful to keep QoL gems up to date that are not part...

Don't use log level :debug in your production environments

Posted 8 months ago by Jakob Scholz.

You don't want sensitive user data in your logs. Background Rails per default filters sensitive data like...

Upgrade Rails: Awareness list

Posted 8 months ago by Jakob Scholz.

Disclaimer This card is a collection of guides and things to have in mind when upgrading to a specific version...

Advanced plotting in Ruby with Gnuplot

Posted 8 months ago by Felix Eschey.

Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for...

Split your parallel tests by execution time and keep execution logs up to date

Posted 8 months ago by Felix Eschey.

Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...

Lightning Talk: Coverage based Test Case Prioritization in Ruby on Rails

Posted 8 months ago by Felix Eschey.
github.com

For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...

Git restore vs. reset for reverting previous revisions

Posted 8 months ago by Felix Eschey.

The git doc states on the difference of these two commands: git-restore[1] is about restoring files in the...

redirect_to and redirect

Posted 8 months ago by Niklas Hä..

There are multiple ways to redirect URLs to a different URL in Rails, and they differ in small but important...

Do not pass params directly into url_for or URL helpers

Posted 8 months ago by Arne Hartherz.

Rails' url_for is useful for generating routes from a Hash, but can lead to an open redirect vulnerability.

Do not use "permit!" for params

Posted 8 months ago by Arne Hartherz.

Rails' Strong Parameters enable you to allow only specific values from request params to e.g. avoid mass assignment.

Chromedriver issue #4550 breaks the user agent for device emulation via device name

Posted 8 months ago by Emanuel.

Newest versions of Chromedriver breaks the user agent for device emulation via device name. In previous versions the user agent...

Minifying object properties in JavaScript files

Posted 8 months ago by Henning Koch.

An introduction to mangling When you minify ("compress", "optimize") your JavaScript for production, the names of your functions and variables...

Postgres in Alpine docker container: sorting order might differ

Posted 8 months ago by Daniel Straßner.

In CI test runs I noticed that string sorting order changed after switching from a debian-based PostgreSQL docker image...

Node: How to run a globally installed package with npx

Posted 8 months ago by Emanuel.

You can tell npm to install a package globally with npm -g install @puppeteer/browsers. However, it seems that its not...

RSpec: How to write isolated specs with cookies

Posted 8 months ago by Felix Eschey.

Rails offers several methods to manage three types of different cookies along with a session storage for cookies. These...

How to transition the height of elements with unknown/auto height

Posted 8 months ago by Arne Hartherz.

If you want to collapse/expand elements with dynamic content (and thus unknown height), you can not transition between height: 0...

Use -webkit-line-clamp to natively truncate long (multi-line) texts with an ellipsis

Posted 8 months ago by Dominic Beger.

Note: You won't need this for single lines of text. In this case it is better to just use...

Using git patchfiles to speed up similar implementation tasks

Posted 9 months ago by Michael Leimstädtner.

Sometimes you'll find yourself with a set of tasks that require similar code for different models. For example, if...

CarrierWave: Processing images with libvips

Posted 9 months ago by Henning Koch.

When you write your next CarrierWave uploader, consider processing your images with libvips instead of ImageMagick. Reasons for libvips

How to find child nodes that match a selector with JavaScript

Posted 9 months ago by Arne Hartherz.

Using querySelector or querySelectorAll in JavaScript, you can easily find descendants of a node that match a given selector.

Balance your texts today with text-wrap: balance

Posted 9 months ago by Arne Hartherz.

So you have a heading that is just barely wider than the container it should fit into, and it wraps...

Checklist for Implementing Design

Posted 9 months ago by Dominik Schöler.

We have a long-standing checklist for merge requests. However, it hardly matches the intricate requirements for design. This checklist...

Code splitting in esbuild: Caveats and setup

Posted 10 months ago by Henning Koch.

TL;DR Still has caveats. Code splitting is a feature of JavaScript bundlers that can keep huge libraries out of...

Don't assert exceptions in feature specs

Posted 10 months ago by Michael Leimstädtner.

As we are slowly switching from Cucumber scenarios to RSpec feature specs, you might be tempted to write assertions like...