zxcvbn 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +1 -1
- data/README.md +10 -2
- data/lib/zxcvbn.rb +10 -0
- data/lib/zxcvbn/version.rb +1 -1
- data/zxcvbn.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed77be628881ddd6bd6df0f7a60935e193db7cf91f5c928319eed9ac24295bf
|
4
|
+
data.tar.gz: 20906d11011e8ab3f95dcc9f20cae21b6945999a979b11c452b23f02726abda6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ac81d9c47f5f4a006b7e5e071f0f2fd119d0f9f721d28d7725ab07f8eafa4478f727652b7e51a87d82d5022e761550cecc6f83ff2f38b8cd0171d51061f97b
|
7
|
+
data.tar.gz: ec59a970bc9037714b93c3d73738b995afa224c25cdca4dd8309e74f7e11df58fe7f618f72805ea004f23ac3387a8f98fa2548d9d2c00419231f7e0e07307db7
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
## [0.1.6] - 2021-05-28
|
2
|
+
- Added test methods for compatibility with zxcvbn-js and zxcvbn-ruby.
|
3
|
+
|
4
|
+
## [0.1.5] - 2021-05-27
|
5
|
+
- Fix classification of scoring causing differences between js and ruby.
|
6
|
+
|
1
7
|
## [0.1.4] - 2021-05-16
|
2
8
|
|
3
|
-
- Bunch of fixes,
|
9
|
+
- Bunch of fixes, all example passwords included have same result as js version.
|
4
10
|
- consistent code style applied.
|
5
11
|
|
6
12
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
# Zxcvbn
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
[](https://badge.fury.io/rb/zxcvbn)
|
4
|
+
[](https://travis-ci.com/formigarafa/zxcvbn-rb)
|
5
|
+
|
6
|
+
Ruby port of Dropbox's [zxcvbn.js][zxcvbn.js] JavaScript library running completely in Ruby (no need to load execjs or libv8).
|
7
|
+
|
8
|
+
The intention is to provide an option 100% Ruby solution with all the same features and same results (or as close to the original JS function as possible).
|
5
9
|
|
6
10
|
## Installation
|
7
11
|
|
@@ -67,6 +71,10 @@ Zxcvbn.zxcvbn("password")
|
|
67
71
|
}
|
68
72
|
```
|
69
73
|
|
74
|
+
### Compatible with `zxcvbn-js` and `zxcvbn-ruby`
|
75
|
+
|
76
|
+
This gem include a compatible interface so it can be used as a drop-in substitution for `zxcvbn-js` or `zxcvbn-ruby`. You can just call `Zxcvbn.test` or use `Zxcvbn::Tester.new` the same way as you would if you were using `zxcvbn-js` or `zxcvbn-ruby`.
|
77
|
+
|
70
78
|
## Development
|
71
79
|
|
72
80
|
After 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.
|
data/lib/zxcvbn.rb
CHANGED
@@ -29,4 +29,14 @@ module Zxcvbn
|
|
29
29
|
result["feedback"] = Feedback.get_feedback(result["score"], result["sequence"])
|
30
30
|
result
|
31
31
|
end
|
32
|
+
|
33
|
+
def self.test(password, user_inputs = [])
|
34
|
+
OpenStruct.new(Zxcvbn.zxcvbn(password, user_inputs))
|
35
|
+
end
|
36
|
+
|
37
|
+
class Tester
|
38
|
+
def test(password, user_inputs = [])
|
39
|
+
Zxcvbn.test(password, user_inputs)
|
40
|
+
end
|
41
|
+
end
|
32
42
|
end
|
data/lib/zxcvbn/version.rb
CHANGED
data/zxcvbn.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["formigarafa@gmail.com"]
|
10
10
|
|
11
11
|
spec.summary = ""
|
12
|
-
spec.description = "Ruby port of Dropbox's zxcvbn.js"
|
12
|
+
spec.description = "100% native Ruby 100% compatible port of Dropbox's zxcvbn.js"
|
13
13
|
spec.homepage = "http://github.com/formigarafa/zxcvbn-rb"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zxcvbn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafael Santos
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Ruby port of Dropbox's zxcvbn.js
|
13
|
+
description: 100% native Ruby 100% compatible port of Dropbox's zxcvbn.js
|
14
14
|
email:
|
15
15
|
- formigarafa@gmail.com
|
16
16
|
executables: []
|