23 Jan '13, 2am

Pryが真の力を発揮してくれる19個のコマンドとコマンドの自作方法[Rails] - 酒と泪とRubyとRailsと

%w[ rubygems pp logger] .each do |gem| begin require gem rescue LoadError end end Pry.config.editor = "mate -w" # Default Command Set, add custom methods here: default_command_set = Pry::CommandSet.new do command "copy" , "Copy argument to the clip-board" do |str| IO.popen( 'pbcopy' , 'w' ) { |f| f << str.to_s } end command "clear" do syst em 'clear' if ENV[ 'RAILS_ENV' ] output.puts "Rails Environment: " + ENV[ 'RAILS_ENV' ] end end command "sql" , "Send sql over AR." do |query| if ENV[ 'RAILS_ENV' ] || defined?( Rails) pp ActiveRecord::Base.connection.select_all( query) else pp "Pry did not require the environment, try `pconsole`" end end command "caller_method" do |depth| depth = depth.to_i || 1 if /^( .+?) :( \d +)( ?::in ` ( .*) ' ) ?/ = ~ caller ( depth+1) .first file = Regexp.last_match[ 1] line = Regexp.last_match[ 2] .to_i method = Regexp.last_match[ 3] output.put...

Full article: http://morizyun.github.com/blog/pry-command-rails-ruby/

Tweets

Pryの秘めた力を最大限引き出す4つの拡張機能[Rails] - 酒と泪とRubyとRailsと

morizyun.github.com 22 Jan '13, 5am

# Slightly dirty hack to fully support in-session Hirb.disable/enable toggling Hirb::View.instance_eval do def enable_outp...

Railsアプリの本番エラーをherokuで管理、メール通知する Errbit - 酒と泪とR...

morizyun.github.com 20 Jan '13, 7am

heroku addons:add mongolab:starter heroku addons:add sendgrid:starter heroku config:add HEROKU = true heroku config:add ER...

Rails PoC exploit for CVE-2013-0333. #rails

ronin-ruby.github.com 29 Jan '13, 6am

$ rails_omakase http://localhost:3000/secrets "puts 'lol'" lol Started POST "/secrets" for 127.0.0.1 at 2013-01-28 18:53:1...

my solution for the "Rails has two default stacks" problem cc @steveklabnik

my solution for the "Rails has two default stac...

gilesbowkett.blogspot.com 24 Jan '13, 7pm

I think the problem is the concept of a stack. Everybody builds Rails apps their own way. There's a 37Signals (or omakase)...