Short Ruby Newsletter

Share this post

Short Ruby News - Edition #49

newsletter.shortruby.com

Discover more from Short Ruby Newsletter

A Monday summary of the articles, discussions, and news from the Ruby community
Over 3,000 subscribers
Continue reading
Sign in

Short Ruby News - Edition #49

Discover the world of Ruby in this comprehensive newsletter covering week 26 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

Lucian Ghinda (from ShortRuby)
Jul 3, 2023
1
Share this post

Short Ruby News - Edition #49

newsletter.shortruby.com
Share

You can jump directly to a section:

๐Ÿ‘ Our Community

๐Ÿ‘‰ย All about Code and Ruby

๐Ÿงฐย Gems, Libraries, and Updates

๐Ÿคย Related (but not Ruby-specific)

More content: ๐Ÿ—ž ๐ŸŽง ๐ŸŽฅ โœ๐Ÿพ (articles, podcasts, videos, newsletters)


๐Ÿ’ธ For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore while receiving an ad-free version of the newsletter!!

Support the newsletter for ~1.5$/week


๐Ÿ‘ Our Community

๐Ÿ‘ Karl Oscar Weberย shared that Camping (โ€œa micro web framework that stays as small as possibleโ€) has now passed 800+ stars on Github:

Source:ย @Kowfm@ruby.social

๐Ÿ‘ Friendly.Rbย announced a new speakerย  Nick Sutterer - Beyond the Service Object

Source:ย @friendlyrb@ruby.social

๐Ÿ‘ Ruby Confย announced thatย registration is open for RubyConf 2023 (San Diego)

Source:ย @rubyconf@ruby.social

๐Ÿ‘ Kaigi On Railsย announced the CFP is now open for Kaigi on Rails 2023

Source:ย @kaigionrails@ruby.social

๐Ÿ‘ Jason Swettย announced a new speaker for ย Sin City Ruby - Las Vegas Ruby Conference

Source:ย @JasonSwett

๐Ÿ‘ Rubycentralorgย announcedย Ruby Central Job Board:

Source:ย @rubycentralorg

๐Ÿ‘Visualityย announced the Ruby Warsaw Community Conference

Source:ย @visualitypl

๐Ÿ‘ Matt Swansonย announcedย the Boring Rails Chicago Meetup

Source:ย @_swanson

๐Ÿ‘ Nick Schwadererย announced a discord server forย Scarpe (โ€œlibrary that let you build little local desktop computer programs, package them up and give copies to peopleโ€) at joinscarpe.schwad.org

๐Ÿ‘‰ All about Code and Ruby

๐Ÿชง Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)

You can send the sponsorship packages info to your marketing, HR, or product management teams.

I'm happy to assist you with drafting an email. Send me a message at hello@shortruby.com I'll do my best to draft an email for you to send inside your organization.


๐Ÿ‘‰ Aristรณteles Coutinhoย sharedย a benchmark about freezing strings:

Source:ย @aristotelesbr@ruby.social

๐Ÿ‘‰ Kay Rhodesย asked about weird behaviour of using sub:

Source:ย @masukomi@ruby.social

And here is an in-detail explanation of why this is happening, as Jean Tessierย shares it:

Source:ย @jeantessier@ruby.social

๐Ÿ‘‰ Peter Cooperย sharedย a Gist showing how to store embeddings in SQlite โ†’ Using SQLite to store OpenAI vector embeddings from Ruby

Source: gist.github.com/peterc

๐Ÿ‘‰ Nate Berkopecย sharedย a tip about Sidekiq

Source:ย @nateberkopec

, and here is a reply from Steven Harmanย about how they organize their job queues:

Source:ย @stevenharman

As a valued reader, your support is crucial for this publication to continue providing new posts. By becoming a subscriber, whether free or paid, you will contribute to the sustainability of my work.


๐Ÿ‘‰ Nick Schwadererย sharedย GitHub - scarpe-team/scarpe: Scarpe - shoes but running on webview

Source:ย @schwad_rb

๐Ÿ‘‰ Ruby Cademyย sharedย a benchmark of checking for duplicates using include in an Array or Set:

Source:ย @RubyCademy

๐Ÿ‘‰Joel Mossย sharedย about how Ruby brevity makes naming easier:

Source:ย @joelmoss

๐Ÿ‘‰ Ruby Cademyย sharedย a code sample showing how to work with timeouts and retry:

Source:ย @RubyCademy

๐Ÿ‘‰Gavin Morriceย sharedย what they think Hanami does better than Rails:

