Sha256: 92fdbcc3f8975b0a42a98e1ba4d8b518300601f3ac8765e644306ccc6eb0b8a6

Contents?: true

Size: 716 Bytes

Versions: 47

Compression:

Stored size: 716 Bytes

Contents

module Excon
  module Test
    module Plugin
      module Server
        module Webrick
          def start(app_str = app, bind_uri = bind)
            bind_uri = URI.parse(bind_uri) unless bind_uri.is_a? URI::Generic
            host = bind_uri.host.gsub(/[\[\]]/, '')
            port = bind_uri.port.to_s
            open_process('rackup', '-s', 'webrick', '--host', host, '--port', port, app_str)
            line = ''
            until line =~ /HTTPServer#start/
              line = error.gets
              fatal_time = elapsed_time > timeout
              raise 'webrick server has taken too long to start' if fatal_time
            end
            true
          end
        end
      end
    end
  end
end

Version data entries

47 entries across 44 versions & 4 rubygems

Version Path
excon-0.72.0 lib/excon/test/plugin/server/webrick.rb
excon-0.71.1 lib/excon/test/plugin/server/webrick.rb
excon-0.71.0 lib/excon/test/plugin/server/webrick.rb
excon-0.70.0 lib/excon/test/plugin/server/webrick.rb
excon-0.69.1 lib/excon/test/plugin/server/webrick.rb
excon-0.69.0 lib/excon/test/plugin/server/webrick.rb
excon-0.68.0 lib/excon/test/plugin/server/webrick.rb
excon-0.67.0 lib/excon/test/plugin/server/webrick.rb
excon-0.66.0 lib/excon/test/plugin/server/webrick.rb
excon-0.65.0 lib/excon/test/plugin/server/webrick.rb
excon-0.64.0 lib/excon/test/plugin/server/webrick.rb
excon-0.63.0 lib/excon/test/plugin/server/webrick.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/excon-0.62.0/lib/excon/test/plugin/server/webrick.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/excon-0.62.0/lib/excon/test/plugin/server/webrick.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/excon-0.62.0/lib/excon/test/plugin/server/webrick.rb
excon-0.62.0 lib/excon/test/plugin/server/webrick.rb
excon-0.61.0 lib/excon/test/plugin/server/webrick.rb
excon-0.60.0 lib/excon/test/plugin/server/webrick.rb
excon-0.59.0 lib/excon/test/plugin/server/webrick.rb
excon-0.58.0 lib/excon/test/plugin/server/webrick.rb