oxen_account 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/app/assets/javascripts/oxen_account.js +3 -0
- data/app/assets/javascripts/pw_strength.js.coffee +24 -0
- data/app/assets/javascripts/zxcvbn.js +43 -0
- data/app/controllers/{accounts_controller.rb → accounts/base/accounts_controller.rb} +1 -1
- data/app/controllers/users/base/users_controller.rb +1 -1
- data/app/policies/account_policy.rb +8 -7
- data/app/policies/user_policy.rb +1 -0
- data/app/views/users/_account_user.html.haml +6 -0
- data/app/views/users/_account_users.html.haml +2 -0
- data/app/views/users/invitations/_new.html.haml +2 -1
- data/config/initializers/devise.rb +1 -1
- data/lib/oxen_account/version.rb +1 -1
- data/lib/oxen_account.rb +4 -1
- data/oxen_account-0.1.0.gem +0 -0
- data/oxen_account.gemspec +5 -5
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f2d02c73ebc1c1280973df846c607ff622e246
|
4
|
+
data.tar.gz: 0d4fa18c040d9d68962cb133b1438c538d013cbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dc5b2d17a9e6c50c9ef1f403d7158f72e6b162d9e67bb4d7854f8345a0c79b5b8f675fe6390d791d5f77c46697a356f536729078380530d79e3d08b80068f7c
|
7
|
+
data.tar.gz: d779b59292ef04fed0bc5283f9c73abeb50162b1e265f280c544dbe32b46ad43b443cf0a0ee2f98679603feba50578fa518415b6473f8d0a2874f5a74be6c0a7
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2
|
1
|
+
2.1.2
|
@@ -0,0 +1,24 @@
|
|
1
|
+
jQuery ->
|
2
|
+
|
3
|
+
displayHint = (strength, crack_time) ->
|
4
|
+
msg = 'Password is ' + strength + ' (time to break it: ' + crack_time + ')'
|
5
|
+
|
6
|
+
estimate_message = this.next('.estimate-message')
|
7
|
+
if estimate_message.length > 0
|
8
|
+
estimate_message.text msg
|
9
|
+
else
|
10
|
+
this.after '<span class="help-block estimate-message">' + msg + '</span>'
|
11
|
+
|
12
|
+
$('form').on 'keyup', '.estimate-password', ->
|
13
|
+
$this = $(this)
|
14
|
+
estimation = zxcvbn($this.val())
|
15
|
+
crack_time = estimation.crack_time_display
|
16
|
+
|
17
|
+
switch estimation.score
|
18
|
+
when 0 then displayHint.call($this, "very weak", crack_time)
|
19
|
+
when 1 then displayHint.call($this, "weak", crack_time)
|
20
|
+
when 2 then displayHint.call($this, "okay", crack_time)
|
21
|
+
when 3 then displayHint.call($this, "strong", crack_time)
|
22
|
+
when 4 then displayHint.call($this, "very strong", crack_time)
|
23
|
+
|
24
|
+
return
|