Sha256: f226200668c062492e441bd7f5a5bc2a3eb702c6d205c42266ff48bb8ec3e206
Contents?: true
Size: 706 Bytes
Versions: 16
Compression:
Stored size: 706 Bytes
Contents
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2016 require 'rack/handler/puma' require 'rack/builder' require 'instana/rack' ::Instana.logger.info "Booting instrumented background Rackapp on port 6511 for tests." Thread.new do app = Rack::Builder.new { use ::Instana::Rack map "/" do run Proc.new { |env| [200, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"scene!\"]"]] } end map "/error" do run Proc.new { |env| [500, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"error!\"]"]] } end } Rackup::Handler::Puma.run(app, Host: '127.0.0.1', Port: 6511) end sleep(2)
Version data entries
16 entries across 16 versions & 1 rubygems