password_strength 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +97 -0
- data/lib/password_strength.js +194 -0
- data/lib/password_strength.rb +17 -0
- data/lib/password_strength/active_record.rb +8 -0
- data/lib/password_strength/active_record/ar2.rb +34 -0
- data/lib/password_strength/active_record/ar3.rb +40 -0
- data/lib/password_strength/base.rb +153 -0
- data/lib/password_strength/version.rb +8 -0
- data/test/active_record_test.rb +48 -0
- data/test/jsunittest/jsunittest.js +1017 -0
- data/test/jsunittest/unittest.css +54 -0
- data/test/password_strength_test.html +50 -0
- data/test/password_strength_test.js +239 -0
- data/test/password_strength_test.rb +192 -0
- data/test/schema.rb +8 -0
- data/test/test_helper.rb +12 -0
- data/test/user.rb +1 -0
- metadata +86 -0
data/test/schema.rb
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "test/unit"
|
5
|
+
require "ostruct"
|
6
|
+
require "active_record"
|
7
|
+
|
8
|
+
Rails = OpenStruct.new(:version => ActiveRecord::VERSION::STRING)
|
9
|
+
require "password_strength"
|
10
|
+
|
11
|
+
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
|
12
|
+
load "schema.rb"
|
data/test/user.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
class User < ActiveRecord::Base; end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: password_strength
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nando Vieira
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-03-05 00:00:00 -03:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: |
|
17
|
+
Validates the strength of a password according to several rules:
|
18
|
+
|
19
|
+
* size
|
20
|
+
* 3+ numbers
|
21
|
+
* 2+ special characters
|
22
|
+
* uppercased and downcased letters
|
23
|
+
* combination of numbers, letters and symbols
|
24
|
+
* password contains username
|
25
|
+
* sequences (123, abc, aaa)
|
26
|
+
|
27
|
+
email: fnando.vieira@gmail.com
|
28
|
+
executables: []
|
29
|
+
|
30
|
+
extensions: []
|
31
|
+
|
32
|
+
extra_rdoc_files:
|
33
|
+
- README.rdoc
|
34
|
+
files:
|
35
|
+
- CHANGELOG.rdoc
|
36
|
+
- README.rdoc
|
37
|
+
- lib/password_strength.js
|
38
|
+
- lib/password_strength.rb
|
39
|
+
- lib/password_strength/active_record.rb
|
40
|
+
- lib/password_strength/active_record/ar2.rb
|
41
|
+
- lib/password_strength/active_record/ar3.rb
|
42
|
+
- lib/password_strength/base.rb
|
43
|
+
- lib/password_strength/version.rb
|
44
|
+
- test/active_record_test.rb
|
45
|
+
- test/jsunittest/jsunittest.js
|
46
|
+
- test/jsunittest/unittest.css
|
47
|
+
- test/password_strength_test.html
|
48
|
+
- test/password_strength_test.js
|
49
|
+
- test/password_strength_test.rb
|
50
|
+
- test/schema.rb
|
51
|
+
- test/test_helper.rb
|
52
|
+
- test/user.rb
|
53
|
+
has_rdoc: true
|
54
|
+
homepage: http://github.com/fnando/password_strength
|
55
|
+
licenses: []
|
56
|
+
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options:
|
59
|
+
- --charset=UTF-8
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "0"
|
67
|
+
version:
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: "0"
|
73
|
+
version:
|
74
|
+
requirements: []
|
75
|
+
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 1.3.5
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Check password strength against several rules. Includes ActiveRecord support.
|
81
|
+
test_files:
|
82
|
+
- test/active_record_test.rb
|
83
|
+
- test/password_strength_test.rb
|
84
|
+
- test/schema.rb
|
85
|
+
- test/test_helper.rb
|
86
|
+
- test/user.rb
|