Passroids for Rails.
Unfortunately, Passroids is not maintained any more. This gem provides jquery.passroids.js
and the ruby implementation. jquery.passroids.js
is latest version, probably.
jquery.passroids.js
provided by this gem is depends on jquery.textchange.js
. You can install jquery.textchange.js
by installing jquery-textchange-rails.
Add this line to your application's Gemfile:
gem 'jquery-textchange-rails', git: 'https://github.com/inventit/jquery-textchange-rails.git'
gem 'jquery-passroids-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jquery-passroids-rails
$('form').passroids({
main: '.password', // password field
verify: '.password_confirm', // password confirm field.
button: '.password_update_execute', // submit button
minimum: 1 // weak (0 = no requirement/weak, 1 = Medium, 2 = Strong, 3 = Excellent).
});
Passroids.strength('hoge') # => "Weak"
No tests.
- Install all dependencies with
bundle install
. - Run
bundle exec rspec
.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jquery-passroids-rails.
The gem is available as open source under the terms of the MIT License.