rastam on rails

東京在住のマレーシア人 Rubyist

Ruby Weekly #473: 日本語サマリー

rubyweekly.com

Highlights

Ruby 2.7.0 Preview 2 Released

Ruby 2.7.0 Preview 2 リリース。

  • メモリをデフラグしてくれる GC
  • パターンマッチング
  • 複数行編集可能な irb
  • ハッシュ→キーワード引数自動変換の deprecation

Fun with each_with_object and Other Enumerator Adventures

[1, 2, 3].each_with_object(arg).map(&:my_method)my_methodarg を渡す裏技解説。

The Annual Fukuoka Ruby Award Competition is Back

10/9〜12/11 開催の フクオカ Ruby 大賞募集。

Rails 6.0 New Framework Defaults: What They Do and How to Safely Uncomment Them

Rails 6 バージョンアップ時の rails app:update で生成される新規フラグの解説。

Articles & Tutorials

Loading Additional Ruby Gems in Development

Gemfile に追加しなかった gem を手元で使う手順。

  1. Gemfile を読み込む手元用 Gemfile.private 作成。
  2. BUNDLE_GEMFILE 環境変数で Gemfile.private 指定。
  3. spring 設定。
  4. puma-dev、pow 設定。

Why to Use Active Support in Rails for Deprecation Messages

ActiveSupport::Deprecation.warn で deprecation する方法。

The Tools Rails 6 Introduced for Action Cable Testing.

Rails 6 にマージされた action-cable-testing gem の機能紹介。

Code and Tools

command_line: An Easier Way Execute Command Line Applications

CLI コマンド実行用 gem。stdin、stdout、終了ステータス用 DSL 付き。

Lowkiq: Ordered Background Jobs Processing

ジョブの実行順番を保証してくれる非同期処理ツール。