PIYO - Tech & Life -

Ruby

Rails周りで最近知ったこと 2018/04版

String#squish ActiveSupportで定義されているらしい。 def squish dup.squish! end def squish! gsub!(/[[:space:]]+/, " ") strip! self end halt_callback_chains_on_return_false がDeprecatedになった件でプルリク見てたら書いてあってみつけた。 deprecate halt_callback_chains_on_return_false instead of `halt_and… · rails/rails@4e63ce5 ActiveSupport::Deprecation.warn(<<-MSG.squish) ActiveSupport.halt_callback_chains_on_return_false is deprecated and will be removed in

markdown_section_numbering gemをアップデート

昔こんなのを作ったわけだけど、本当に少しだけ足りないなと思うところがあったのでアップデートしました。 <img src=“https://capture.heartrails.com/small?https://blog.piyo.tech/posts/2014-07-06-193000" alt=“マークダウンに見出し番号をつけるRuby Gem書いた - ぴよログ"

Azure Storage QueueでBase64関係の例外

バッチ処理のためのメッセージキューとしてMicrosoftのAzure Storage Queueを使っている。C#での使い勝手は言わずもがなだし、Rubyでも最低限のSDKが提供されているのでAWSと比べて使い勝手