{"id":20513652,"url":"https://github.com/theopencms/voiceless","last_synced_at":"2026-04-21T04:31:59.930Z","repository":{"id":71919704,"uuid":"84660708","full_name":"TheOpenCMS/voiceless","owner":"TheOpenCMS","description":"This simple gem helps to keep system work if some part of the system is not included.","archived":false,"fork":false,"pushed_at":"2017-03-12T08:19:38.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T23:14:13.797Z","etag":null,"topics":["rails","rails5","try","voiceless"],"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/TheOpenCMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-03-11T15:42:16.000Z","updated_at":"2017-03-25T20:16:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b4363b5-345a-4b2c-b2b1-d0f8cdac278a","html_url":"https://github.com/TheOpenCMS/voiceless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheOpenCMS/voiceless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOpenCMS%2Fvoiceless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOpenCMS%2Fvoiceless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOpenCMS%2Fvoiceless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOpenCMS%2Fvoiceless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheOpenCMS","download_url":"https://codeload.github.com/TheOpenCMS/voiceless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheOpenCMS%2Fvoiceless/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32076898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"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":["rails","rails5","try","voiceless"],"created_at":"2024-11-15T21:12:24.145Z","updated_at":"2026-04-21T04:31:59.916Z","avatar_url":"https://github.com/TheOpenCMS.png","language":"Ruby","readme":"```ruby\nThis gem is a part of TheOpenCMS project. https://github.com/TheOpenCMS\n```\n\n## Voiceless\n\nThis simple gem helps to keep system work if some part of the system is not included.\n\nFor example, sometimes a common engine for a multiple projects may has an ECommerce module and sometimes doesn't. Common code base must be stable even the system can't provide some functionality in routes, controllers or models.\n\nThis gem wrap potentially dangerous code with a block, where we catch an exception and show to a developer just a notification message where we don't have some part of a code.\n\nIn fact `voiceless` method is just a method like method `try`, but for `include` directives.\n\n## How it works\n\nThere is the only method `voiceless`, and it works so:\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  voiceless { include ::TheOpenShop::Base }\nend\n\nclass Article \u003c ApplicationRecord\n  voiceless { include ::SimpleSort::Model }\n\n  private\n\n  def send_notifications\n    voiceless { NotificationMailer.deliver }\n  end\nend\n\nRails.application.routes.draw do\n  voiceless { include ::UserRoom::Routes }\nend\n```\n\nIn case of a problem `voiceless` shows a warning and code still works\n\n```ruby\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\nVOICELESS ALERT: uninitialized constant UserRoom::Routes\n/config/routes.rb:14\n\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\n```\n\n## How to install\n\n```ruby\ngem 'voiceless', github: 'TheOpenCMS/voiceless'\n```\n\n======\n\n## Voiceless (RU)\n\nЭтот простой гем помогает поддерживать систему работоспособной даже если какая-то часть системы не подключена.\n\nНапример, иногда общий движок для нескольких проектов может иметь модуль Электронной коммерции, а иногда нет. Общий код должен быть стабилен даже если система не может обеспечить некоторую функциональность в роутинге, контроллерах и моделях.\n\n### Как это работает\n\nПо факту метод `voiceless` это метод похожий на метод `try`, но для `include` директив.\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n voiceless { include ::TheOpenShop::Base }\nend\n\nclass Article \u003c ApplicationRecord\n  voiceless { include ::SimpleSort::Model }\n\n  private\n\n  def send_notifications\n    voiceless { NotificationMailer.deliver }\n  end\nend\n\nRails.application.routes.draw do\n voiceless { include ::UserRoom::Routes }\nend\n```\n\nВ случае проблем `voiceless` показывает предупреждение, а код продолжает работать\n\n```ruby\n\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\nVOICELESS ALERT: uninitialized constant UserRoom::Routes\n/config/routes.rb:14\n\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\n```\n## Как установить\n\n```\ngem 'voiceless', github: 'TheOpenCMS/voiceless'\n```\n\n## The MIT License\n\nhttps://opensource.org/licenses/MIT\n\nThe MIT License (MIT)\n\nCopyright (c) 2016-[Current Year] Ilya N. Zykin (https://github.com/the-teacher)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopencms%2Fvoiceless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheopencms%2Fvoiceless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopencms%2Fvoiceless/lists"}