{"id":18708017,"url":"https://github.com/discourse/mini_suffix","last_synced_at":"2025-04-12T10:33:39.143Z","repository":{"id":27091494,"uuid":"112311113","full_name":"discourse/mini_suffix","owner":"discourse","description":"FFI wrapper for libpsl","archived":false,"fork":false,"pushed_at":"2021-12-01T15:14:22.000Z","size":305,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":22,"default_branch":"main","last_synced_at":"2024-05-09T09:26:21.887Z","etag":null,"topics":["rubygem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"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/discourse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-11-28T08:59:35.000Z","updated_at":"2024-01-19T12:57:30.000Z","dependencies_parsed_at":"2022-07-27T09:02:57.982Z","dependency_job_id":null,"html_url":"https://github.com/discourse/mini_suffix","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Fmini_suffix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Fmini_suffix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Fmini_suffix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Fmini_suffix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discourse","download_url":"https://codeload.github.com/discourse/mini_suffix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248553541,"owners_count":21123470,"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":["rubygem"],"created_at":"2024-11-07T12:21:00.563Z","updated_at":"2025-04-12T10:33:38.835Z","avatar_url":"https://github.com/discourse.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniSuffix\n\n## Installation\n\n### Debian\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mini_suffix'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mini_suffix\n\n## Usage\n\n```\nrequire 'mini_suffix'\n\nMiniSuffix.domain(\"meta.discourse.org\")\n# =\u003e \"discourse.org\"\n\nMiniSuffix.domain(\"www.careers.gov.sg\")\n# =\u003e \"careers.gov.sg\"\n```\n\n## Benchmark\n\n```\n# benchmark/bench.rb\n\nPublicSuffix.domain total allocated memsize: 6574255\nPublicSuffix.domain total retained memsize: 1133266\nMiniSuffix.domain total allocated memsize: 8000\nMiniSuffix.domain total retained memsize: 0\n\nWarming up --------------------------------------\n PublicSuffix.domain     4.503k i/100ms\n   MiniSuffix.domain    77.107k i/100ms\nCalculating -------------------------------------\n PublicSuffix.domain     47.521k (± 2.2%) i/s -    238.659k in   5.024541s\n   MiniSuffix.domain    875.595k (± 3.8%) i/s -      4.395M in   5.027237s\n\nComparison:\n   MiniSuffix.domain:   875594.7 i/s\n PublicSuffix.domain:    47521.2 i/s - 18.43x  slower\n```\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\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Updating libpsl\n\nLibpsl binaries are bundled with the gem. The current version is checked out as a submodule in `./libpsl/`. To update, checkout a later commit\nin the submodule (ideally matching an upstream release tag). You will then need to rebuild the binaries for all architectures. This requires running `./build-libpsl.sh` in each environment. Depending on your setup, you may be able to accomplish that via virtual machines and/or Docker.\n\nCheck the comments in `./build-libpsl.sh` for more information.\n\nThe submodule bump and updated binaries should be checked in to the repository.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/discourse/mini_suffix.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscourse%2Fmini_suffix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscourse%2Fmini_suffix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscourse%2Fmini_suffix/lists"}