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.10.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.10.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.9.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.8.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.8.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.8.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.7.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.7.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.7.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.6.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.5.5 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.5.4 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.5.3 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.5.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.5.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.5.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.4.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.4.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.4.0 lib/pact/mock_service/server/restart.rb
pact-mock_service-0.3.0 lib/pact/mock_service/server/restart.rb