{"id":15405694,"url":"https://github.com/zverok/did_you","last_synced_at":"2026-03-04T23:02:09.822Z","repository":{"id":62557147,"uuid":"103187274","full_name":"zverok/did_you","owner":"zverok","description":"Ruby version-agnostic wrapper for did_you_mean gem","archived":false,"fork":false,"pushed_at":"2017-09-14T06:53:33.000Z","size":6,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T08:54:58.544Z","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/zverok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-11T20:55:10.000Z","updated_at":"2020-08-12T15:33:18.000Z","dependencies_parsed_at":"2022-11-03T06:15:38.667Z","dependency_job_id":null,"html_url":"https://github.com/zverok/did_you","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zverok/did_you","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdid_you","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdid_you/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdid_you/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdid_you/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zverok","download_url":"https://codeload.github.com/zverok/did_you/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zverok%2Fdid_you/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30098092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T22:49:54.894Z","status":"ssl_error","status_checked_at":"2026-03-04T22:49:48.883Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-01T16:18:16.875Z","updated_at":"2026-03-04T23:02:09.769Z","avatar_url":"https://github.com/zverok.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `DidYou::Spell` -- small wrapper around `did_you_mean`\n\n[![Gem Version](https://badge.fury.io/rb/did_you.svg)](http://badge.fury.io/rb/did_you)\n[![Build Status](https://travis-ci.org/zverok/did_you.svg?branch=master)](https://travis-ci.org/zverok/did_you)\n\nHave you seen this thing in new Ruby (2.3+)?\n\n```ruby\n(1..10).cover(2)\n# NoMethodError: undefined method `cover' for 1..10:Range\n# Did you mean?  cover?  \u003c---- This\n```\n\nIf you wanted to provide same functionality for your code (\"Lexem `x` is not recognized. Did you\nmean `y`?\") you can use [did_you_mean](https://github.com/yuki24/did_you_mean) gem bundled with\nyour Ruby. But it is a bit hard: gem's dictionary lookup interface is a bit hard to follow, and\nmoreover, it changes dramatically from Ruby 2.3 to Ruby 2.4, and standalone gem version (available\nfor Ruby 2.1-2.2) has one more different interface.\n\n`did_you` solves this problem by providing simple, Ruby version-agnostic inteface to `did_you_mean`\ngem.\n\n**Important:** This library's **sole** purpose is providing simple, consistent interface between\ndifferent `did_you_mean` versions. If your only target version is Ruby 2.4, you can just go with\n`did_you_mean`'s current way:\n\n```ruby\nDidYouMean::SpellChecker\n  .new(dictionary: %w[param return tag abstract])\n  .correct('params')\n```\n\n## Usage\n\nInstall it as a `gem did_you` or add `gem 'did_you'` to your `Gemfile`. (On Ruby \u003c 2.3 it will install\nold `did_you_mean`, on newer ones has no additional dependencies.)\n\nThen just...\n\n```ruby\n# First parameter is word you want to check, second -- known words in the context\nDidYou::Spell.check('params', %w[param return tag abstract]) # =\u003e [\"param\"]\n```\n\nThat's it. ¯\\\\\\_(ツ)_/¯\n\n## Author\n\n[Victor Shepelev](https://github.com/zverok)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzverok%2Fdid_you","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzverok%2Fdid_you","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzverok%2Fdid_you/lists"}