Source:ย @MorriceGavin

๐Ÿ‘‰ Ruby Cademyย sharedย another code sample about parallel assignment

Source:ย @RubyCademy

๐Ÿ‘‰ Chris Oliverย sharedย a Ruby tipe about removing conditionals:

Source:ย @excid3

Tom Hockettย replied with another way of doing this:

Source:ย @tomhockett

๐Ÿ‘‰ Ryan Castilloย asked about authorization solutions:

Source:ย @rmcastil

Matt Swansonย replied showing how to implement authorization with a PORO:

Source:ย @_swanson

Among other proposed solutions:

  • bullet_train-roles

  • action_policy

  • Complete Guide To Managing User Permissions In Rails Apps

  • petergate

I also think this proposal from Matt Swansonย could be a simpler way to think about authorization:

Source:ย @_swanson

๐Ÿ‘‰ Ruby Cademyย sharedย a code sample showing two ways to do multi-line assignments:

Source:ย @RubyCademy

๐Ÿ‘‰ Donn Felkerย sharedย a code sample:

Source:ย @donnfelker


๐Ÿคž I imagine that if you have read this so far, you find value in this newsletter.

This is a free publication that relies on the support of its readers. If you'd like to stay updated on new posts and help me continue my work, please consider subscribing for free or choosing a paid subscription.


๐Ÿงฐ Gems, Libraries, Tools and Updates

๐Ÿงฐ Sharon Rosnerย announced that Polyphony 1.4 is released

Source:ย @noteflakes@ruby.social

๐Ÿงฐ Marco Rothย announced the release of current.js version 0.2.0

Source:ย @marcoroth@ruby.social

๐Ÿงฐ Ruby Languageย sharedย CVE-2023-36617: ReDoS vulnerability in URI

Source: https://www.ruby-lang.org/en/news/2023/06/29/redos-in-uri-CVE-2023-36617

๐Ÿงฐ Gavin Morriceย published a new gemย rubocop-magic_numbers: A RuboCop Cop that detects the use of magic numbers within instance methods

Source: https://github.com/bodacious/rubocop-magic_numbers

๐Ÿงฐ Ruby On Railsย announced the release ofย Rails Versions 7.0.5.1, 6.1.7.4 have been released! - read more about the CVE details here

Source: https://rubyonrails.org/2023/6/26/Rails-Versions-7-0-5-1-6-1-7-4-have-been-released

They also announced Rails 7.0.6 has been released

๐Ÿงฐ Kevin Newtonย  announced they are updatingย sorbet-eraser: Erase all traces of sorbet-runtime code

Source: https://github.com/kddnewton/sorbet-eraser

๐Ÿงฐ Kevin Newtonย announced a new PR for YARP aboutย Introduce SourceRange by kddnewton ยท Pull Request #1087

Source: https://github.com/ruby/yarp/pull/1087

๐Ÿงฐ Xavier Noriaย announced a new update for Railsย about Introduce config.autoload_lib_once(ignore:) by fxn ยท Pull Request #48610

Source: https://github.com/rails/rails/pull/48610

๐Ÿงฐ Hanamiย announced the release ofย Hanami 2.1.0.beta1

Source: https://hanamirb.org/blog/2023/06/29/hanami-210beta1

๐Ÿงฐ Koichi Itoย announced an update to VSCode extension vscode-rubocop v 0.2.0

Source: https://github.com/rubocop/vscode-rubocop/tree/v0.2.0#rubocopyjitenabled

๐Ÿงฐ Jeremy Evansย announced the release ofย Sequel 5.70.0 Released ยท jeremyevans sequel ยท Discussion #2059

Source: https://github.com/jeremyevans/sequel/discussions/2059

๐Ÿงฐ Mari Imaizumiย announced the release ofย Release v1.7.1 ยท ruby/irb

Source: https://github.com/ruby/irb/releases/tag/v1.7.1

๐Ÿงฐ Maciej Mensfeldย sharedย a new release of Karafka version 2.1.6

Source:ย @maciejmensfeld

๐Ÿงฐ Nick Schwadererย announcedย Release v0.2.1 ยท scarpe-team/scarpe - Discord

Source:ย @schwad_rb

๐Ÿค Related (but not Ruby-specific)

๐ŸคNate Berkopecย sharedย  about using automated checks to cap technical debt:

Source:ย @nateberkopec

๐Ÿค Rob Palmerย sharedย updates coming to Javascript:

