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

Version Path
Pistos-ramaze-2008.09 examples/app/rapaste/Rakefile
Pistos-ramaze-2008.12 examples/app/rapaste/Rakefile
Pistos-ramaze-2009.01 examples/app/rapaste/Rakefile
Pistos-ramaze-2009.02 examples/app/rapaste/Rakefile
manveru-ramaze-2008.07 examples/app/rapaste/Rakefile
manveru-ramaze-2008.08 examples/app/rapaste/Rakefile
manveru-ramaze-2008.09 examples/app/rapaste/Rakefile
manveru-ramaze-2008.10 examples/app/rapaste/Rakefile
manveru-ramaze-2008.12 examples/app/rapaste/Rakefile
manveru-ramaze-2009.01 examples/app/rapaste/Rakefile
ptomato-ramaze-2009.02.1 examples/app/rapaste/Rakefile
ptomato-ramaze-2009.02 examples/app/rapaste/Rakefile
ramaze-2008.06 examples/app/rapaste/Rakefile
ramaze-2009.01 examples/app/rapaste/Rakefile
ramaze-2008.11 examples/app/rapaste/Rakefile
ramaze-2009.02 examples/app/rapaste/Rakefile
ramaze-2009.03 examples/app/rapaste/Rakefile