Episode #307 - September 21st, 2012
http://ruby5.envylabs.com/episodes/311-episode-307-september-21st-2012
Yell 1.0.0
https://github.com/rudionrails/yell
- 出力用のライブラリ
- 複数のアダプタに対応しているのがすごいところ。stdout, datefile, syslog, Graylog2, や自分で書いたものとか
Complex Has Many Associations with ActiveRecord
http://www.artellectual.com/posts/complex-has-many-associations-with-activerecord
- 複雑なhas_manyの関係をActiveRecordで表現することについてのブログ記事
- has_manyのカスタマイズ方法
A fireside chat about optional parentheses
http://blog.mojotech.com/post/31812700196/a-fireside-chat-about-optional-parentheses
- ()カッコを付ける場合と付けない場合についてのブログ記事
- 式(expression)と文(statement)に関する考え
- つまりは、メソッド呼び出しの時は、引数がなくてもカッコを付けるべき
- カッコを付けることでメソッドであるということを表現できるから
LearnRubyAndRails.com
http://www.learnrubyandrails.com/
RubyやRailsに関するチュートリアルやスクリーンキャストなどをまとめたサイト
From Lisp to Ruby
http://patshaughnessy.net/2012/9/18/how-ruby-borrowed-a-decades-old-idea-from-lisp
StrongParameters
https://github.com/rails/rails/commit/c49d959e9d40101f1712a452004695f4ce27d84c
- DHH氏がRails EdgeにStrongParametersを追加した
Episode #300 - August 24th, 2012 続き
DCI and Refinements
http://mikepackdev.com/blog_posts/35-dci-with-ruby-refinements
あとでちゃんと↑の記事を読んでみる…
Thwarting Wifi Restrictions
http://rogueleaderr.tumblr.com/post/29855576743/never-again-be-thwarted-by-restrictive-guest-wifi
publicなwifiを使うときに、制限を受けないようにする方法を紹介しているブログ記事
- 無料の範囲のAmazon EC2のサーバーインスタンスを立てる
Removing Deadweight
http://blog.scoutapp.com/articles/2012/08/23/removing-deadweight-cleaning-up-our-rails-app
以下、ブログの内容簡単なまとめ
- テストの時間を短縮する
- test_benchmarkというgemを使う
- HTTPのリクエストに関するテストは重いので、fakewebを使う
- fixtureを使う場合とActiveRecord#createを使ったほうがいい場合を使い分ける
- ActiveRecord#createを使うと、アプリケーションのコードによるバリデーションとコールバック処理, 適用されるデフォルト値などが保証されたデータを見ることが出来る。
- fixtureを使うと、アプリケーションのコードやカラムに変更があったときに、fixtureで記述していたところも変更しないといけない
- Railsのプロジェクト内で使用されていないCSSとか画像ファイルやなどを削除する方法
- access.logからgrepで捜すとか
Episode #300 - August 24th, 2012
http://ruby5.envylabs.com/episodes/304-episode-300-august-24th-2012
Bootstrap 2.1
http://blog.getbootstrap.com/2012/08/20/bootstrap-2-1-0-released/
Twitter Bootstrapの2.1がリリースされた
120ものバグが修正された
- ドロップダウン、affixプラグイン等。ドキュメントも新しくなった
affixプラグインは、bootstrap-affix.jsで、ドキュメントの所の説明affixにある
- ↑のリンクの左側のメニューがまさにaffixプラグインで表示されているみたい
SASS 3.2
http://robots.thoughtbot.com/post/29895997507/even-more-syntactically-awesome-stylesheets
SASS 3.2がリリースされた
SASS Chrome Plugin
https://chrome.google.com/webstore/detail/lkofmbmllpgfbnonmnenkiakimpgoamn
便利そうだが…
↑の拡張の説明ページで作者がChrome側の問題等挙げている…
UXの問題があって、Chrome自体が修正されないといけないらしく…issue ticketに上げたらしいが、作者がパッチを上げる時間が今はないらしい。
11月ぐらいまではこの拡張に割ける時間が少ないらしい。
Chromeにパッチを送るとか、Googleに言ってくれると嬉しいなという話が書いてあった。
Git-Process
http://jdigger.github.com/git-process/
- git-flowの考え方が重いと考えて作られたgem
- fetureブランチの自動管理のgem(?)
Git-Processを使ってみたというはてなブログを発見
http://d.hatena.ne.jp/Voluntas/20101223/1293111549
続く
Episode #299 - August 21, 2012
http://ruby5.envylabs.com/episodes/303-episode-299-august-21-2012
Trace your execution stack with StackTracy
http://vimeo.com/47689001
StackTracy (stack_tracy)というgemの紹介
↑の動画で導入方法が紹介されている。
動画ではSinatoraを使った場合のスタックトレースの仕方が紹介されているが、
Sinatoraじゃなくて、普通のRubyのコードで可能。
https://github.com/archan937/stack_tracy
に載っている使い方だとこんな感じ。
[1] pry(main)> StackTracy.start [2] pry(main)> puts "testing" [3] pry(main)> StackTracy.stop
[1] pry(main)> stack_tracy do [1] pry(main)* puts "testing" [1] pry(main)* end
- stack_tracyのパフォーマンスが測定に影響しないように、一部分はCで書かれているらしい
The Rails flash isn’t just for messages
http://henrik.nyh.se/octopress/2012/08/the-rails-flash/
- Railsのflash機能についてのブログ記事
- flashで複雑な通知もすることが出来る
- Google Analytics eventsを通知する方法とか
The University of Reddit
http://ureddit.com/class/40250/web-programming-with-ruby-on-rails
- ↑の記事が502でアクセスできなかった…
- Ruby on Railsの学習コンテンツ
- 7週間のコースで45分のスクリーンキャストが毎週ある
Episode #298 - August 17, 2012
http://ruby5.envylabs.com/episodes/302-episode-298-august-17-2012
2012 Rails Hosting Surve
http://blog.planetargon.com/entries/2012/8/14/rails-hosting-survey-2012-results-are-in
Delegation, you keep using that word…
- デリゲーションについての記事
- 本当のデリゲーションの意味について(????)
- JavaScriptやJSのprototypeシステムについて見識が深まるブログ記事
pjax on Rails
learn.thoughtbot.com
https://learn.thoughtbot.com/
Railsのコンサル系企業thoughtbotが、教育系のコンテンツを1つのサイトにまとめた。
以下のジャンルがある
Ruby, Rails, design, testing, vim, JavaScript, git, RSpec
Episode #297 - August 14, 2012
http://ruby5.envylabs.com/episodes/301-episode-297-august-14-2012
Ruby on Rails version 3.2.8 has been released
http://weblog.rubyonrails.org/2012/8/9/ann-rails-3-2-8-has-been-released/
Get your CoreLocation with Lost and Found
Bitwise operations in Ruby, and an example application to testing with Rspec
http://vitobotta.com/applying-bitwise-operations-to-rspec-testing/
Manage Beanstalk with Backburner
Episode #296 - August 10th, 2012
http://ruby5.envylabs.com/episodes/300-episode-296-august-10th-2012
Huffshell
https://github.com/paulmars/huffshell
- 今までにコマンドラインで打ったコマンドをカウントして表示してくれる
- 作成した方がいいエイリアスの推薦をしてくれる
- gemでインストールして
- alias > ~/.aliases.cacheをコマンドラインで打つ
- huffshellとコマンドラインで打つ
と使える!
こんな感じ
$ huffshell Huffshell ============= Importing /Users/sea_mountain/.bash_history 216 commands found 216 ============= 28 unique keywords 28 commands appear > 1 times 18 commands appear > 2 times 11 commands appear > 5 times 9 commands appear > 10 times 2 commands appear > 20 times 0 commands appear > 50 times 0 commands appear > 100 times 0 commands appear > 250 times Most common commands: ls 48 cd 32 hg 15 vi 14 ln 13 rvm 13 git 12 brew 11 exit 11 Command tree: ls 48: 'ls' => l cd 32: 'cd' => c
このPCあまり使ってないことが…明らかに…////
Ruby Constructs: Class, Module and Mixin
http://matt.aimonetti.net/posts/2012/07/30/ruby-class-module-mixins/
Rubyエンジニアがよく思う疑問
- クラスとモジュールの違い
これの解説が↑のブログ記事で行われている。
あとで読む
Version Constraint
Textmate Open Sourced
https://github.com/textmate/textmate
「みんな大好きTextmateがオープンソースになったよ!!!」
「え〜Vimもオープンソースでしょ〜?」