<commit_before># EmptyPort

take an empty port.

## Usage
	# 1. in case writing test for your server with empty_port
    require 'empty_port'
    class YourServerTest < Test::Unit::TestCase
        def setup
          @port = EmptyPort.get
          @server_pid = Process.fork do
            server = TCPServer.open('localhost', @port)
          end
          EmptyPort.wait(@port)
        end

        def test_something_with_server
        end

        def teardown
          Process.kill(@server_pid)
        end
    end

	# 2. in case writing for memcached test with empty_port

	port = EmptyPort.get
	pid = Process.spawn("memcached -p #{port}")
	at_exit do
		Process.kill(:TERM, pid)
	end

	# do something with memcached.

## DESCRIPTION

This library is useful when you test servers or client libraries.

## Installation

Add this line to your application's Gemfile:

    gem 'empty_port'

And then execute:<commit_msg>added using EmptyPort.wait<commit_after># EmptyPort

take an empty port.

## Usage
	# 1. in case writing test for your server with empty_port
    require 'empty_port'
    class YourServerTest < Test::Unit::TestCase
        def setup
          @port = EmptyPort.get
          @server_pid = Process.fork do
            server = TCPServer.open('localhost', @port)
          end
          EmptyPort.wait(@port)
        end

        def test_something_with_server
        end

        def teardown
          Process.kill(@server_pid)
        end
    end

	# 2. in case writing for memcached test with empty_port

	port = EmptyPort.get
	pid = Process.spawn("memcached -p #{port}")
	at_exit do
		Process.kill(:TERM, pid)
	end
	EmptyPort.wait(port)

	# do something with memcached.

## DESCRIPTION

This library is useful when you test servers or client libraries.

## Installation

Add this line to your application's Gemfile:

    gem 'empty_port'

And then execute:
{'fraction_non_alphanumeric': 0.0753315649867374, 'fraction_numerical': 0.002122015915119363, 'mean_word_length': 2.5121042830540037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1930007', 'n_tokens_mistral': 582, 'n_tokens_neox': 548, 'n_words': 186}