Source:ย @robpalmer2

๐Ÿค Eric Berryย sharedย about using UUIDs as primary keys and generated a discussion about pros and cons of using UUIDs as primary keys.

Source:ย @coderberry

Here are some of the replies, but you should read them all

Source:ย @zuzur
Source:ย @bradgessler
Source:ย @hopsoft

๐Ÿค Konnor Rogersย sharedย  about making overflow scrollable with up/down:

Source:ย @RogersKonnor

More content: ๐Ÿ“š ๐Ÿ—ž ๐ŸŽง ๐ŸŽฅ โœ๐Ÿพ

๐Ÿ—ž Newsletters

๐Ÿ—ž Ruby On Railsย published a new edition aboutย A CVE, two new Rails releases in a week, config.autoload_lib, and m...

๐Ÿ—ž Ruby Radarย published a new edition aboutย A Brighton'd Future

๐ŸŽง Podcasts

๐ŸŽง Tightly Coupled Book Clubย published a new episode about Active Record Validations

๐ŸŽง Maintainable Software Podcastย published a new podcast aboutย Maintainable

๐ŸŽง Jason Swettย published a new podcast aboutย 187 - Sin City Ruby Keynote Speaker Obie Fernandez

๐ŸŽง Indie Railsย published a new podcast aboutย Michael Buckbee - Balancing Marketing & Development While Building Wafris

๐ŸŽง The Ruby On Rails Podcastย published a new podcast aboutย Career Ladders with Megan Marquardt-Ray

๐ŸŽง Remote Rubyย published a new podcast aboutย The Case For NOT Taking A Management Path

๐Ÿ“ฝ๏ธ ๐ŸŽฅ Videos

Talks

๐Ÿ“ฝ๏ธ Rubber Duck Dev Show published a new episode about Dragon Ruby Panel / Party! (audio version)

๐Ÿ“ฝ๏ธ Jason Swettย published a new video aboutย Adding tests to an existing application (Code with Jason Meetup session)

๐Ÿ“ฝ๏ธ Paweล‚ Strzaล‚kowskiย published a new video about DDD in Ruby on Rails - Aggregate Pattern

๐Ÿ“ฝ๏ธ Victoria Melnikovaย published a short video from the interview with Mike Perham. See a full episode about Dev Propulsion Labs โ€” Ep. 4 Developer Tools: Bootstrap or Fundraise

๐Ÿ“ฝ๏ธ (related) Aaron Francisย published a new video aboutย The Javascript hype cycle and React burnout

Screencasts

๐ŸŽฅ Dave Kimuraย published a new episode aboutย Email Tracking

๐ŸŽฅ Dean De Hartย published new videos:

  • Notifications API with Action Cable | Ruby on Rails 7 Realtime Alerts Tutorial

  • Silly Little Docker PAAS with Ruby on Rails 7.1

โœ๐Ÿพ Articles

Whatโ€™s new

Michael Buckbeeย published a new article aboutย No Rails World ticket? Here's what to do โ†’ โ€œBelow I've listed every Ruby/Rails conference I could find and tried to pull out some of the unique and interesting ways that the organizers are boosting the community with their effortsโ€

Vipul A M published a new article about Rails.env.local? in Rails 7.1 โ†’ โ€œRails 7.1 introduced a new method Rails.env.local? which returns true if the environment is development or test. This is useful when we want to run some code only in development or test environment.โ€

Flavio Wuenscheย published a new article aboutย Ruby + ActiveSupport = ๐Ÿง˜๐Ÿปโ€โ™€๏ธ โ†’ โ€œUse ActiveSupport methods and improve your ruby coding experienceโ€

Cody Normanย published a new article aboutย Blue Ridge Ruby Recap โ†’ โ€œIt feels like weโ€™re in the midst of a regional Ruby conference renaissance. Itโ€™s has been great seeing these types of events come back and think itโ€™s a good sign of the health and resilience of the Ruby communityโ€

Adrian Marinย published a new article aboutย My first Brighton Ruby โ†’ โ€œIโ€™m on the train towards London. I still need to decompress from everything that happened in the past two days. I hope it doesnโ€™t sound harsh when I say โ€œto decompressโ€, but it does feel like I experienced so many things and met so many cool folks in such a tiny period of timeโ€

How-Tos

