{"id":16079112,"url":"https://github.com/pat/thinking-sphinx-ports","last_synced_at":"2026-01-11T03:31:03.751Z","repository":{"id":62558948,"uuid":"66138908","full_name":"pat/thinking-sphinx-ports","owner":"pat","description":"Assign unique ports to Thinking Sphinx automatically","archived":false,"fork":false,"pushed_at":"2020-08-12T01:54:25.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-29T06:44:38.520Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pat.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.markdown","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-20T09:26:21.000Z","updated_at":"2020-08-12T01:54:22.000Z","dependencies_parsed_at":"2022-11-03T11:15:28.476Z","dependency_job_id":null,"html_url":"https://github.com/pat/thinking-sphinx-ports","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pat/thinking-sphinx-ports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fthinking-sphinx-ports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fthinking-sphinx-ports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fthinking-sphinx-ports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fthinking-sphinx-ports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pat","download_url":"https://codeload.github.com/pat/thinking-sphinx-ports/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fthinking-sphinx-ports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275632566,"owners_count":25500073,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-09T10:40:35.293Z","updated_at":"2025-09-17T17:32:26.788Z","avatar_url":"https://github.com/pat.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThinkingSphinx::Ports\n\nAutomatically assign Sphinx ports to multiple apps using Thinking Sphinx on the one machine. This is useful if you have many apps on your development machine that use Sphinx and Thinking Sphinx, and you don't want to worry about making sure the port you've assigned for it isn't being used elsewhere.\n\nThis library is aimed development and test environments - each app and environment gets a unique port, to avoid any conflicts.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'thinking-sphinx-ports', '~\u003e 0.1.2', :groups =\u003e [:development, :test]\n```\n\n**This gem is not meant for use in production environments.** Indeed, it may override your environment-specific settings, so make sure you be specific in the environments it should be loaded within.\n\n## Usage\n\nBeyond adding it to your Gemfile, there's nothing else you need to do for Rails applications. Thinking Sphinx will automatically be assigned a unique port based on its environment and path.\n\nIf you have Sphinx daemons running on your machine already, stopping those daemons and then running `rake ts:configure ts:start` is recommended - this will have the daemon using their newly assigned port.\n\nIf you want to use this gem with non-Rails apps, then you'll want something along the lines of this code to run while you're app is booting up:\n\n```ruby\n# for non-Rails apps only\nThinkingSphinx::Ports.call [Dir.pwd, ENV['RACK_ENV']]\n```\n\nModify those variables as you wish - the important part is that overall argument for `ThinkingSphinx::Ports.call` be unique for the given app and environment.\n\nFor the extra curious, the path/environment and port pairings are saved to `~/.thinking_sphinx_ports.yml`.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/pat/thinking-sphinx-ports. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## Licence\n\nCopyright (c) 2016, ThinkingSphinx::Ports is developed and maintained by Pat Allan, and is released under the open MIT Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Fthinking-sphinx-ports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpat%2Fthinking-sphinx-ports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Fthinking-sphinx-ports/lists"}