Add the following to your
" CocoaPods au BufNewFile,BufRead Podfile,*.podspec set filetype=ruby
Even though the menu refers to "extensions" this method also works for
Podfile files, which have no extension. It will not cause Sublime Text 2 to open all files without extensions in Ruby mode.
Add the following to your init.el
(add-auto-mode 'ruby-mode "Podfile\\'" "\\.podspec\\'")