Sha256: 36c43f9caca806182da8e84d7e645122e4cd130f8b7ff9cbe53870fb5e15f634
Contents?: true
Size: 663 Bytes
Versions: 17
Compression:
Stored size: 663 Bytes
Contents
require 'rake' require 'ramaze' require 'ramaze/spec/helper/simple_http' task :fill do uri = URI('http://localhost:7000/save') base = Ramaze::BASEDIR/'..' ext_syntax = { 'xhtml' => 'html', 'rb' => 'ruby', 'css' => 'css', 'js' => 'javascript' }.each do |ext, syntax| Dir[base/"**/*.#{ext}"].each do |file| p syntax => file begin req = SimpleHttp.new(uri) req.post('syntax' => syntax, 'text' => File.read(file)) rescue Net::HTTPInternalServerError => ex puts ex retry end end end end desc 'run specs' task :spec do sh 'ruby spec/rapaste.rb' end task :default => :spec
Version data entries
17 entries across 17 versions & 4 rubygems