You [Gerald Bauer¹] have been permanently banned [for life] from participating in r/ruby (because of your writing off / outside of r/ruby). I do not see your participation adding anything to this [ruby] community.

-- Richard Schneeman (r/ruby mod and fanatic illiberal ultra leftie on a cancel culture mission)

¹: I know. Who cares? Who is this Gerald Bauer anyway. A random nobody for sure. It just happens that I am the admin among other things of Planet Ruby.

Case Studies of Code of Conduct "Cancel Culture" Out-Of-Control Power Abuse - Ruby - A Call for Tolerance On Ruby-Talk Results In Ban On Reddit Ruby

Update (August, 2022) - A Call for More Tolerance And Call For No-Ban Policy Results In Ban On Ruby-Talk (With No Reason Given)

>  I just banned gerald.bauer@gmail.com.
>
>  -- SHIBATA Hiroshi
>
>> THANK YOU
>> 
>>  -- Ryan Davis
>>
>>
>> My full support to moderators.
>>
>> -- Xavier Noria
>> 
>> My full support to moderators.
>>
>>  -- Carlo E. Prelz
>>
>>  That's fun.
>>
>>  -- Alice

Read the full story »


« 25 Days of Ruby Gems - Ruby Advent Calendar 2020, December 1st - December 25th

Day 10 - happy_gemfile Gem - Stop House Keeping Your Gemfile. (Auto-)Format Your Gems Sorted from A to Z and by Groups. (Auto-)Clean up the Clutter. Happy Gemfile Day!

Written by MikeRogers0 Mike Rogers

A Rubyist, a menace, a web hygienist. Working on Typo CI, a spellchecker for Pull Requests. Looking for help with Ruby Starter Kits, a way for people to get Ruby up and running with just docker.

What is happy_gemfile?

The happy_gemfile is an awesome gem that sorts your projects Gemfile. It strips comments, organises the groups & then alphabetises everything.

It’s kind of a radical, but I’ve really started to like this approach.

How do you use it?

$ gem install happy_gemfile
$ happy_gemfile all

Install the gem onto your machine, then run happy_gemfile all in your terminal and you’re good, that will rewrite your Gemfile to be super organised!

Why would you want to sort the Gemfile?

The Gemfile is an powerful file, it tells bundler which gems you’d like installed, the version number you’d be happy with & possibly if you only want to install that gem in development.

They’re great, but also wildly different between projects. Some projects may add lots of comments, some may group gems by category with nice headings & others may just drop in required gems in an adhoc manor. In most cases, any attempt at organising is very short lived.

However, I’ve recently started ordering my gems alphabetically and I’ve really enjoyed how much I don’t have to think about my Gemfile, I can just run a command and move on.

What does the end result look like?

Your average boilerplate Rails Gemfile ends up being a lot more cut down, initially it might throw you off that rails is in the middle of the pack, but I think it does feel more easier to cognitively digest.

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.2'

gem 'bootsnap', '>= 1.4.2', require: false
gem 'jbuilder', '~> 2.7'
gem 'puma', '~> 4.1'
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
gem 'sass-rails', '>= 6'
gem 'sqlite3', '~> 1.4'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  gem 'listen', '~> 3.2'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
  gem 'web-console', '>= 3.3.0'
end

Are their any drawbacks?

Bundler loads the gems in the order they’re appear in the Gemfile, so if a gem requires another to be present without explicitly requiring it, it could cause problems. However, I think this is a problem of the past, as gems are much more well written today compare to 10 years ago.

How does this change adding new gems?

As a result of not having to worry about the ordering of my Gemfile, I’ve started using $ bundle add when adding my gems. This just adds the new gem to the bottom of the file, so I do need to rerun happy_gemfile all before committing it.

Find Out More

References

Built with Ruby (running Jekyll) on 2023-01-25 18:05:39 +0000 in 0.371 seconds.
Hosted on GitHub Pages. </> Source on GitHub. (0) Dedicated to the public domain.