Sha256: a61787da6036858fff64434e1a4878ca71a5a5ed8fb89aa0af12f79018c68151

Contents?: true

Size: 564 Bytes

Versions: 165

Compression:

Stored size: 564 Bytes

Contents

# this example does *not* work properly with WEBrick
#
# run *one* of these:
#
#   rackup -s mongrel stream.ru   # gem install mongrel
#   thin -R stream.ru start       # gem install thin
#   unicorn stream.ru             # gem install unicorn
#   puma stream.ru                # gem install puma

require 'sinatra/base'

class Stream < Sinatra::Base
  get '/' do
    content_type :txt

    stream do |out|
      out << "It's gonna be legen -\n"
      sleep 0.5
      out << " (wait for it) \n"
      sleep 1
      out << "- dary!\n"
    end
  end
end

run Stream

Version data entries

165 entries across 159 versions & 26 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/sinatra-1.4.8/examples/stream.ru