Types in Ruby

Quick thoughts on Sorbet, that has been announced at RubyKaigi 2018 and once again in the 2019 edition, the type-checker for Ruby. ...

April 20, 2019 · 2 min · Franck Verrot

Looking forward to Ruby's future

Ruby became a more stable and mature language over the years. Some would say innovation slowed down (and I was probably one of them), but I still appreciate writing Ruby on a daily basis on the job. In this blog post I will succinctly explain why Ruby is still a valid choice for writing new (web and non-web) applications, the challenges of maintaining large code bases and what I look forward in the coming years. ...

December 31, 2018 · 4 min · Franck Verrot

Benchmarking Ruby's `method_missing` vs `define_method`

After recently benchmarking PostgreSQL to find out if some of the techniques we used were efficient, I decided to look at the usage of a controversed Ruby feature: method_missing. ...

July 21, 2015 · 5 min · Franck Verrot

Hijacking gem commands

Rubygems has been made extensible by the usage of plugins. Any gem that provides a lib/rubygems_plugin.rb file will be discovered by the gem infrastructure, whether it is loaded by your application or not. Adding new commands is fairly easy, here’s how we could replace existing ones (like install), using only Rubygems’ public API. ...

April 21, 2015 · 3 min · Franck Verrot

Method definitions in Ruby 2.1.0 will not be void anymore

Ruby 2.1.0 will be released at the end of the year and among other features, a change done in the parser caught my eyes… ...

August 21, 2013 · 1 min · Franck Verrot

ActiveValidators 1.9.0

ActiveValidators 1.9.0 is out! gem install activevalidators Read on for the full - yet concise - changelog. ...

April 7, 2012 · 1 min · Franck Verrot

ActiveValidators 1.3.0

ActiveValidators 1.3.0 has been released! gem install activevalidators Read on for the full changelog. ...

March 20, 2011 · 1 min · Franck Verrot

Find out where a Rake task is defined

TL;DR Rake > 0.8.7 has a handy Rake::Task#locations method that makes it damn easy to know where a task is defined or enhanced. During the last LyonRb meetup we read a quite large portion of Rake’s source code. The idea was to find an easy way to determine what file was defining/enhancing what task. Richard and I just opened Rake 0.8.7’s source code (from our local machine’s RVM directory) and started hacking a bit to have that feature… ...

February 20, 2011 · 2 min · Franck Verrot

No Querying Views

I made this plugin when we migrated to Rails 3. It basically prevents the development team from triggering any database query from the views. ...

November 28, 2010 · 4 min · Franck Verrot

Rails 3, Railties and Engines

Rails 3 brings a lot of useful features. The main one, in my humble opinion, is the introduction of the classes Rails::Railtie and Rails::Engine. They bring the modularity that made code more reusable and easily integrable in your current code base. They also prove that there no reason to say that Rails is not ready for the Enterprise. One quick tip for the party poopers (you know who you are ;)): JRuby makes things even easier for your development operations team members as it allows you to run your Ruby app (ie: Rails) within your favorite App Server (Websphere, Tomcat, you name them). ...

April 7, 2010 · 5 min · Franck Verrot