has_secure_attribute 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/has_secure_attribute/version.rb +1 -1
- data/spec/config/database.yml +0 -3
- data/spec/db/migrate/create_test_model_with_attributes.rb +2 -2
- data/spec/db/migrate/db_helper.rb +3 -1
- data/spec/factories/test_model_with_attributes.rb +2 -2
- data/spec/models/has_secure_attribute_spec.rb +63 -63
- data/spec/spec_helper.rb +2 -2
- metadata +54 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25c15b3f643163f6c2fb3c464a2ec2b6742d08f0
|
4
|
+
data.tar.gz: 167c75e4c3749f77884640e9b4540093c0b115bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe0c64a7b25fdb7b7d64a680214c576bfd50054d2878c62cef4af43520c4f74d4fdc0c87387ea4e288b5265193ad1c5762a98156934411f879ac0d5b0dbe0f0b
|
7
|
+
data.tar.gz: 6c8d535bdf3f7c12531cd94fee7a0e96c14d3cb27eb48da655dfc5f10c8879c89a827221a17211bb011d36158cf5c546ea758e2858452b85d8db4c5fbfc8e0b5
|
data/README.md
CHANGED
@@ -34,9 +34,9 @@ or
|
|
34
34
|
|
35
35
|
In the above example:
|
36
36
|
|
37
|
-
*
|
37
|
+
* You should have a `users` table that has one column: `security_answer_digest`.
|
38
38
|
* It creates a reader: `security_answer`.
|
39
|
-
* It creates a writer: `security_answer=(value)` which basically saves the security answer given into the database on column `security_answer_digest` but
|
39
|
+
* It creates a writer: `security_answer=(value)` which basically saves the security answer given into the database on column `security_answer_digest` but it saves it encrypted.
|
40
40
|
* It adds some validations (if you want to avoid having these validations: `has_secure_security_answer validations: false`).
|
41
41
|
* It creates a confirmation validation on `security_answer` but only if `security_answer` is given (for confirmation validations see [this](http://http://guides.rubyonrails.org/active_record_validations.html#confirmation)).
|
42
42
|
* It creates a presence validation on `security_answer` but only on create.
|
data/spec/config/database.yml
CHANGED
@@ -6,7 +6,6 @@ development:
|
|
6
6
|
pool: 5
|
7
7
|
username: root
|
8
8
|
password:
|
9
|
-
socket: /var/run/mysqld/mysqld.sock
|
10
9
|
|
11
10
|
# Warning: The database defined as "test" will be erased and
|
12
11
|
# re-generated from your development database when you run "rake".
|
@@ -19,7 +18,6 @@ test:
|
|
19
18
|
pool: 5
|
20
19
|
username: root
|
21
20
|
password:
|
22
|
-
socket: /var/run/mysqld/mysqld.sock
|
23
21
|
|
24
22
|
production:
|
25
23
|
adapter: mysql2
|
@@ -29,5 +27,4 @@ production:
|
|
29
27
|
pool: 5
|
30
28
|
username: root
|
31
29
|
password:
|
32
|
-
socket: /var/run/mysqld/mysqld.sock
|
33
30
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateTestModelWithAttributes < ActiveRecord::Migration
|
1
|
+
class CreateTestModelWithAttributes < ActiveRecord::Migration[5.1]
|
2
2
|
def up
|
3
3
|
HasSecureAttribute::DbHelper.new.connect_to_database
|
4
4
|
return if ActiveRecord::Base.connection.table_exists? :test_model_with_attributes
|
@@ -21,4 +21,4 @@ class CreateTestModelWithAttributes < ActiveRecord::Migration
|
|
21
21
|
end
|
22
22
|
|
23
23
|
|
24
|
-
end
|
24
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
1
3
|
module HasSecureAttribute
|
2
4
|
class DbHelper
|
3
5
|
def connect_to_database
|
@@ -12,4 +14,4 @@ module HasSecureAttribute
|
|
12
14
|
ActiveRecord::Base.establish_connection database_settings['test'].delete_if{|k,v| 'database' == k}
|
13
15
|
end
|
14
16
|
end
|
15
|
-
end
|
17
|
+
end
|
@@ -1,64 +1,64 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe TestModelWithAttribute do
|
4
|
-
it {
|
5
|
-
it {
|
6
|
-
it {
|
7
|
-
it {
|
8
|
-
it {
|
4
|
+
it { expect(subject).to respond_to(:security_answer) }
|
5
|
+
it { expect(subject).to respond_to(:security_answer=) }
|
6
|
+
it { expect(subject).to respond_to(:security_answer_confirmation) }
|
7
|
+
it { expect(subject).to respond_to(:security_answer_confirmation=) }
|
8
|
+
it { expect(subject).to respond_to(:authenticate_security_answer) }
|
9
9
|
|
10
10
|
it 'should confirm security answer' do
|
11
11
|
subject.security_answer = 'hello there'
|
12
12
|
subject.security_answer_confirmation = 'there hello'
|
13
13
|
subject.valid?
|
14
|
-
subject.errors[:security_answer_confirmation].
|
14
|
+
expect(subject.errors[:security_answer_confirmation]).to include("doesn't match Security answer")
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'should not confirm security answer if not given' do
|
18
18
|
subject.security_answer = nil
|
19
19
|
subject.security_answer_confirmation = 'there hello'
|
20
20
|
subject.valid?
|
21
|
-
subject.errors[:security_answer_confirmation].
|
21
|
+
expect(subject.errors[:security_answer_confirmation]).to be_blank
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'should require security answer on create' do
|
25
|
-
subject.
|
25
|
+
expect(subject).to be_new_record
|
26
26
|
subject.security_answer = nil
|
27
27
|
subject.valid?
|
28
|
-
subject.errors[:security_answer].
|
28
|
+
expect(subject.errors[:security_answer]).to include("can't be blank")
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'should require security answer confirmation if security answer given ' do
|
32
32
|
subject.security_answer = 'hello there'
|
33
33
|
subject.valid?
|
34
|
-
subject.errors[:security_answer_confirmation].
|
34
|
+
expect(subject.errors[:security_answer_confirmation]).to include("can't be blank")
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'should not require security answer confirmation if security answer is not given' do
|
38
38
|
subject.security_answer = ''
|
39
39
|
subject.valid?
|
40
|
-
subject.errors[:security_answer_confirmation].
|
40
|
+
expect(subject.errors[:security_answer_confirmation]).to be_blank
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'should require security answer digest on create' do
|
44
|
-
subject =
|
45
|
-
subject.
|
44
|
+
subject = FactoryBot.build :test_model_with_attribute
|
45
|
+
expect(subject).to be_new_record
|
46
46
|
|
47
47
|
# change the security_answer_digest to verify the test
|
48
48
|
subject.security_answer_digest = ''
|
49
|
-
|
49
|
+
expect do
|
50
50
|
begin
|
51
51
|
subject.save!
|
52
52
|
rescue Exception => ex
|
53
|
-
ex.message.
|
53
|
+
expect(ex.message).to include("security_answer_digest missing on new record")
|
54
54
|
raise
|
55
55
|
end
|
56
|
-
end.
|
56
|
+
end.to raise_error RuntimeError
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'should not require security answer digest on update' do
|
60
|
-
subject =
|
61
|
-
subject.
|
60
|
+
subject = FactoryBot.build :test_model_with_attribute
|
61
|
+
expect(subject).to be_new_record
|
62
62
|
|
63
63
|
subject.save!
|
64
64
|
|
@@ -68,72 +68,72 @@ describe TestModelWithAttribute do
|
|
68
68
|
subject.save!
|
69
69
|
|
70
70
|
subject.reload
|
71
|
-
subject.security_answer_digest.
|
71
|
+
expect(subject.security_answer_digest).to be_blank
|
72
72
|
end
|
73
73
|
|
74
74
|
it 'should allow to call security answer digest directly if protect setter for digest is not given as option' do
|
75
|
-
|
75
|
+
expect do
|
76
76
|
subject.security_answer_digest = 'hello'
|
77
|
-
end.
|
77
|
+
end.not_to raise_error
|
78
78
|
end
|
79
79
|
|
80
80
|
describe "#security_answer=" do
|
81
81
|
it 'should set the security answer and save it encrypted' do
|
82
|
-
tmwa =
|
83
|
-
tmwa.security_answer_digest.
|
82
|
+
tmwa = FactoryBot.create :test_model_with_attribute, security_answer: 'old answer', security_answer_confirmation: 'old answer'
|
83
|
+
expect(tmwa.security_answer_digest).not_to be_blank
|
84
84
|
old_security_answer_digest = tmwa.security_answer_digest
|
85
85
|
|
86
86
|
tmwa.security_answer = 'new answer'
|
87
87
|
tmwa.security_answer_confirmation = 'new answer'
|
88
|
-
tmwa.instance_variable_get(:@security_answer).
|
88
|
+
expect(tmwa.instance_variable_get(:@security_answer)).to eq('new answer')
|
89
89
|
tmwa.save!
|
90
|
-
tmwa.security_answer_digest.
|
91
|
-
tmwa.security_answer_digest.
|
90
|
+
expect(tmwa.security_answer_digest).not_to be_blank
|
91
|
+
expect(tmwa.security_answer_digest).not_to eq(old_security_answer_digest)
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
95
|
describe '#authenticate_security_answer' do
|
96
96
|
it 'should return subject if security answer given matches the one stored' do
|
97
|
-
tmwa =
|
98
|
-
tmwa.authenticate_security_answer('some answer').
|
97
|
+
tmwa = FactoryBot.create :test_model_with_attribute, security_answer: 'some answer', security_answer_confirmation: 'some answer'
|
98
|
+
expect(tmwa.authenticate_security_answer('some answer')).to eq(tmwa)
|
99
99
|
end
|
100
100
|
|
101
101
|
it 'should return false if security answer given does not match the one stored' do
|
102
|
-
tmwa =
|
103
|
-
tmwa.authenticate_security_answer('some other answer').
|
102
|
+
tmwa = FactoryBot.create :test_model_with_attribute, security_answer: 'some answer', security_answer_confirmation: 'some answer'
|
103
|
+
expect(tmwa.authenticate_security_answer('some other answer')).to eq(false)
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
108
|
describe TestModelWithAttributeNoValidation do
|
109
|
-
it {
|
110
|
-
it {
|
111
|
-
it {
|
112
|
-
it {
|
113
|
-
it {
|
109
|
+
it { expect(subject).to respond_to(:security_answer) }
|
110
|
+
it { expect(subject).to respond_to(:security_answer=) }
|
111
|
+
it { expect(subject).to_not respond_to(:security_answer_confirmation) }
|
112
|
+
it { expect(subject).to_not respond_to(:security_answer_confirmation=) }
|
113
|
+
it { expect(subject).to respond_to(:authenticate_security_answer) }
|
114
114
|
|
115
115
|
it 'should not require security answer on create' do
|
116
|
-
subject.
|
116
|
+
expect(subject).to be_new_record
|
117
117
|
subject.security_answer = nil
|
118
118
|
subject.valid?
|
119
|
-
subject.errors[:security_answer].
|
119
|
+
expect(subject.errors[:security_answer]).to be_blank
|
120
120
|
end
|
121
121
|
|
122
122
|
it 'should not require security answer confirmation if security answer given ' do
|
123
123
|
subject.security_answer = 'hello there'
|
124
124
|
subject.valid?
|
125
|
-
subject.errors[:security_answer_confirmation].
|
125
|
+
expect(subject.errors[:security_answer_confirmation]).to be_blank
|
126
126
|
end
|
127
127
|
|
128
128
|
it 'should not require security answer confirmation if security answer is not given' do
|
129
129
|
subject.security_answer = ''
|
130
130
|
subject.valid?
|
131
|
-
subject.errors[:security_answer_confirmation].
|
131
|
+
expect(subject.errors[:security_answer_confirmation]).to be_blank
|
132
132
|
end
|
133
133
|
|
134
134
|
it 'should not require security answer digest on create' do
|
135
|
-
subject =
|
136
|
-
subject.
|
135
|
+
subject = FactoryBot.build :test_model_with_attribute_no_validation
|
136
|
+
expect(subject).to be_new_record
|
137
137
|
|
138
138
|
# change the security_answer_digest to verify the test
|
139
139
|
subject.security_answer_digest = ''
|
@@ -141,8 +141,8 @@ describe TestModelWithAttributeNoValidation do
|
|
141
141
|
end
|
142
142
|
|
143
143
|
it 'should not require security answer digest on update' do
|
144
|
-
subject =
|
145
|
-
subject.
|
144
|
+
subject = FactoryBot.build :test_model_with_attribute_no_validation
|
145
|
+
expect(subject).to be_new_record
|
146
146
|
|
147
147
|
subject.save!
|
148
148
|
|
@@ -152,49 +152,49 @@ describe TestModelWithAttributeNoValidation do
|
|
152
152
|
subject.save!
|
153
153
|
|
154
154
|
subject.reload
|
155
|
-
subject.security_answer_digest.
|
155
|
+
expect(subject.security_answer_digest).to be_blank
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
159
159
|
describe TestModelWithAttributeProtectSetterForDigest do
|
160
160
|
it 'should not allow to call security answer digest directly' do
|
161
|
-
|
161
|
+
expect do
|
162
162
|
subject.security_answer_digest = 'hello'
|
163
|
-
end.
|
163
|
+
end.to raise_error NoMethodError
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
167
|
describe TestModelWithAttributeWithCaseSensitive do
|
168
168
|
it 'should authenticate even if answer is of different case' do
|
169
|
-
t =
|
169
|
+
t = FactoryBot.create :test_model_with_attribute_with_case_sensitive, security_answer: 'Answer', security_answer_confirmation: 'Answer'
|
170
170
|
|
171
|
-
t.authenticate_security_answer('answer').
|
171
|
+
expect(t.authenticate_security_answer('answer')).to eq t
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
175
|
describe TestModelWithAttributeDisableConfirmation do
|
176
|
-
it {
|
177
|
-
it {
|
176
|
+
it { expect(subject).to_not respond_to(:security_answer_confirmation) }
|
177
|
+
it { expect(subject).to_not respond_to(:security_answer_confirmation=) }
|
178
178
|
it 'should allow to create and save without any confirmation on security answer' do
|
179
|
-
t =
|
179
|
+
t = FactoryBot.create :test_model_with_attribute_disable_confirmation, security_answer: 'Answer'
|
180
180
|
t.save!
|
181
|
-
t.authenticate_security_answer('another answer').
|
182
|
-
t.authenticate_security_answer('Answer').
|
181
|
+
expect(t.authenticate_security_answer('another answer')).to eq(false)
|
182
|
+
expect(t.authenticate_security_answer('Answer')).to eq(t)
|
183
183
|
end
|
184
184
|
end
|
185
185
|
|
186
186
|
describe TestModelWithAlternativeSyntax do
|
187
|
-
it {
|
188
|
-
it {
|
189
|
-
it {
|
190
|
-
it {
|
191
|
-
it {
|
187
|
+
it { expect(subject).to respond_to(:username) }
|
188
|
+
it { expect(subject).to respond_to(:username=) }
|
189
|
+
it { expect(subject).to respond_to(:username_confirmation) }
|
190
|
+
it { expect(subject).to respond_to(:username_confirmation=) }
|
191
|
+
it { expect(subject).to respond_to(:authenticate_username) }
|
192
192
|
|
193
193
|
context "with no validation" do
|
194
|
-
it {
|
195
|
-
it {
|
196
|
-
it {
|
197
|
-
it {
|
198
|
-
it {
|
194
|
+
it { expect(subject).to respond_to(:security_answer) }
|
195
|
+
it { expect(subject).to respond_to(:security_answer=) }
|
196
|
+
it { expect(subject).to_not respond_to(:security_answer_confirmation) }
|
197
|
+
it { expect(subject).to_not respond_to(:security_answer_confirmation=) }
|
198
|
+
it { expect(subject).to respond_to(:authenticate_security_answer) }
|
199
199
|
end
|
200
200
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -11,8 +11,8 @@ require File.expand_path("../models/test_model_with_attribute_with_case_sensitiv
|
|
11
11
|
require File.expand_path("../models/test_model_with_attribute_disable_confirmation", __FILE__)
|
12
12
|
require File.expand_path("../models/test_model_with_alternative_syntax", __FILE__)
|
13
13
|
|
14
|
-
require '
|
15
|
-
|
14
|
+
require 'factory_bot'
|
15
|
+
FactoryBot.find_definitions
|
16
16
|
require 'database_cleaner'
|
17
17
|
|
18
18
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_secure_attribute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Panayotis Matsinopoulos
|
@@ -14,100 +14,112 @@ dependencies:
|
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bcrypt-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.
|
33
|
+
version: '3.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.
|
40
|
+
version: '3.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '12.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '12.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mysql2
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.4.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.4.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: factory_bot
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '4.8'
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 4.8.0
|
90
93
|
type: :development
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
|
-
- -
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '4.8'
|
100
|
+
- - ">="
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
102
|
+
version: 4.8.0
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: database_cleaner
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
|
-
- -
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.6'
|
110
|
+
- - ">="
|
102
111
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
112
|
+
version: 1.6.0
|
104
113
|
type: :development
|
105
114
|
prerelease: false
|
106
115
|
version_requirements: !ruby/object:Gem::Requirement
|
107
116
|
requirements:
|
108
|
-
- -
|
117
|
+
- - "~>"
|
109
118
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
119
|
+
version: '1.6'
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 1.6.0
|
111
123
|
description: Does what `has_secure_password` does, but for any attribute that you
|
112
124
|
want. It does not have to be a `password` attribute. It may be for example `security_answer`
|
113
125
|
email:
|
@@ -116,23 +128,23 @@ executables: []
|
|
116
128
|
extensions: []
|
117
129
|
extra_rdoc_files: []
|
118
130
|
files:
|
131
|
+
- MIT
|
132
|
+
- README.md
|
119
133
|
- lib/active_model/secure_attribute/has_secure_attribute.rb
|
120
134
|
- lib/has_secure_attribute.rb
|
121
135
|
- lib/has_secure_attribute/version.rb
|
122
|
-
- spec/spec_helper.rb
|
123
|
-
- spec/factories/test_model_with_attributes.rb
|
124
136
|
- spec/config/database.yml
|
137
|
+
- spec/db/migrate/create_test_model_with_attributes.rb
|
138
|
+
- spec/db/migrate/db_helper.rb
|
139
|
+
- spec/factories/test_model_with_attributes.rb
|
125
140
|
- spec/models/has_secure_attribute_spec.rb
|
126
|
-
- spec/models/test_model_with_attribute_no_validation.rb
|
127
|
-
- spec/models/test_model_with_attribute_protect_setter_for_digest.rb
|
128
141
|
- spec/models/test_model_with_alternative_syntax.rb
|
129
|
-
- spec/models/test_model_with_attribute_disable_confirmation.rb
|
130
142
|
- spec/models/test_model_with_attribute.rb
|
143
|
+
- spec/models/test_model_with_attribute_disable_confirmation.rb
|
144
|
+
- spec/models/test_model_with_attribute_no_validation.rb
|
145
|
+
- spec/models/test_model_with_attribute_protect_setter_for_digest.rb
|
131
146
|
- spec/models/test_model_with_attribute_with_case_sensitive.rb
|
132
|
-
- spec/
|
133
|
-
- spec/db/migrate/create_test_model_with_attributes.rb
|
134
|
-
- README.md
|
135
|
-
- MIT
|
147
|
+
- spec/spec_helper.rb
|
136
148
|
homepage: https://github.com/pmatsinopoulos/has_secure_attribute
|
137
149
|
licenses:
|
138
150
|
- MIT
|
@@ -143,17 +155,17 @@ require_paths:
|
|
143
155
|
- lib
|
144
156
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
157
|
requirements:
|
146
|
-
- -
|
158
|
+
- - ">="
|
147
159
|
- !ruby/object:Gem::Version
|
148
160
|
version: '0'
|
149
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
162
|
requirements:
|
151
|
-
- -
|
163
|
+
- - ">="
|
152
164
|
- !ruby/object:Gem::Version
|
153
165
|
version: '0'
|
154
166
|
requirements: []
|
155
167
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.6.14
|
157
169
|
signing_key:
|
158
170
|
specification_version: 4
|
159
171
|
summary: Allows an ActiveRecord::Base class to declare an attribute that will be saved
|