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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0606b0500d90c609f19b7483ef378c19d6d924af
4
- data.tar.gz: f96d44063edfaa879487eae5c73b96f119fed836
3
+ metadata.gz: 44647915c05f69c4299469c020fb5b577f83597c
4
+ data.tar.gz: 2efcc0094cd07863ec10baa92a4847c8a0ade25c
5
5
  SHA512:
6
- metadata.gz: a627b52ff04198f2a0bb4f3602b203c262a77dfe7079e0e713b04d1f4d7674303dc6cd9f7fd815623393a676c372d3ec2d250f851a723fedeb2563f2bc320f8d
7
- data.tar.gz: 090095f000cf4a50e15ea3a4e2320a45dc5984328e63e40c3cac5616e038940cbeb2fe42ab2590a6dfd907cd7184072ebe428806a64ee6ab99d8265e0e67d9a5
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. Fork it
56
- 2. Create your feature branch (`git checkout -b my-new-feature`)
57
- 3. Commit your changes (`git commit -am 'Add some feature'`)
58
- 4. Push to the branch (`git push origin my-new-feature`)
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//:github.com/send) for implementing the `:cost` option.
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.
@@ -1,3 +1,3 @@
1
1
  module SequelSecurePassword
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.10"
3
3
  end
@@ -47,8 +47,7 @@ module Sequel
47
47
  super
48
48
 
49
49
  if model.include_validations
50
- errors.add :password, 'is not present' if SecurePassword.blank_string? password_digest
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 = ["mt.lenik@gmail.com"]
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.8
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-08-12 00:00:00.000000000 Z
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
- - mt.lenik@gmail.com
97
+ - gems@mlen.pl
98
98
  executables: []
99
99
  extensions: []
100
100
  extra_rdoc_files: []