Controller Tests with RSpec and Rails 8 Authentication
How to authenticate a User in Controller tests when using RSpec and Rails 8 authentication.
How to authenticate a User in Controller tests when using RSpec and Rails 8 authentication.
A new feature for GitHub CoPilot, called Instructions, can be used to catch N+1 queries in Ruby on Rails applications. It can even leave comments on Pull Requests when it finds them!
Exploring a lesser known syntax for preloading nested Active Record associations.
Zero updates our database directly from the UI and we can't rely on callbacks like 'before_save' when using it. Let's explore different ways to manage data requirements.
Rocicorp's Zero is a sync engine to power extremely fast UI applications. I decided to pair it with Ruby on Rails and wanted to share how I got everything working.
Rails 8 added an authentication generator, but what if we want to use Google OAuth? I decided to implement it using the oauth2 gem and share what I learned.
Rails 8 added an authentication generator, but it stopped short of creating User records and verifying their email address. I decided to build it and share what I learned.
How to use Buildkit's mount cache to reduce bundle install times during Docker builds.
I've been playing around with Actions ever since and one of my new projects, a Ruby Gem, didn't have any form of CI as of this morning. I set out to create an Action that would run the tests for the gem and produce coverage results via SimpleCov.
I realized that we are always using Ruby Alpine images, and not the base Ruby image. I wanted to standardize the Dockerfiles I had written at work and here for the blog so I decided to look into what it would take to do so.
Set up a testing environment that can be run locally and in a repeatable fashion for continuous integration
The process I went through to figure out what was needed; I believe it is good exercise in understanding how to follow code to and understanding what it takes to re-implement functionality.
Instead of having to create a Rails application and install the gem to connect to the database to test your models, we can create local database for only the gem by adding ActiveRecord's Rake tasks.
I was recently thinking about system design, specifically the monolithic vs microservices approaches and how applications can talk to each other.