Sha256: 3cdcc9bff50a21c4d7cb49702a8649752c90ecc96f6441ee9c59ea4e3f22adf4

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

require 'sinatra/base'

module Voom
  module Presenters
    module Demo
      class Slow < Sinatra::Base
        post('/_slow_') do
          sleep(Integer(params.fetch('seconds',5)))
          content_type :json
          JSON.dump(params)
        end

        # start the server if ruby file executed directly
        run! if app_file == $0
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 lib/voom/presenters/demo/slow.rb
voom-presenters-2.1.0 lib/voom/presenters/demo/slow.rb
voom-presenters-2.0.3 lib/voom/presenters/demo/slow.rb
voom-presenters-2.0.2 lib/voom/presenters/demo/slow.rb
voom-presenters-2.0.1 lib/voom/presenters/demo/slow.rb
voom-presenters-2.0.0 lib/voom/presenters/demo/slow.rb