{"id":31720825,"url":"https://github.com/oieioi/ketsuban","last_synced_at":"2025-10-09T03:19:35.186Z","repository":{"id":56880021,"uuid":"167563928","full_name":"oieioi/ketsuban","owner":"oieioi","description":"🍀 Skip unlucky numbers for ActiveRecord surrogate key","archived":false,"fork":false,"pushed_at":"2019-12-03T07:39:30.000Z","size":54,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T22:36:10.935Z","etag":null,"topics":["activerecord","rubygem"],"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/oieioi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-25T14:55:21.000Z","updated_at":"2025-03-08T16:13:05.000Z","dependencies_parsed_at":"2022-08-20T22:31:23.013Z","dependency_job_id":null,"html_url":"https://github.com/oieioi/ketsuban","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/oieioi/ketsuban","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oieioi%2Fketsuban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oieioi%2Fketsuban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oieioi%2Fketsuban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oieioi%2Fketsuban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oieioi","download_url":"https://codeload.github.com/oieioi/ketsuban/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oieioi%2Fketsuban/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000713,"owners_count":26082911,"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-10-09T02:00:07.460Z","response_time":59,"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":["activerecord","rubygem"],"created_at":"2025-10-09T03:19:08.515Z","updated_at":"2025-10-09T03:19:35.182Z","avatar_url":"https://github.com/oieioi.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![https://badge.fury.io/rb/ketsuban.svg](https://badge.fury.io/rb/ketsuban.svg)](https://rubygems.org/gems/ketsuban)\n[![Build Status](https://travis-ci.org/oieioi/ketsuban.svg?branch=master)](https://travis-ci.org/oieioi/ketsuban)\n[![Coverage Status](https://coveralls.io/repos/github/oieioi/ketsuban/badge.svg?branch=master)](https://coveralls.io/github/oieioi/ketsuban?branch=master)\n\n# ketsuban\n\nSkip unlucky numbers for ActiveRecord surrogate key `id`.\n\n## Usage\n\nGemfile:\n\n```ruby\ngem 'ketsuban'\n```\n\nSome Model:\n\n```ruby\nclass User \u003c ApplicationRecord\n  include Ketsuban\n  unlucky_numbers [4, 5]  \nend\n\n5.times.map { User.create.id }\n# =\u003e [1, 2, 3, 6, 7]\n```\n\nor\n\n```ruby\nclass User \u003c ApplicationRecord\n  include Ketsuban\n  unlucky_numbers -\u003e(next_id) { next_id.odd? }\nend\n\n5.times.map { User.create.id }\n# =\u003e [2, 4, 6, 8, 10]\n```\n\n`unlucky_numbers` is aliased `ketsuban`\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%2Foieioi%2Fketsuban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foieioi%2Fketsuban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foieioi%2Fketsuban/lists"}