sequel_secure_password 0.2.8 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -6
- data/lib/sequel_secure_password/version.rb +1 -1
- data/lib/sequel_secure_password.rb +1 -2
- data/sequel_secure_password.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44647915c05f69c4299469c020fb5b577f83597c
|
4
|
+
data.tar.gz: 2efcc0094cd07863ec10baa92a4847c8a0ade25c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc2f813eae387976c8eb19040f514689d52b594618f4f8c54d91a29f37a39a36bc6994762f4708cdc321f4031fced216c90cf96c27c694a10ae0937cd06ce198
|
7
|
+
data.tar.gz: 133eb36ec94d8a5b5e5c25c7a4cc76cfa5eab58490e76673f59a8b0bc90803bd3bb83426ca9c7cc538be224d04b029b0439b07ccfa2db7763b826aeacda454d9
|
data/README.md
CHANGED
@@ -39,6 +39,12 @@ Example model:
|
|
39
39
|
plugin :secure_password, cost: 12
|
40
40
|
end
|
41
41
|
|
42
|
+
# include_validations option can be used to disable default password
|
43
|
+
# presence and confirmation
|
44
|
+
class UserWithoutValidations < Sequel::Model
|
45
|
+
plugin :secure_password, include_validations: false
|
46
|
+
end
|
47
|
+
|
42
48
|
user = User.new
|
43
49
|
user.password = "foo"
|
44
50
|
user.password_confirmation = "bar"
|
@@ -52,12 +58,13 @@ Example model:
|
|
52
58
|
|
53
59
|
## Contributing
|
54
60
|
|
55
|
-
1.
|
56
|
-
2.
|
57
|
-
3.
|
58
|
-
|
59
|
-
5. Create new Pull Request
|
61
|
+
1. Open an issue
|
62
|
+
2. Discuss proposed change
|
63
|
+
3. Once we both agree on the change I'll implement it or if you want it really
|
64
|
+
badly, fork the project and create a pull request.
|
60
65
|
|
61
66
|
## Thanks
|
62
67
|
|
63
|
-
Thanks to [@send](https
|
68
|
+
Thanks to [@send](https://github.com/send) for implementing the `:cost` option
|
69
|
+
and to [@badosu](https://github.com/badosu) for motivating me to add
|
70
|
+
`:include_validations` option.
|
@@ -47,8 +47,7 @@ module Sequel
|
|
47
47
|
super
|
48
48
|
|
49
49
|
if model.include_validations
|
50
|
-
errors.add :password, 'is not present'
|
51
|
-
errors.add :password, 'has no confirmation' if SecurePassword.blank_string? password_confirmation
|
50
|
+
errors.add :password, 'is not present' if SecurePassword.blank_string?(password_digest)
|
52
51
|
errors.add :password, 'doesn\'t match confirmation' if password != password_confirmation
|
53
52
|
end
|
54
53
|
end
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = "sequel_secure_password"
|
8
8
|
gem.version = SequelSecurePassword::VERSION
|
9
9
|
gem.authors = ["Mateusz Lenik"]
|
10
|
-
gem.email = ["
|
10
|
+
gem.email = ["gems@mlen.pl"]
|
11
11
|
gem.description = %q{Plugin adds authentication methods to Sequel models using BCrypt library.}
|
12
12
|
gem.summary = <<EOF
|
13
13
|
Plugin adds BCrypt authentication and password hashing to Sequel models.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_secure_password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Lenik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
version: 1.3.0
|
95
95
|
description: Plugin adds authentication methods to Sequel models using BCrypt library.
|
96
96
|
email:
|
97
|
-
-
|
97
|
+
- gems@mlen.pl
|
98
98
|
executables: []
|
99
99
|
extensions: []
|
100
100
|
extra_rdoc_files: []
|