Sha256: d94a5cc1cbf6329b4b2c526aa897041555b25d349b2f92c29db57f05450ff994

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

#!/usr/bin/env ruby

require 'sinatra'

class Webserver < Sinatra::Base
  enable :protection

  get '/:name' do
    File.read(File.expand_path("../../files/test/#{params[:name]}", __FILE__))
  end

  post '/rspec/:test' do
    case params[:test]
    when 'send'
      if params[:hello] == 'world'
        'hello rspec'
      end
    end
  end
end

Webserver.start!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
proxy_tester-0.0.1 script/test_web