Sha256: 9b268fef9045cb12a161f9065e8d18f749f630013f7cc3eb789e50e6934a344e

Contents?: true

Size: 618 Bytes

Versions: 8

Compression:

Stored size: 618 Bytes

Contents

require "devise_zxcvbn/version"
require "devise"
require "zxcvbn"

module Devise

  # The minimun score for a password.
  mattr_reader :min_password_score
  @@min_password_score = 4

  def self.min_password_score=(score)
    raise "The min_password_score must be an integer and between 0..4" unless (0..4).include?(score)
    @@min_password_score = score
  end

  def self.zxcvbn_tester
    @@zxcvbn_tester ||= ::Zxcvbn::Tester.new
  end
end

# Load default I18n
#
I18n.load_path.unshift File.join(File.dirname(__FILE__), *%w[devise_zxcvbn locales en.yml])

Devise.add_module :zxcvbnable, model: "devise_zxcvbn/model"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
devise_zxcvbn-6.0.0 lib/devise_zxcvbn.rb
devise_zxcvbn-5.2.0 lib/devise_zxcvbn.rb
devise_zxcvbn-5.1.0 lib/devise_zxcvbn.rb
devise_zxcvbn-5.0.0 lib/devise_zxcvbn.rb
devise_zxcvbn-4.4.1 lib/devise_zxcvbn.rb
devise_zxcvbn-2.1.2 lib/devise_zxcvbn.rb
devise_zxcvbn-2.1.1 lib/devise_zxcvbn.rb
devise_zxcvbn-2.1.0 lib/devise_zxcvbn.rb