This is a short(ish) form of the newsletter where I limited the number of sections and also tried to include less content in each one of them:
๐งฐ Gems, Libraries, and Updates
๐ค Related (but not Ruby-specific)
If you want to read the usual long format that includes videos, articles and podcasts, and a lot more content that I did not include here click on:
This is just an experiment with the format of the newsletter. I will share how it goes!
This edition was created with support fromย @adrianthedevย fromย Avo for Ruby on Rails (a friendly full-featured Rails admin panel) and @jcsrb
It is excellent to start the week with something positive:
Also, on the topic of good news, donโt forget that Hanami is very close to the final release of version 2.0. Follow the progress here (on Trello) or here (on Github).
๐ Our Community
๐ Adrian Marin shared a suggestion about how to contribute to supporting more people to user Ruby:
It will help if you read the entire conversation as good ideas are replied back and forth.
๐ย Ruby On Railsย shared the news about Rails Foundation:
If you want to read also about concerns regarding this foundation, here is a conversation started by Luca Guidi and here is one started by Brandon Weaver.
๐ Mike Dalessio shared that the Ruby Core monthly meeting notes are available on Github repo:
๐ Joel Drapper shared their take on React and View layer on Rails:
You should read the conversation on ruby.social it has some excellent arguments for using ViewComponent or Phlex.
๐ย Justin Searlsย shared that DevRel and megacorps influence our decision process:
๐ย Noel Rappin shared that The Pragmatic Bookshelf is having a Black Friday, and now you can buy Ruby books with a discount:
You can now buy the Programming Ruby 3.2 pickaxe book with 40% discount using that code.
๐ Code Inspiration
๐ย Kirill Shevchenkoย shared a code sample showing the difference between ==
and .equal?
And David Stosik added:
๐ย Kirill Shevchenkoย shared a code sample about using split with a second argument:
๐ย Greg Navisย shared code samples about methods similar to method_missing:
Here is the list that Greg will demo with code samples in this thread:
method_added - โInvoked as a callback whenever an instance method is added to the receiverโ
method_removed - โInvoked as a callback whenever an instance method is removed from the receiverโ
method_undefined - โInvoked as a callback whenever an instance method is undefined from the receiver.โ
prepended - โThe equivalent ofย
included
, but for prepended modules.โincluded - โCallback invoked whenever the receiver is included in another module or class.โ
extended - โThe equivalent ofย
included
, but for extended modules.โsingleton_method_added - โInvoked as a callback whenever a singleton method is added to the receiver.โ
singleton_method_removed - โInvoked as a callback whenever a singleton method is removed from the receiverโ
singleton_method_undefined - โInvoked as a callback whenever a singleton method is undefined in the receiver.โ
method_missing - โInvoked by Ruby whenย objย is sent a message it cannot handle.โ
const_missing - โInvoked when a reference is made to an undefined constant inย mod.โ
respond_to_missing? - โHook method to return whether theย objย can respond toย idย method or not.โ - please notice the docs say โDO NOT USE THIS DIRECTLYโ
You should read the entire thread where Greg shares code samples about each method.
๐ย Brad Gesslerย shared a thread where he showed how to build a view for a form with Phlex.fun:
Here is a code sample Brad shared for how the controller might look like, but you should read the entire thread as it has more code samples about how to use Phlex components:
๐ย Leastbadย shared a one-line config for Rails that will enable Brotli gzip content-encoding:
Before enabling this, you should read about The BREACH attack
๐ย Kevin Newtonย shared a code sample about how to use emojis as methods:
๐ย Kirill Shevchenkoย sharedย a collection of tools to debug memory issues:
Here is the list of gems with links:
๐ u/campbellm asked a question about how to use service objects and received a lot of good responses:
If you have read so far and you like the content, maybe you take into consideration sharing this and subscribing:
๐งฐ Gems, Libraries, and Updates
๐งฐ Meg Gutshallย sharedย the prettier_print gem that can replace the prettyprint gem.
๐งฐ Joel Drapper published a new version of Phlex. Read the changelog here
๐งฐ Marco Rothย sharedย that their PR about Outlets API was merged to hotwire/stimulus:
๐งฐ Stan Loย sharedย they are working on adding the edit command to IRB. Check out the PR Add edit command by st0012
๐งฐ Joel Drapper shared an example of how easy it is to re-use Phlex views as gems: See the code here
๐งฐ Stanislav Katkov shared an update of their gem rdoc-markdown
where they added output examples. See example 1 and example 2
๐งฐ Joel Drapper shared they merged a PR that adds around_template hook on Phlex: Check out the PR here
๐งฐ Stephen Ierodiaconou published a new gem named yaml_csp_config that โallows you to specify your content security policy (CSP) in a YAML fileโ.
๐ค Related (but not Ruby-specific)
๐คย Jason Warnerย shared their thoughts about the monolith and micro-services architecture:
Here are some parts of the thread, but you should read it all:
๐ค Ryan Batesย sharedย that it is possible to ignore specific commits while git blame: Read the docs here
Here is the relevant section from the Github docs:
๐คย Alex Russellย shared about a new concept named Minimal Client Complexity:
Here is one of those risks, as Alex mentions it, but you should read the thread:
๐คย Study Every Daย shared how to open all changed files in vim:
It is worth considering this reply from Ara Hocopian:
๐คย Mosquito Capitalย sharedย a good thread about how to think and approach reliability scenarios:
If you read that thread, you can easily extract a checklist about what to check or how to test your system and see if you have the proper processes and people to handle these unexpected scenarios.