sequel_password 0.2.1 → 0.2.2
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 +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +26 -38
- data/.travis.yml +6 -4
- data/lib/sequel_password.rb +12 -14
- data/lib/sequel_password/hashers.rb +14 -14
- data/sequel_password.gemspec +15 -15
- data/spec/{sequel_password_spec.rb → sequel/plugins/password_spec.rb} +17 -17
- data/spec/spec_helper.rb +24 -36
- metadata +60 -28
- data/Gemfile.lock +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 660c58e6cdefd391b032cccf40bca3903a6344ba11f348eb43ab65b4e1d8d16a
|
4
|
+
data.tar.gz: 7cb76d99f23d70e06a6bc5aa181bad06c19abd37dd885ea7b0b216266d827ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb65bafa030cc25f28fd547e13552ad01e1cf3797cf89c32cea129d5aa1836ac0d1820d8e497f1d2846599dcc7c123e9b2ef11eef6b5245a20239ec4c6c62328
|
7
|
+
data.tar.gz: 1d58d2f13219e6e80a8e49cd43c795c38b8942f5748740e6c07604e4635fa9ca40dcad0216ac649a4be9c7886796cac1192619c328a1b2cc2c193e8a2cba799e
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,44 +1,32 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
AllCops:
|
5
|
+
TargetRubyVersion: 2.2
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
# Offense count: 1
|
8
|
+
Metrics/AbcSize:
|
9
|
+
Max: 17
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
Style/IndentHash:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Style/NumericLiterals:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/SignalException:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Style/StringLiterals:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Style/MultilineOperationIndentation:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Style/StringLiterals:
|
32
|
-
Enabled: false
|
11
|
+
# Offense count: 3
|
12
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Max: 80
|
33
15
|
|
16
|
+
# Offense count: 2
|
17
|
+
Style/Documentation:
|
18
|
+
Exclude:
|
19
|
+
- 'spec/**/*'
|
20
|
+
- 'test/**/*'
|
21
|
+
- 'lib/sequel_password.rb'
|
22
|
+
|
23
|
+
# Offense count: 3
|
24
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
25
|
+
# URISchemes: http, https
|
34
26
|
Metrics/LineLength:
|
35
|
-
Max:
|
36
|
-
|
37
|
-
Metrics/MethodLength:
|
38
|
-
Max: 250
|
39
|
-
|
40
|
-
Metrics/ClassLength:
|
41
|
-
Max: 250
|
27
|
+
Max: 103
|
42
28
|
|
43
|
-
|
44
|
-
|
29
|
+
# Offense count: 7
|
30
|
+
# Configuration parameters: AggregateFailuresByDefault.
|
31
|
+
RSpec/MultipleExpectations:
|
32
|
+
Max: 3
|
data/.travis.yml
CHANGED
data/lib/sequel_password.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require 'sequel'
|
2
|
+
require 'securerandom'
|
3
|
+
require 'sequel_password/hashers'
|
4
4
|
|
5
5
|
module Sequel
|
6
6
|
module Plugins
|
7
7
|
module Password
|
8
|
-
class InvalidHasherException <
|
8
|
+
class InvalidHasherException < RuntimeError; end
|
9
9
|
|
10
10
|
def self.configure(model, options = {})
|
11
11
|
model.instance_eval do
|
12
12
|
@column = options.fetch(:column, :password)
|
13
13
|
@hashers = options.fetch(:hashers,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
pbkdf2_sha256: PBKDF2Hasher.new,
|
15
|
+
bcrypt_sha256: BCryptSHA256Hasher.new,
|
16
|
+
bcrypt: BCryptHasher.new,
|
17
|
+
sha1: SHA1Hasher.new)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -26,7 +26,7 @@ module Sequel
|
|
26
26
|
attr_reader :column, :hashers
|
27
27
|
|
28
28
|
Plugins.inherited_instance_variables(self,
|
29
|
-
|
29
|
+
"@column": :digest, "@hashers": {})
|
30
30
|
|
31
31
|
# Returns the given password hash. It will return an unusable
|
32
32
|
# hash if given password is nil.
|
@@ -47,7 +47,7 @@ module Sequel
|
|
47
47
|
# @param [String] encoded hash
|
48
48
|
# @return [Boolean] if password is usable
|
49
49
|
def usable_password?(encoded)
|
50
|
-
return false if encoded.nil? || encoded.start_with?(
|
50
|
+
return false if encoded.nil? || encoded.start_with?('!')
|
51
51
|
|
52
52
|
algorithm = encoded.split('$').first
|
53
53
|
!hasher(algorithm).nil?
|
@@ -68,7 +68,7 @@ module Sequel
|
|
68
68
|
hasher = hasher(encoded.split('$').first)
|
69
69
|
|
70
70
|
must_update = hasher.algorithm != preferred.algorithm
|
71
|
-
must_update
|
71
|
+
must_update ||= preferred.must_update(encoded)
|
72
72
|
|
73
73
|
correct = hasher.verify(password, encoded)
|
74
74
|
setter.call(password) if !setter.nil? && correct && must_update
|
@@ -94,9 +94,7 @@ module Sequel
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def []=(attr, plain)
|
97
|
-
if attr == model.column
|
98
|
-
value = model.make_password(plain)
|
99
|
-
end
|
97
|
+
value = model.make_password(plain) if attr == model.column
|
100
98
|
super(attr, value || plain)
|
101
99
|
end
|
102
100
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require 'base64'
|
2
|
+
require 'bcrypt'
|
3
|
+
require 'openssl'
|
4
|
+
require 'pbkdf2'
|
5
|
+
require 'securerandom'
|
6
6
|
|
7
7
|
module Sequel
|
8
8
|
module Plugins
|
@@ -27,7 +27,7 @@ module Sequel
|
|
27
27
|
# @param [String] password in plain text
|
28
28
|
# @param [String] encoded password to be matched
|
29
29
|
# @return [Boolean] if password match encoded password.
|
30
|
-
def verify(
|
30
|
+
def verify(_password, _encoded)
|
31
31
|
raise NotImplementedError
|
32
32
|
end
|
33
33
|
|
@@ -36,7 +36,7 @@ module Sequel
|
|
36
36
|
# @param [String] password in plain text
|
37
37
|
# @param [String] salt to be used during hashing
|
38
38
|
# @return [String] given password hashed using the given salt
|
39
|
-
def encode(
|
39
|
+
def encode(_password, _salt)
|
40
40
|
raise NotImplementedError
|
41
41
|
end
|
42
42
|
|
@@ -44,7 +44,7 @@ module Sequel
|
|
44
44
|
#
|
45
45
|
# @param [String] encoded password
|
46
46
|
# @return [Boolean] if encoded password needs to be updated
|
47
|
-
def must_update(
|
47
|
+
def must_update(_encoded)
|
48
48
|
false
|
49
49
|
end
|
50
50
|
|
@@ -53,7 +53,7 @@ module Sequel
|
|
53
53
|
def constant_time_compare(a, b)
|
54
54
|
check = a.bytesize ^ b.bytesize
|
55
55
|
a.bytes.zip(b.bytes) { |x, y| check |= x ^ y }
|
56
|
-
check
|
56
|
+
check.zero?
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -62,26 +62,26 @@ module Sequel
|
|
62
62
|
class PBKDF2Hasher < Hasher
|
63
63
|
def initialize
|
64
64
|
@algorithm = :pbkdf2_sha256
|
65
|
-
@iterations =
|
65
|
+
@iterations = 24_000
|
66
66
|
@digest = OpenSSL::Digest::SHA256.new
|
67
67
|
end
|
68
68
|
|
69
69
|
def encode(password, salt, iterations = nil)
|
70
70
|
iterations = @iterations if iterations.nil?
|
71
71
|
hash = PBKDF2.new(password: password, salt: salt,
|
72
|
-
|
72
|
+
iterations: iterations, hash_function: @digest)
|
73
73
|
hash = Base64.strict_encode64(hash.value)
|
74
74
|
"#{@algorithm}$#{iterations}$#{salt}$#{hash}"
|
75
75
|
end
|
76
76
|
|
77
77
|
def verify(password, encoded)
|
78
|
-
_, iterations, salt,
|
78
|
+
_, iterations, salt, = encoded.split('$', 4)
|
79
79
|
hash = encode(password, salt, iterations.to_i)
|
80
80
|
constant_time_compare(encoded, hash)
|
81
81
|
end
|
82
82
|
|
83
83
|
def must_update(encoded)
|
84
|
-
_, iterations,
|
84
|
+
_, iterations, = encoded.split('$', 4)
|
85
85
|
iterations.to_i != @iterations
|
86
86
|
end
|
87
87
|
end
|
@@ -136,7 +136,7 @@ module Sequel
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def verify(password, encoded)
|
139
|
-
_, salt,
|
139
|
+
_, salt, = encoded.split('$', 3)
|
140
140
|
hash = encode(password, salt)
|
141
141
|
constant_time_compare(encoded, hash)
|
142
142
|
end
|
data/sequel_password.gemspec
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
1
|
Gem::Specification.new do |gem|
|
4
|
-
gem.authors = [
|
5
|
-
gem.email = [
|
6
|
-
gem.description =
|
7
|
-
gem.summary =
|
8
|
-
gem.homepage =
|
2
|
+
gem.authors = ['Timothée Peignier']
|
3
|
+
gem.email = ['timothee.peignier@tryphon.org']
|
4
|
+
gem.description = 'Sequel plugins to handle password hashing'
|
5
|
+
gem.summary = 'Add passwords hashing to sequel models.'
|
6
|
+
gem.homepage = 'http://rubygems.org/gems/sequel_password'
|
9
7
|
gem.license = 'MIT'
|
10
8
|
|
11
|
-
gem.files = `git ls-files`.split(
|
9
|
+
gem.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
|
12
10
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
13
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
-
gem.name =
|
15
|
-
gem.require_paths = [
|
16
|
-
gem.version = '0.2.
|
12
|
+
gem.name = 'sequel_password'
|
13
|
+
gem.require_paths = ['lib']
|
14
|
+
gem.version = '0.2.2'
|
17
15
|
|
18
|
-
gem.add_runtime_dependency '
|
19
|
-
gem.add_runtime_dependency 'bcrypt', '~> 3.1', '>= 3.1.10'
|
16
|
+
gem.add_runtime_dependency 'bcrypt', '~> 3.1', '>= 3.1.11'
|
20
17
|
gem.add_runtime_dependency 'pbkdf2-ruby', '~> 0.2.1'
|
18
|
+
gem.add_runtime_dependency 'sequel', '>= 4.39.0'
|
21
19
|
|
22
|
-
gem.add_development_dependency 'rspec', '~> 3.
|
23
|
-
gem.add_development_dependency '
|
20
|
+
gem.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
|
21
|
+
gem.add_development_dependency 'rubocop', '~> 0.52', '>= 0.52.0'
|
22
|
+
gem.add_development_dependency 'rubocop-rspec', '~> 1.22', '>= 1.22.0'
|
23
|
+
gem.add_development_dependency 'simplecov', '~> 0.15.0'
|
24
24
|
gem.add_development_dependency 'sqlite3', '~> 1.3', '>= 1.3.10'
|
25
25
|
end
|
@@ -1,39 +1,39 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Sequel::Plugins::Password do
|
4
4
|
subject(:user) { DefaultUser.new }
|
5
5
|
|
6
|
-
it
|
6
|
+
it 'has an inherited instance variable @column' do
|
7
7
|
expect(DefaultUser.inherited_instance_variables).to include(:@column)
|
8
8
|
end
|
9
9
|
|
10
|
-
it
|
10
|
+
it 'has an inherited instance variable @hashers' do
|
11
11
|
expect(DefaultUser.inherited_instance_variables).to include(:@hashers)
|
12
12
|
end
|
13
13
|
|
14
|
-
describe
|
15
|
-
let(:secret) {
|
14
|
+
describe 'set_unusable_password' do
|
15
|
+
let(:secret) { 'lètmein' }
|
16
16
|
|
17
17
|
before { user.password = secret }
|
18
18
|
|
19
|
-
it
|
19
|
+
it 'sets an unusable password' do
|
20
20
|
expect { user.set_unusable_password }.to change(user, :password)
|
21
21
|
expect(user.password).to match(/^!/)
|
22
22
|
expect(user.password.length).to eq(41)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
describe
|
27
|
-
let(:secret) {
|
26
|
+
describe '#authenticate' do
|
27
|
+
let(:secret) { 'lètmein' }
|
28
28
|
|
29
29
|
before { user.password = secret }
|
30
30
|
|
31
|
-
it
|
31
|
+
it 'returns true if authentication is successful' do
|
32
32
|
expect(user.authenticate(secret)).to be_truthy
|
33
33
|
end
|
34
34
|
|
35
|
-
it
|
36
|
-
expect(user.authenticate(
|
35
|
+
it 'returns false when authentication fails' do
|
36
|
+
expect(user.authenticate('')).to be_falsey
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -42,14 +42,14 @@ describe Sequel::Plugins::Password do
|
|
42
42
|
let(:password) { 'lètmein' }
|
43
43
|
let(:salt) { 'seasalt' }
|
44
44
|
|
45
|
-
it
|
45
|
+
it 'encodes the password properly' do
|
46
46
|
encoded = hasher.encode(password, salt)
|
47
47
|
expect(encoded).to eq("pbkdf2_sha256$24000$#{salt}$V9DfCAVoweeLwxC/L2mb+7swhzF0XYdyQMqmusZqiTc=")
|
48
48
|
expect(hasher.verify(password, encoded)).to be_truthy
|
49
49
|
expect(hasher.verify(password.reverse, encoded)).to be_falsey
|
50
50
|
end
|
51
51
|
|
52
|
-
it
|
52
|
+
it 'allows blank password' do
|
53
53
|
blank_encoded = hasher.encode('', salt)
|
54
54
|
expect(blank_encoded).to match(/^pbkdf2_sha256\$/)
|
55
55
|
expect(hasher.verify('', blank_encoded)).to be_truthy
|
@@ -61,7 +61,7 @@ describe Sequel::Plugins::Password do
|
|
61
61
|
let(:hasher) { described_class.new }
|
62
62
|
let(:password) { 'lètmein' }
|
63
63
|
|
64
|
-
it
|
64
|
+
it 'encodes the password properly' do
|
65
65
|
encoded = hasher.encode(password, hasher.salt)
|
66
66
|
expect(encoded).to match(/^bcrypt_sha256\$/)
|
67
67
|
expect(hasher.verify(password, encoded)).to be_truthy
|
@@ -73,7 +73,7 @@ describe Sequel::Plugins::Password do
|
|
73
73
|
let(:hasher) { described_class.new }
|
74
74
|
let(:password) { 'lètmein' }
|
75
75
|
|
76
|
-
it
|
76
|
+
it 'encodes the password properly' do
|
77
77
|
encoded = hasher.encode(password, hasher.salt)
|
78
78
|
expect(encoded).to match(/^bcrypt\$/)
|
79
79
|
expect(hasher.verify(password, encoded)).to be_truthy
|
@@ -86,14 +86,14 @@ describe Sequel::Plugins::Password do
|
|
86
86
|
let(:password) { 'lètmein' }
|
87
87
|
let(:salt) { 'seasalt' }
|
88
88
|
|
89
|
-
it
|
89
|
+
it 'encodes the password properly' do
|
90
90
|
encoded = hasher.encode(password, salt)
|
91
91
|
expect(encoded).to eq("sha1$#{salt}$cff36ea83f5706ce9aa7454e63e431fc726b2dc8")
|
92
92
|
expect(hasher.verify(password, encoded)).to be_truthy
|
93
93
|
expect(hasher.verify(password.reverse, encoded)).to be_falsey
|
94
94
|
end
|
95
95
|
|
96
|
-
it
|
96
|
+
it 'allows blank password' do
|
97
97
|
blank_encoded = hasher.encode('', salt)
|
98
98
|
expect(blank_encoded).to match(/^sha1\$/)
|
99
99
|
expect(hasher.verify('', blank_encoded)).to be_truthy
|
data/spec/spec_helper.rb
CHANGED
@@ -1,64 +1,52 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler'
|
2
2
|
Bundler.require
|
3
3
|
|
4
|
-
require
|
4
|
+
require 'simplecov'
|
5
5
|
SimpleCov.start do
|
6
6
|
add_filter('spec/')
|
7
7
|
end
|
8
8
|
|
9
|
-
require
|
10
|
-
require
|
9
|
+
require 'sequel'
|
10
|
+
require 'sequel_password'
|
11
11
|
|
12
12
|
RSpec.configure do |config|
|
13
13
|
config.order = 'random'
|
14
14
|
|
15
15
|
config.before(:suite) do
|
16
|
-
Sequel
|
17
|
-
Sequel.connect('sqlite:/')
|
16
|
+
db = Sequel.connect('sqlite:/')
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
18
|
+
db.create_table(:default) do
|
19
|
+
primary_key :id
|
20
|
+
varchar :password
|
21
|
+
end
|
24
22
|
|
23
|
+
class DefaultUser < Sequel::Model(:default)
|
25
24
|
plugin :password
|
26
25
|
end
|
27
26
|
|
28
|
-
class BCryptUser < Sequel::Model
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
plugin :password, hashers: { bcrypt: Sequel::Plugins::Password::BCryptHasher.new }
|
27
|
+
class BCryptUser < Sequel::Model(:default)
|
28
|
+
plugin :password, hashers: {
|
29
|
+
bcrypt: Sequel::Plugins::Password::BCryptHasher.new
|
30
|
+
}
|
35
31
|
end
|
36
32
|
|
37
|
-
class BCryptSHA256User < Sequel::Model
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
plugin :password, hashers: { bcrypt: Sequel::Plugins::Password::BCryptSHA256Hasher.new }
|
33
|
+
class BCryptSHA256User < Sequel::Model(:default)
|
34
|
+
plugin :password, hashers: {
|
35
|
+
bcrypt: Sequel::Plugins::Password::BCryptSHA256Hasher.new
|
36
|
+
}
|
44
37
|
end
|
45
38
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
end
|
39
|
+
db.create_table(:custom) do
|
40
|
+
primary_key :id
|
41
|
+
varchar :password_digest
|
42
|
+
end
|
51
43
|
|
44
|
+
class AlternateColumnUser < Sequel::Model(:custom)
|
52
45
|
plugin :password, column: :digest
|
53
46
|
end
|
54
|
-
|
55
|
-
DefaultUser.create_table!
|
56
|
-
BCryptUser.create_table!
|
57
|
-
BCryptSHA256User.create_table!
|
58
|
-
AlternateColumnUser.create_table!
|
59
47
|
end
|
60
48
|
|
61
|
-
config.around
|
49
|
+
config.around do |example|
|
62
50
|
Sequel::Model.db.transaction(rollback: :always) { example.run }
|
63
51
|
end
|
64
52
|
end
|
metadata
CHANGED
@@ -1,103 +1,137 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timothée Peignier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bcrypt
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.1'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 3.1.11
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '3.1'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 3.1.11
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: pbkdf2-ruby
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 0.2.1
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.2.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sequel
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
40
51
|
- - ">="
|
41
52
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
53
|
+
version: 4.39.0
|
43
54
|
type: :runtime
|
44
55
|
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 4.39.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.5'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 3.5.0
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
45
73
|
version_requirements: !ruby/object:Gem::Requirement
|
46
74
|
requirements:
|
47
75
|
- - "~>"
|
48
76
|
- !ruby/object:Gem::Version
|
49
|
-
version: '3.
|
77
|
+
version: '3.5'
|
50
78
|
- - ">="
|
51
79
|
- !ruby/object:Gem::Version
|
52
|
-
version: 3.
|
80
|
+
version: 3.5.0
|
53
81
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
82
|
+
name: rubocop
|
55
83
|
requirement: !ruby/object:Gem::Requirement
|
56
84
|
requirements:
|
57
85
|
- - "~>"
|
58
86
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
60
|
-
|
87
|
+
version: '0.52'
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 0.52.0
|
91
|
+
type: :development
|
61
92
|
prerelease: false
|
62
93
|
version_requirements: !ruby/object:Gem::Requirement
|
63
94
|
requirements:
|
64
95
|
- - "~>"
|
65
96
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.
|
97
|
+
version: '0.52'
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 0.52.0
|
67
101
|
- !ruby/object:Gem::Dependency
|
68
|
-
name: rspec
|
102
|
+
name: rubocop-rspec
|
69
103
|
requirement: !ruby/object:Gem::Requirement
|
70
104
|
requirements:
|
71
105
|
- - "~>"
|
72
106
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
107
|
+
version: '1.22'
|
74
108
|
- - ">="
|
75
109
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
110
|
+
version: 1.22.0
|
77
111
|
type: :development
|
78
112
|
prerelease: false
|
79
113
|
version_requirements: !ruby/object:Gem::Requirement
|
80
114
|
requirements:
|
81
115
|
- - "~>"
|
82
116
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
117
|
+
version: '1.22'
|
84
118
|
- - ">="
|
85
119
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
120
|
+
version: 1.22.0
|
87
121
|
- !ruby/object:Gem::Dependency
|
88
122
|
name: simplecov
|
89
123
|
requirement: !ruby/object:Gem::Requirement
|
90
124
|
requirements:
|
91
125
|
- - "~>"
|
92
126
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.
|
127
|
+
version: 0.15.0
|
94
128
|
type: :development
|
95
129
|
prerelease: false
|
96
130
|
version_requirements: !ruby/object:Gem::Requirement
|
97
131
|
requirements:
|
98
132
|
- - "~>"
|
99
133
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.
|
134
|
+
version: 0.15.0
|
101
135
|
- !ruby/object:Gem::Dependency
|
102
136
|
name: sqlite3
|
103
137
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,12 +163,11 @@ files:
|
|
129
163
|
- ".rubocop.yml"
|
130
164
|
- ".travis.yml"
|
131
165
|
- Gemfile
|
132
|
-
- Gemfile.lock
|
133
166
|
- README.md
|
134
167
|
- lib/sequel_password.rb
|
135
168
|
- lib/sequel_password/hashers.rb
|
136
169
|
- sequel_password.gemspec
|
137
|
-
- spec/
|
170
|
+
- spec/sequel/plugins/password_spec.rb
|
138
171
|
- spec/spec_helper.rb
|
139
172
|
homepage: http://rubygems.org/gems/sequel_password
|
140
173
|
licenses:
|
@@ -156,11 +189,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
189
|
version: '0'
|
157
190
|
requirements: []
|
158
191
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.4
|
192
|
+
rubygems_version: 2.7.4
|
160
193
|
signing_key:
|
161
194
|
specification_version: 4
|
162
195
|
summary: Add passwords hashing to sequel models.
|
163
196
|
test_files:
|
164
|
-
- spec/
|
197
|
+
- spec/sequel/plugins/password_spec.rb
|
165
198
|
- spec/spec_helper.rb
|
166
|
-
has_rdoc:
|
data/Gemfile.lock
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sequel_password (0.1.1)
|
5
|
-
bcrypt (~> 3.1, >= 3.1.10)
|
6
|
-
pbkdf2-ruby (~> 0.2.1)
|
7
|
-
sequel (~> 4.21, >= 4.21.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
bcrypt (3.1.10)
|
13
|
-
diff-lcs (1.2.5)
|
14
|
-
docile (1.1.5)
|
15
|
-
multi_json (1.11.0)
|
16
|
-
pbkdf2-ruby (0.2.1)
|
17
|
-
rspec (3.2.0)
|
18
|
-
rspec-core (~> 3.2.0)
|
19
|
-
rspec-expectations (~> 3.2.0)
|
20
|
-
rspec-mocks (~> 3.2.0)
|
21
|
-
rspec-core (3.2.2)
|
22
|
-
rspec-support (~> 3.2.0)
|
23
|
-
rspec-expectations (3.2.0)
|
24
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
-
rspec-support (~> 3.2.0)
|
26
|
-
rspec-mocks (3.2.1)
|
27
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.2.0)
|
29
|
-
rspec-support (3.2.2)
|
30
|
-
sequel (4.25.0)
|
31
|
-
simplecov (0.9.2)
|
32
|
-
docile (~> 1.1.0)
|
33
|
-
multi_json (~> 1.0)
|
34
|
-
simplecov-html (~> 0.9.0)
|
35
|
-
simplecov-html (0.9.0)
|
36
|
-
sqlite3 (1.3.10)
|
37
|
-
|
38
|
-
PLATFORMS
|
39
|
-
ruby
|
40
|
-
|
41
|
-
DEPENDENCIES
|
42
|
-
rspec (~> 3.2, >= 3.2.0)
|
43
|
-
sequel_password!
|
44
|
-
simplecov (~> 0.9.2)
|
45
|
-
sqlite3 (~> 1.3, >= 1.3.10)
|
46
|
-
|
47
|
-
BUNDLED WITH
|
48
|
-
1.10.6
|