ErrorHandlingによると, amqp ~> 0.8.0 ならば AMQP::Channel#auto_recovery で再接続が可能
別環境でも障碍の再現がうまくいかなかった場合は,クライアントサイドで対応するしかない
従って,アップグレードするため amqp ~> 0.8.0 にしたいが,現行の amgp = 0.7.1 からのアップグレードに何が必要か考える
request_json 'POST /users/:user_id/articles' do # request_json is nicer than describe_jsonapi? | |
let(:user_id) { 1 } | |
let(:article_id) { 'hello' } | |
before(:all) { User.make!(:id => :user_id) } | |
after(:all) { DatabaseCleaner.clean } | |
context 'when user posts valid article' do | |
request_json do | |
Article.make(:user_id => id, :article_id => article_id) |
FFF | |
Failures: | |
1) embedde many object making two grandsons failed childs is one | |
Failure/Error: Parent.where(:foo => 'foo').first.sons.should have(1).items | |
expected 1 items, got 2 | |
# ./embedded_object_id_spec.rb:55:in `block (3 levels) in <top (required)>' | |
2) embedde many object making two grandsons failed grandsons is two |
each_context { | |
'Aの場合' => { :key => 'a' }, | |
'Bの場合' => { :key => 'b' }, | |
} do | |
it { ... } | |
end | |
__EOF__ | |
{ |
class MyClass | |
def old_method | |
"my_method" | |
end | |
alias new_method old_method | |
# alias_method :new_method, :old_method | |
end | |
obj = MyClass.new |
$: << '.' | |
require 'test_app' | |
use Rack::ContentType | |
use Rack::ContentLength | |
run TestApp |
ErrorHandlingによると, amqp ~> 0.8.0 ならば AMQP::Channel#auto_recovery で再接続が可能
別環境でも障碍の再現がうまくいかなかった場合は,クライアントサイドで対応するしかない
従って,アップグレードするため amqp ~> 0.8.0 にしたいが,現行の amgp = 0.7.1 からのアップグレードに何が必要か考える
Rails.backtrace_cleaner.remove_silencers! | |
Rails.backtrace_cleaner.add_silencer { |line| line =~ /spec/ } | |
module ActiveSupport | |
class BacktraceCleaner | |
def clean_with_format(backtrace, kind = :silent) | |
filtered = clean_without_format(backtrace, kind) | |
splits = filtered.map do |line| |
cd ~ | |
[[ -e dotfiles ]] || git clone git@github.com:okitan/dotfiles.git | |
# override dotfiles | |
targets=".emacs.d .gemrc .gitconfig .gitignore .rspec .rvmrc .tmux.conf .vimrc" | |
for target in $targets; do | |
[[ -e $target ]] && mv $target $target.old | |
ln -s ~/dotfiles/$target ~ | |
done |
./fuga.rb | |
6 |
describe "named subject" do | |
subject(:a) { "a" } | |
subject(:b) { "b" } | |
it { a.should == "a" } | |
it { b.should == "b" } | |
it { should == "a" } | |
it { subject.should == "a" } | |
end |