Sha256: 5b01220f326a21919d84b110a8d9985054e1e50350ee4f130266159b03c38eae

Contents?: true

Size: 359 Bytes

Versions: 21

Compression:

Stored size: 359 Bytes

Contents

require 'pact/mock_service/server/spawn'

module Pact
  module MockService
    module Server
      class Respawn

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

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pact-mock_service-0.2.4 lib/pact/mock_service/server/restart.rb