Sha256: f9b238b99b5a681731afc4a781adb363ca9715d19d1c95fbf42808dac8046ee0

Contents?: true

Size: 377 Bytes

Versions: 60

Compression:

Stored size: 377 Bytes

Contents

require 'pact/mock_service/server/spawn'

module Pact
  module MockService
    module Server
      class Respawn

        def self.call pidfile, port, ssl = false
          if pidfile.file_exists_and_process_running?
            pidfile.kill_process
          end

          Spawn.(pidfile, port, ssl) do
            yield
          end
        end
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 2 rubygems

Version Path
pact-mock_service-3.12.3 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.12.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.12.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.12.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.11.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.11.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.11.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.10.0 lib/pact/mock_service/server/respawn.rb
hs-pact-mock_service-3.9.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.9.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.9.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.8.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.7.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.6.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.6.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.6.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.5.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.4.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.3.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-3.3.0 lib/pact/mock_service/server/respawn.rb