{"id":15064607,"url":"https://github.com/cdeliens/tough","last_synced_at":"2026-01-02T06:58:20.232Z","repository":{"id":59157844,"uuid":"83183272","full_name":"cdeliens/tough","owner":"cdeliens","description":"Password Validator Gem for RoR Applications.","archived":false,"fork":false,"pushed_at":"2017-02-27T05:43:50.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T04:00:06.017Z","etag":null,"topics":["gem","password-validator","rails","ruby","validator","zxcvbn"],"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/cdeliens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-26T04:43:43.000Z","updated_at":"2023-04-14T06:19:21.000Z","dependencies_parsed_at":"2022-09-13T20:04:25.929Z","dependency_job_id":null,"html_url":"https://github.com/cdeliens/tough","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeliens%2Ftough","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeliens%2Ftough/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeliens%2Ftough/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeliens%2Ftough/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdeliens","download_url":"https://codeload.github.com/cdeliens/tough/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790999,"owners_count":20348385,"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":["gem","password-validator","rails","ruby","validator","zxcvbn"],"created_at":"2024-09-25T00:22:26.056Z","updated_at":"2026-01-02T06:58:20.152Z","avatar_url":"https://github.com/cdeliens.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/cdeliens/tough.svg?branch=master)](https://travis-ci.org/cdeliens/tough)\n[![Code Climate](https://codeclimate.com/github/cdeliens/tough/badges/gpa.svg)](https://codeclimate.com/github/cdeliens/tough)\n[![Test Coverage](https://codeclimate.com/github/cdeliens/tough/badges/coverage.svg)](https://codeclimate.com/github/cdeliens/tough/coverage)\n[![Issue Count](https://codeclimate.com/github/cdeliens/tough/badges/issue_count.svg)](https://codeclimate.com/github/cdeliens/tough)\n\n# Tough\n\nBe sure to have TOUGH Passwords in your Rails application with this gem. Based on ZXCVBN library to validate passwords strength, also some normal validators for special characters, capital letters and lowercase letters, minimum characters length.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tough'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tough\n\n## Usage\n## config/initializers/tough.rb\n```ruby\n Tough.configuration do |config|\n  config.zxcvbn_minimum_score_to_pass = 3\n  config.zxcvbn_error_message = \"is too easy to guess\"\n  config.special_characters_error_message = \"must contain special characters\"\n  config.minimum_characters = 8\n  config.minimum_characters_error_message = \"must be a minimum of #{Tough.minimum_characters} characters long\"\n  config.capitals_lowercase_error_message = \"must have lowercase and uppercase letters\"\n end\n```\n## user.rb\n```ruby\n class User \u003c ActiveRecord::Base\n   validates_by_zxcvbn_metric :password\n   validates_capitals_and_lowercase_for :password\n   validates_minimum_characters_for :password\n   validates_special_characters_for :password\n end\n```\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tough. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeliens%2Ftough","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdeliens%2Ftough","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeliens%2Ftough/lists"}