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-2.6.3 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.6.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.6.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.5.4 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.5.3 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.5.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.4.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.3.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.2.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.1.1.pre.alpha.2 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.1.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.0.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-2.0.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-1.2.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-1.1.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-1.0.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.12.1 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.12.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.11.0 lib/pact/mock_service/server/respawn.rb
pact-mock_service-0.10.2 lib/pact/mock_service/server/respawn.rb