Testing, Turbo Native, and exclusive content.
Sign up for my monthly newsletter.
Hello and welcome to the first edition of my newsletter! I’m planning on using this monthly communication to round up my latest posts and share exclusive content.
This month I’m announcing a new open source Swift library, reviewing what I’m excited about with the recent Rails 6.1 release, and giving a sneak peek on some upcoming Mugshot Bot features.
Swift and iOS
Last week I published an article about Testing the UI without UI Testing. In the article, I explore a technique for writing feature-level tests in XCTest. With no dependency on UI Testing these are faster and more reliable.
This inspired a small open source library, Ruka, which takes the ideas from the article another step. Here’s a small snippet to show how it works.
import XCTest import Ruka let app = App(controler: HomeViewController()) let button = try app.button(title: "Click me!") button?.tap() XCTAssertNotNil(try app.label(text: "You clicked the button."))
The article has been making its rounds on Twitter. Have you tried this technique? I’d love for you to weigh in!
Ruby on Rails
Yesterday Rails 6.1 was released and there are a ton of new features to explore. I’m most excited about Error Objects.
Active Model’s errors are now objects with an interface that allows your application to more easily handle and interact with errors thrown by models.
The release provides a new way to query for specific error messages and checking which errors have been added is more flexible. There’s a ton of information and code snippets in the merged pull request.
Two of my posts this months were quick snippets, “Today I learned” style.
- Regexes with multiple slashes in Ruby walks through a (new to me!) syntax for regexes that makes reading them a bit easier on the eyes.
- Redirect www traffic to a naked domain in Rails covers my experience trying to get
www.mugshotbot.comto redirect to
mugshotbot.com. There are a few gotchas but once everything is laid out it’s not much work.
Over the last month my micro-SaaS, Mugshot Bot, has seen a lot of love.
Mugshot Bot levels up your blog posts on social media by automating the annoying part: social share images.
I’ve added URL-specific images, custom meta tags to change content on the fly, and an option to change the title/description of the image manually.
There are three new image templates just for GitHub repositories. Upload this image to GitHub and when you share on Twitter it will automatically show up in your post.
Baby’s first WordPress plugin! Last weekend I spent the majority of Saturday working on a WordPress plugin for Mugshot Bot. I had almost forgot how different PHP is than Rails.
Reply here if you’d like to give it a try — it definitely still has some rough edges!
Thanks for reading
That’s all for this month. If you enjoyed this edition I’d love it if you could share it on Twitter. Thank you!