Our great sponsors
-
colorize
Ruby string class extension. It add some methods to set color, background color and text effect on console easier using ANSI escape sequences.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
After some digging in the Twilio documentation, I found some options to set the webhooks URLs through their ruby gem
Before I start going into more detail, here's the code for the rake task. The dependencies for the rake task are a running ngrok instance, the twilio-ruby gem (I'm using v5.67.1), and if you'd like a pop of color in your terminal to make things easier to spot, the colorize gem
Usually, my ruby HTTP library of choice is HTTParty but I wanted to set this up using the ruby Net::HTTP lib to keep from introducing another dependency.