{"id":15405261,"url":"https://github.com/fnando/haikunate","last_synced_at":"2025-06-20T11:07:10.132Z","repository":{"id":43046461,"uuid":"239278519","full_name":"fnando/haikunate","owner":"fnando","description":"Generate Heroku-like memorable random names like adorable-ox-1234.","archived":false,"fork":false,"pushed_at":"2023-09-04T19:41:19.000Z","size":36,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-18T16:17:19.344Z","etag":null,"topics":["haiku","haikunate","haikunator","ruby"],"latest_commit_sha":null,"homepage":"","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/fnando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["fnando"],"custom":["https://paypal.me/nandovieira/🍕"]}},"created_at":"2020-02-09T09:35:00.000Z","updated_at":"2024-05-25T21:23:17.000Z","dependencies_parsed_at":"2024-10-01T16:15:47.335Z","dependency_job_id":"bfe42dde-c1a2-408a-8965-6450a3c506d5","html_url":"https://github.com/fnando/haikunate","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.23076923076923073","last_synced_commit":"7c532d494fb1cd0a7339536781f9d83c3c769b93"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fnando/haikunate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fhaikunate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fhaikunate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fhaikunate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fhaikunate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnando","download_url":"https://codeload.github.com/fnando/haikunate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fhaikunate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260831430,"owners_count":23069466,"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":["haiku","haikunate","haikunator","ruby"],"created_at":"2024-10-01T16:15:44.868Z","updated_at":"2025-06-20T11:07:05.073Z","avatar_url":"https://github.com/fnando.png","language":"Ruby","funding_links":["https://github.com/sponsors/fnando","https://paypal.me/nandovieira/🍕"],"categories":[],"sub_categories":[],"readme":"# haikunate\n\nGenerate Heroku-like memorable random names like `adorable-ox-1234`.\n\n[![Tests](https://github.com/fnando/haikunate/workflows/ruby-tests/badge.svg)](https://github.com/fnando/haikunate)\n[![Gem](https://img.shields.io/gem/v/haikunate.svg)](https://rubygems.org/gems/haikunate)\n[![Gem](https://img.shields.io/gem/dt/haikunate.svg)](https://rubygems.org/gems/haikunate)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"haikunate\"\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install haikunate\n\n## Usage\n\nYou generate random haiku names by calling `Haikunate.call` (or its alias\n`Haiku.call`).\n\n```ruby\nHaiku.call\n#=\u003e satisfied-eagle-7977\n```\n\nYou can change the joiner string by provider the option `joiner`.\n\n```ruby\nHaiku.call(joiner: \".\")\n#=\u003e passionate.alpaca.7619\n```\n\nA haiku composed by `adjective-noun-variant`, where variant is a random number\nwithin `1000..9999` range. You can override the range by setting\n`Haiku.default_range`.\n\n```ruby\nHaiku.default_range = 10_000..99_999\n#=\u003e abundant-panda-57702\n```\n\nAlternatively, you can provide a `variant` option, which can be any object that\nresponds to `.call()`.\n\n```ruby\nrequire \"securerandom\"\n\nHaiku.call(variant: -\u003e { SecureRandom.alphanumeric(5).downcase })\n#=\u003e tidy-skunk-s8ln0\n```\n\nTo override the dictionary list, use `Haiku.adjectives=(list)` and\n`Haiku.nouns=(list)`.\n\n```ruby\nHaiku.adjectives = %w[awful terrible crazy]\nHaiku.nouns = %w[lawyer judge politician]\n\nHaiku.call\n#=\u003e terrible-politician-8116\n```\n\nIf you're planning to use a haiku as some unique value on your database, you can\nuse `Haiku.next(options, \u0026block)`; a new haiku will be generated until\n`block.call(haiku)` returns `false`. For instance, this is how you'd use it with\nActiveRecord:\n\n```ruby\nsite = Site.new\nsite.slug = Haiku.next {|slug| Site.where(slug: slug).exists? }\nsite.save!\n```\n\nThat can be a problem for databases with lots and lots of records. If that's the\ncase, you can then use a more random variant like 6 random alphanumeric\ncharacters.\n\nYou can override the default variant generator by setting\n`Haiku.default_variant=(new_variant)`.\n\n```ruby\nHaiku.default_variant = -\u003e { SecureRandom.alphanumeric(6).downcase }\n```\n\n## Maintainer\n\n- [Nando Vieira](https://github.com/fnando)\n\n## Contributors\n\n- https://github.com/fnando/haikunate/contributors\n\n## Contributing\n\nFor more details about how to contribute, please read\nhttps://github.com/fnando/haikunate/blob/main/CONTRIBUTING.md.\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT). A copy of the license can be\nfound at https://github.com/fnando/haikunate/blob/main/LICENSE.md.\n\n## Code of Conduct\n\nEveryone interacting in the haikunate project's codebases, issue trackers, chat\nrooms and mailing lists is expected to follow the\n[code of conduct](https://github.com/fnando/haikunate/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fhaikunate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnando%2Fhaikunate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fhaikunate/lists"}