ruby | debugger |
---|---|
1.8 | ruby-debug |
1.9 | debugger |
2.0+ | byebug |
in Gemfile
if RUBY_VERSION < '1.9'
if ( !@include_once(dirname(__FILE__).'/../vendor/autoload.php') ) { | |
$dir = dirname(dirname(dirname(__FILE__))); | |
while ( !in_array('composer.json', array_map('basename', glob("{$dir}/*"))) ) { | |
if ( in_array('autoload.php', array_map('basename', glob("{$dir}/*"))) ) { | |
include_once($dir.'/autoload.php'); | |
break; | |
} else { | |
$dir = dirname($dir); | |
} |
$fp = fopen('php://temp', 'r+'); | |
foreach ( array_map(array($this, 'to_array'), $items) as $item ) { | |
fputcsv($fp, array_values($item)); | |
} | |
rewind($fp); | |
$contents = stream_get_contents($fp); | |
fclose($fp); | |
return $contents; |
ruby | debugger |
---|---|
1.8 | ruby-debug |
1.9 | debugger |
2.0+ | byebug |
in Gemfile
if RUBY_VERSION < '1.9'
DatabaseRewinder.strategy = :truncation | |
DatabaseRewinder.clean_all | |
class ActiveSupport::TestCase | |
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. | |
fixtures :all | |
def setup | |
DatabaseRewinder.start | |
end |
def allow_concurrency? | |
if config.allow_concurrency.nil? | |
config.cache_classes && config.eager_load | |
else | |
config.allow_concurrency | |
end | |
end |
wkhtmltopdf -O landscape -s Letter http://localhost:9090/print pdf.pdf |
command:test | |
system(__DIR__.'/../../vendor/bin/phpunit'); | |
command:untracked | |
system('git ls-files -o --exclude-per-directory=.gitignore'); |
ical2gcalがGoogle Calendar API v3対応したよ | |
AndroidWearドヤぁ | |
モデリングしてますか? | |
Riemoh | |
RubyKaigiとYAPC::Asia | |
俺とDockerfileとtDiaryとKubernets | |
Webの歴史をふり返る | |
EngineYard触ってみた | |
5分でわかるオブジェクト指向 | |
ライフゲーム最後まで作ってみました |
gulp.task('cordova-plugin-install', function() { | |
require('./plugins.json').forEach(function(plugin) { | |
sh.exec('cordova plugin add ' + plugin, {async: false}, function(code, output) { | |
console.log(output); | |
}); | |
}); | |
}); |
require "rake/testtask" | |
Rake::TestTask.new do |t| | |
t.description = nil | |
t.pattern = 'spec/**/*_spec.rb' | |
end | |
desc 'start server and do spec and cleanup' | |
task :spec => :test do | |
Process.kill(:INT, @pid) |