Harrison Broadbent published a new article about Deploying Ruby on Rails with Dokku (including Redis, Sidekiq, ARM servers and Docker) โ†’ โ€œI've tried to put together the ultimate Dokku + Ruby on Rails guide. This guide covers all the basics โ€” deploying to x86 and ARM machines, deploying Sidekiq and Redis, dockerizing our Rails app, adding post-deploy scripts, adding LetsEncrypt for SSL and HTTPS, adding backups to S3, and adding an automatic deploy script to GitHubโ€

Igor Alexandrovย published a new article aboutย Good oldies: MRSK and Rails โ‰ค6 โ†’ โ€œHaving gained such positive experiences with MRSK on our newer projects, I decided to transition one of our Rails 6 applications from Capistrano to MRSK for deploymentโ€

Hello Maxย published a new article aboutย Simplifying Authentication with HTTP Basic Auth in Rails โ†’ โ€œToday, weโ€™ll explore an alternative - HTTP Basic Authentication. I recently had the opportunity to implement this in SeQura, and Iโ€™m excited to share this experience with youโ€

Joe Masilottiย published a new article aboutย Call Swift APIs from Stimulus in Turbo Native โ†’ โ€œBut what if we want to interact with a native API, like sending a push notification or reading calendar data? Enter the JavaScript bridgeโ€

Lucas Barretย published a new article aboutย A pragmatic guide for Cypress On Rails โ†’ โ€œI have discovered a wonderful gem, Cypress On Rails, that eases a lot of the process of E2E with Rails App. This incredible gem deserves an article. Hence through this article, we will navigate through the installation and the basics of the uses of Cypress On Rails.โ€

Dean De Hartย published a new article aboutย HTTPS Certificates for LocalHost with Ruby on Rails 7 โ†’ โ€œ when working on a local development environment โ€“ localhost โ€“ itโ€™s common to see developers bypassing HTTPS and opting for HTTP instead. While this might seem like an insignificant detail during development, it can lead to unexpected issues when transitioning to production where HTTPS is typically enforcedโ€

Andre Nunesย published a new article aboutย How to use Prettier to lint Ruby files โ†’ โ€œIn this blog post, we will guide you through the process of setting up Prettier as a code formatter for your Ruby files in Visual Studio Code (VSCode)โ€

Mafulย published a new article aboutย How to use Cloudflare R2 with Ruby on Rails Active Storage โ†’ โ€œIn this post, we will go through object storage and use Cloudflare R2 for the serviceโ€

Mattias Velamssonย published a new article aboutย Ruby GUI with Glimmer โ†’ โ€œย a couple of weeks ago, I stumbled upon a Ruby library that makes creating a fully functional GUI super easy. Obvisouly, I had to try it out. So in this post, I'll walk through how I used this library to create a simple currency converterโ€

Deep Dives

Evgeniy Deminย published a new article aboutย Rails upgrade: why itโ€™s hard and a single trick on simplifying it.. โ†’ โ€œIโ€™m working on a Rails upgrade for a giant monolith application. Itโ€™s been a while already, and while Iโ€™m encountering many issues trying to jump from 5.2+ right to 6.1, I want to share some of the storiesโ€. You should also read the followup article aboutย Rails upgrade led to Ruby bug.

Paweล‚ Dฤ…browskiย published a new article aboutย Rails value object design pattern โ†’ โ€œRegardless of the type of architecture do you like the most in Rails, you will find value objects design pattern useful and, which is just as important, easy to maintain, implement and test. The pattern itself doesn't introduce any unneeded level of abstraction and aims to make your code more isolated, easier to understand and less complicatedโ€

Kevin Menardย published a new article aboutย IO#reopen and its surprising side effect โ†’ โ€œA short debugging story that taught us about the attributes of IO operationsโ€

Lucian Ghinda published a new article about Ruby's range literals and their effect on Rails Active Record queries โ†’ โ€œLearn about the difference between inclusive and exclusive end ranges and the SQL queries each choice producesโ€

Akshay Khotย wrote a new article about Let's Build a Web Application in Ruby without Rails โ†’ โ€œRails is great for building web apps. But it can be quite overwhelming if you don't know how web applications work. In this series of articles, we'll build a simple but complete app in plain Ruby without Rails, to get a deeper understanding and appreciation of everything Rails does for usโ€


Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody:

Support the newsletter for ~1.5$/week

If you consider upgrading and want more information, please read Why to subscribe to paid.

1
Share this post

Short Ruby News - Edition #49

newsletter.shortruby.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

ยฉ 2023 Lucian Ghinda
Privacy โˆ™ Terms โˆ™ Collection notice
Start WritingGet the app
Substack is the home for great writing