{"id":20314849,"url":"https://github.com/solar05/dockcheck","last_synced_at":"2026-06-11T07:31:01.792Z","repository":{"id":107158279,"uuid":"376653649","full_name":"solar05/dockcheck","owner":"solar05","description":"Simple gem, that validates document check sum.","archived":false,"fork":false,"pushed_at":"2022-01-02T00:07:09.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-04T08:45:45.927Z","etag":null,"topics":["library","ruby","validator"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/dockcheck","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/solar05.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-13T22:42:32.000Z","updated_at":"2022-01-02T00:07:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"efdcfce3-f021-4e6d-a57e-ca4594436532","html_url":"https://github.com/solar05/dockcheck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solar05/dockcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fdockcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fdockcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fdockcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fdockcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solar05","download_url":"https://codeload.github.com/solar05/dockcheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fdockcheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34188272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["library","ruby","validator"],"created_at":"2024-11-14T18:16:57.867Z","updated_at":"2026-06-11T07:31:01.775Z","avatar_url":"https://github.com/solar05.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockcheck [![Gem Version](https://badge.fury.io/rb/dockcheck.svg)](https://badge.fury.io/rb/dockcheck) [![Tests](https://github.com/solar05/dockcheck/actions/workflows/ruby.yml/badge.svg)](https://github.com/solar05/dockcheck/actions/workflows/ruby.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/78eabd3ae6746960f318/maintainability)](https://codeclimate.com/github/solar05/dockcheck/maintainability) [![codecov](https://codecov.io/gh/solar05/dockcheck/branch/main/graph/badge.svg?token=1N7KZCN75K)](https://codecov.io/gh/solar05/dockcheck)\nSimple gem, that validates document check sum.\n\n## Install\n`gem install dockcheck`\nor using Gemfile `gem 'dockcheck', '~\u003e 2.0'`\n\n### Validators list\n- INN\n- BIK\n- KPP\n- SNILS\n- OGRN\n- OGRNIP\n\n### Validation structure\nFor input use Hashmap with following stucture:\n- `type    - type of document, required, symbol or string`\n- `content - document numbers, required, string`\n- `extra   - extra data of document, optional, string`\n\nOutput structure contains input data and some additional fields:\n- `error   - validation error`\n- `correct - validation result`\n\n#### Examples\n```Ruby\nchecker = DockCheck.new()  \n\nchecker.check({type: :inn, content: \"7743013901\"})\n{type: :inn, content: \"7743013901\", correct: true, error: \"\"}\n\nchecker.check({type: :inn, content: \"8800555\"})\n{type: :inn, content: \"8800555\", correct: false, error: 'Incorrect inn numbers count!'}\n\nchecker.check({type: :snils, content: \"12345678901\"})\n{type: :snils, content: \"12345678901\", correct: false, error: \"\"}\n\nchecker.list_checkers\n[:inn, :snils, :bik, :kpp, :ogrnip, :ogrn]\n\nchecker.check_many([{type: :inn, content: \"7743013901\"}, {type: :bik, content: \"123456?!@\"}])\n[{type: :inn, content: \"7743013901\", correct: true, error: \"\"}, {type: :bik, content: \"123456?!@\", correct: false, error: \"\"}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolar05%2Fdockcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolar05%2Fdockcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolar05%2Fdockcheck/lists"}