This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "gcs_url", | |
"type": "STRING", | |
"mode": "NULLABLE" | |
}, | |
{ | |
"name": "timestamp", | |
"type": "TIMESTAMP", | |
"mode": "NULLABLE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :spec do | |
desc "Run all specs with simplecov" | |
task :coverage do | |
require "simplecov" | |
SimpleCov.start "rails" | |
Rake::Task["spec"].execute | |
`open coverage/index.html` | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
gems = `gem list --no-versions`.split(/\n/) - %w(bundler minitest rake rdoc) | |
system("gem uninstall -a -I -x #{gems.join(' ')}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "rubygems" | |
require "amqp" # requires version >= 0.8.0.RC14 | |
puts | |
EM.run do | |
puts "#"*20 | |
puts "AMQP.start block runs" | |
def connection(&block) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "rubygems" | |
require "amqp" # requires version >= 0.8.0.RC14 | |
puts "=> Example of automatic AMQP channel and queues recovery" | |
puts | |
AMQP.start(:host => "localhost") do |connection, open_ok| | |
puts "AMQP.start block runs" | |
# on_open, on_closedに渡されたブロックは、何度再接続をしても最初の一度だけしか呼び出されないが、 |