{"id":15405575,"url":"https://github.com/krisleech/harbour","last_synced_at":"2025-03-24T21:41:13.832Z","repository":{"id":4941316,"uuid":"6098394","full_name":"krisleech/harbour","owner":"krisleech","description":"Terminate process listening on a port","archived":false,"fork":false,"pushed_at":"2012-10-27T22:32:33.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T04:44:46.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krisleech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-06T00:19:30.000Z","updated_at":"2015-03-24T19:06:26.000Z","dependencies_parsed_at":"2022-08-18T02:45:22.719Z","dependency_job_id":null,"html_url":"https://github.com/krisleech/harbour","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fharbour","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fharbour/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fharbour/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krisleech%2Fharbour/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krisleech","download_url":"https://codeload.github.com/krisleech/harbour/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245359248,"owners_count":20602322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:17:13.134Z","updated_at":"2025-03-24T21:41:13.806Z","avatar_url":"https://github.com/krisleech.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Harbour\n\nWith harbour you can:\n\n* See if a port is open\n* Find the pid of the process listening on a port\n* Kill the process listening on a port\n\nNote: Only works on MacOS, GNU/Linux coming soon...\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'harbour'\n\n## Usage\n\n    port = Harbour::Port.new(8080)\n    port.open? # =\u003e true\n    port.pid   # =\u003e 1282\n    port.term!\n    port.kill!\n\n### Terminating a process\n\n    port = Harbour::Port.new(8080)\n    port.term!(:timeout =\u003e 10, :try_kill =\u003e true)\n\n* `timeout` - the number of seconds to wait for the process to terminate before\n  raising an exception\n* `try_kill` - if a TERM signal fails before timeout then send a KILL signal\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## Author\n\nKris Leech / teamcoding.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisleech%2Fharbour","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrisleech%2Fharbour","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrisleech%2Fharbour/lists"}