clearance 2.7.2 → 2.9.0
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 +4 -4
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/dynamic-security.yml +19 -0
- data/.github/workflows/tests.yml +7 -7
- data/.gitignore +4 -1
- data/Appraisals +9 -5
- data/CHANGELOG.md +16 -1
- data/Gemfile +0 -1
- data/Gemfile.lock +130 -97
- data/README.md +2 -1
- data/Rakefile +4 -7
- data/SECURITY.md +12 -8
- data/app/views/sessions/_form.html.erb +3 -1
- data/bin/setup +2 -2
- data/clearance.gemspec +9 -9
- data/config/routes.rb +5 -3
- data/gemfiles/rails_7.0.gemfile +4 -1
- data/gemfiles/rails_7.1.gemfile +0 -1
- data/gemfiles/{rails_6.1.gemfile → rails_7.2.gemfile} +1 -3
- data/lib/clearance/back_door.rb +4 -2
- data/lib/clearance/configuration.rb +14 -0
- data/lib/clearance/version.rb +1 -1
- data/spec/clearance/session_spec.rb +2 -2
- data/spec/configuration_spec.rb +15 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +0 -0
- data/spec/dummy/config/application.rb +13 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/test.rb +31 -0
- data/spec/dummy/config.ru +6 -0
- data/{db → spec/dummy/db}/migrate/20110111224543_create_clearance_users.rb +3 -2
- data/spec/dummy/db/schema.rb +25 -0
- data/spec/requests/backdoor_spec.rb +11 -0
- data/spec/requests/csrf_rotation_spec.rb +1 -5
- data/spec/requests/token_expiration_spec.rb +3 -3
- data/spec/routing/clearance_routes_spec.rb +32 -0
- data/spec/spec_helper.rb +4 -11
- data/spec/support/generator_spec_helpers.rb +11 -0
- data/spec/support/html_escape_helper.rb +1 -1
- metadata +33 -18
- data/db/schema.rb +0 -28
- data/spec/dummy/application.rb +0 -30
- data/spec/support/cookies.rb +0 -74
- /data/spec/{factories.rb → factories/users.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea787197f1c05708009b5318ed67814d74c11de000e314d87d0d2f9278722ea7
|
4
|
+
data.tar.gz: 9def5796663a629edecd2a9ad34aadb3b3430d4f00b4ba1017259bc929321911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 374df1a9550bb8379625497e010c79d264e328d9763341e6c5a1e1e01a42d3085650b5872d92df32a14d06c1d88f82ae9bcb4912ab717790800bce9237847c4a
|
7
|
+
data.tar.gz: 370f291a30b646bb3afcf9bc27fdccf13facec4c9663e44d4efbab0006430066891849c77fe788225a8145636507a8a03ac6360d3e195d7f7f304d8270a28054
|
@@ -0,0 +1,15 @@
|
|
1
|
+
version: 2
|
2
|
+
|
3
|
+
updates:
|
4
|
+
- package-ecosystem: bundler
|
5
|
+
directory: "/"
|
6
|
+
schedule:
|
7
|
+
interval: daily
|
8
|
+
open-pull-requests-limit: 5
|
9
|
+
|
10
|
+
- package-ecosystem: github-actions
|
11
|
+
directory: "/"
|
12
|
+
schedule:
|
13
|
+
interval: weekly
|
14
|
+
time: "02:00"
|
15
|
+
timezone: "Etc/UTC"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: update-security
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
paths:
|
8
|
+
- SECURITY.md
|
9
|
+
workflow_dispatch:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
update-security:
|
13
|
+
permissions:
|
14
|
+
contents: write
|
15
|
+
pull-requests: write
|
16
|
+
pages: write
|
17
|
+
uses: thoughtbot/templates/.github/workflows/dynamic-security.yaml@main
|
18
|
+
secrets:
|
19
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.github/workflows/tests.yml
CHANGED
@@ -16,20 +16,20 @@ jobs:
|
|
16
16
|
fail-fast: false
|
17
17
|
matrix:
|
18
18
|
gemfile:
|
19
|
-
- "6.1"
|
20
19
|
- "7.0"
|
21
20
|
- "7.1"
|
21
|
+
- "7.2"
|
22
22
|
ruby:
|
23
|
-
- "3.
|
24
|
-
- "3.
|
25
|
-
- "3.
|
23
|
+
- "3.1.6"
|
24
|
+
- "3.2.5"
|
25
|
+
- "3.3.5"
|
26
26
|
|
27
27
|
env:
|
28
28
|
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile
|
29
29
|
RAILS_ENV: test
|
30
30
|
|
31
31
|
steps:
|
32
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v4
|
33
33
|
|
34
34
|
- name: "Install Ruby ${{ matrix.ruby }}"
|
35
35
|
uses: ruby/setup-ruby@v1
|
@@ -39,8 +39,8 @@ jobs:
|
|
39
39
|
|
40
40
|
- name: "Reset app database"
|
41
41
|
run: |
|
42
|
-
bundle exec rake
|
43
|
-
bundle exec rake
|
42
|
+
bundle exec rake db:drop
|
43
|
+
bundle exec rake db:setup
|
44
44
|
|
45
45
|
- name: "Run tests"
|
46
46
|
run: bundle exec rake
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
@@ -1,12 +1,16 @@
|
|
1
|
-
appraise "rails_6.1" do
|
2
|
-
gem "railties", "~> 6.1.0"
|
3
|
-
gem "net-smtp", require: false # not bundled in ruby 3.1
|
4
|
-
end
|
5
|
-
|
6
1
|
appraise "rails_7.0" do
|
7
2
|
gem "railties", "~> 7.0.0"
|
3
|
+
# The following gems will not be bundled with Ruby 3.4
|
4
|
+
gem "base64", require: false
|
5
|
+
gem "bigdecimal", require: false
|
6
|
+
gem "drb", require: false
|
7
|
+
gem "mutex_m", require: false
|
8
8
|
end
|
9
9
|
|
10
10
|
appraise "rails_7.1" do
|
11
11
|
gem "railties", "~> 7.1.0"
|
12
12
|
end
|
13
|
+
|
14
|
+
appraise "rails_7.2" do
|
15
|
+
gem "railties", "~> 7.2.0"
|
16
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,22 @@ complete changelog, see the git history for each version via the version links.
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
-
[Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.
|
8
|
+
[Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.9.0...main
|
9
|
+
|
10
|
+
## [2.9.0] - October 29, 2024
|
11
|
+
- Added Rails 7.2 and Ruby 3.3 to testing matrix
|
12
|
+
and overhauled dummy app (#1032) Hamed Asghari
|
13
|
+
- Droped support for Ruby 3.0 and Rails 6.1 (#1036)
|
14
|
+
|
15
|
+
[2.9.0]: https://github.com/thoughtbot/clearance/compare/v2.8.0...v2.9.0
|
16
|
+
|
17
|
+
## [2.8.0] - August 9, 2024
|
18
|
+
- Feature: Added allow_password_resets config option (#1019) Jos O'shea
|
19
|
+
- Added dependabot (#1028) Karine Vieira
|
20
|
+
- Fixed some deprecation warnings (#1018)
|
21
|
+
- Added a dynamic workflow to update SECURITY.md
|
22
|
+
|
23
|
+
[2.8.0]: https://github.com/thoughtbot/clearance/compare/v2.7.2...v2.8.0
|
9
24
|
|
10
25
|
## [2.7.2] - June 28, 2024
|
11
26
|
- Fix method redefinition and circular require issues (#1027)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
clearance (2.
|
4
|
+
clearance (2.8.0)
|
5
5
|
actionmailer (>= 5.0)
|
6
6
|
activemodel (>= 5.0)
|
7
7
|
activerecord (>= 5.0)
|
@@ -13,49 +13,57 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
actionmailer (7.0
|
17
|
-
actionpack (= 7.0
|
18
|
-
actionview (= 7.0
|
19
|
-
activejob (= 7.0
|
20
|
-
activesupport (= 7.0
|
21
|
-
mail (
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
rack (
|
16
|
+
actionmailer (7.2.0)
|
17
|
+
actionpack (= 7.2.0)
|
18
|
+
actionview (= 7.2.0)
|
19
|
+
activejob (= 7.2.0)
|
20
|
+
activesupport (= 7.2.0)
|
21
|
+
mail (>= 2.8.0)
|
22
|
+
rails-dom-testing (~> 2.2)
|
23
|
+
actionpack (7.2.0)
|
24
|
+
actionview (= 7.2.0)
|
25
|
+
activesupport (= 7.2.0)
|
26
|
+
nokogiri (>= 1.8.5)
|
27
|
+
racc
|
28
|
+
rack (>= 2.2.4, < 3.2)
|
29
|
+
rack-session (>= 1.0.1)
|
30
30
|
rack-test (>= 0.6.3)
|
31
|
-
rails-dom-testing (~> 2.
|
32
|
-
rails-html-sanitizer (~> 1.
|
33
|
-
|
34
|
-
|
31
|
+
rails-dom-testing (~> 2.2)
|
32
|
+
rails-html-sanitizer (~> 1.6)
|
33
|
+
useragent (~> 0.16)
|
34
|
+
actionview (7.2.0)
|
35
|
+
activesupport (= 7.2.0)
|
35
36
|
builder (~> 3.1)
|
36
|
-
erubi (~> 1.
|
37
|
-
rails-dom-testing (~> 2.
|
38
|
-
rails-html-sanitizer (~> 1.
|
39
|
-
activejob (7.0
|
40
|
-
activesupport (= 7.0
|
37
|
+
erubi (~> 1.11)
|
38
|
+
rails-dom-testing (~> 2.2)
|
39
|
+
rails-html-sanitizer (~> 1.6)
|
40
|
+
activejob (7.2.0)
|
41
|
+
activesupport (= 7.2.0)
|
41
42
|
globalid (>= 0.3.6)
|
42
|
-
activemodel (7.0
|
43
|
-
activesupport (= 7.0
|
44
|
-
activerecord (7.0
|
45
|
-
activemodel (= 7.0
|
46
|
-
activesupport (= 7.0
|
47
|
-
|
48
|
-
|
43
|
+
activemodel (7.2.0)
|
44
|
+
activesupport (= 7.2.0)
|
45
|
+
activerecord (7.2.0)
|
46
|
+
activemodel (= 7.2.0)
|
47
|
+
activesupport (= 7.2.0)
|
48
|
+
timeout (>= 0.4.0)
|
49
|
+
activesupport (7.2.0)
|
50
|
+
base64
|
51
|
+
bigdecimal
|
52
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
53
|
+
connection_pool (>= 2.2.5)
|
54
|
+
drb
|
49
55
|
i18n (>= 1.6, < 2)
|
56
|
+
logger (>= 1.4.2)
|
50
57
|
minitest (>= 5.1)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
58
|
+
securerandom (>= 0.3)
|
59
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
60
|
+
addressable (2.8.7)
|
61
|
+
public_suffix (>= 2.0.2, < 7.0)
|
62
|
+
ammeter (1.1.7)
|
55
63
|
activesupport (>= 3.0)
|
56
64
|
railties (>= 3.0)
|
57
65
|
rspec-rails (>= 2.2)
|
58
|
-
appraisal (2.
|
66
|
+
appraisal (2.5.0)
|
59
67
|
bundler
|
60
68
|
rake
|
61
69
|
thor (>= 0.14.0)
|
@@ -63,6 +71,7 @@ GEM
|
|
63
71
|
ffi (~> 1.15)
|
64
72
|
ffi-compiler (~> 1.0)
|
65
73
|
ast (2.4.2)
|
74
|
+
base64 (0.2.0)
|
66
75
|
bcrypt (3.1.20)
|
67
76
|
better_html (2.1.1)
|
68
77
|
actionview (>= 6.0)
|
@@ -71,43 +80,46 @@ GEM
|
|
71
80
|
erubi (~> 1.4)
|
72
81
|
parser (>= 2.4)
|
73
82
|
smart_properties
|
74
|
-
|
75
|
-
|
83
|
+
bigdecimal (3.1.8)
|
84
|
+
builder (3.3.0)
|
85
|
+
capybara (3.40.0)
|
76
86
|
addressable
|
77
87
|
matrix
|
78
88
|
mini_mime (>= 0.1.3)
|
79
|
-
nokogiri (~> 1.
|
89
|
+
nokogiri (~> 1.11)
|
80
90
|
rack (>= 1.6.0)
|
81
91
|
rack-test (>= 0.6.3)
|
82
92
|
regexp_parser (>= 1.5, < 3.0)
|
83
93
|
xpath (~> 3.2)
|
84
94
|
coderay (1.1.3)
|
85
|
-
concurrent-ruby (1.
|
95
|
+
concurrent-ruby (1.3.4)
|
96
|
+
connection_pool (2.4.1)
|
86
97
|
crass (1.0.6)
|
87
|
-
database_cleaner (2.0.
|
88
|
-
database_cleaner-active_record (
|
89
|
-
database_cleaner-active_record (2.0
|
98
|
+
database_cleaner (2.0.2)
|
99
|
+
database_cleaner-active_record (>= 2, < 3)
|
100
|
+
database_cleaner-active_record (2.2.0)
|
90
101
|
activerecord (>= 5.a)
|
91
102
|
database_cleaner-core (~> 2.0.0)
|
92
103
|
database_cleaner-core (2.0.1)
|
93
104
|
date (3.3.4)
|
94
|
-
diff-lcs (1.5.
|
105
|
+
diff-lcs (1.5.1)
|
106
|
+
drb (2.2.1)
|
95
107
|
email_validator (2.2.4)
|
96
108
|
activemodel
|
97
|
-
erb_lint (0.
|
109
|
+
erb_lint (0.6.0)
|
98
110
|
activesupport
|
99
111
|
better_html (>= 2.0.1)
|
100
112
|
parser (>= 2.7.1.4)
|
101
113
|
rainbow
|
102
|
-
rubocop
|
114
|
+
rubocop (>= 1)
|
103
115
|
smart_properties
|
104
|
-
erubi (1.
|
105
|
-
factory_bot (6.
|
116
|
+
erubi (1.13.0)
|
117
|
+
factory_bot (6.4.6)
|
106
118
|
activesupport (>= 5.0.0)
|
107
|
-
factory_bot_rails (6.
|
108
|
-
factory_bot (~> 6.
|
119
|
+
factory_bot_rails (6.4.3)
|
120
|
+
factory_bot (~> 6.4)
|
109
121
|
railties (>= 5.0.0)
|
110
|
-
ffi (1.
|
122
|
+
ffi (1.17.0)
|
111
123
|
ffi-compiler (1.3.2)
|
112
124
|
ffi (>= 1.15.5)
|
113
125
|
rake
|
@@ -115,8 +127,13 @@ GEM
|
|
115
127
|
activesupport (>= 6.1)
|
116
128
|
i18n (1.14.5)
|
117
129
|
concurrent-ruby (~> 1.0)
|
130
|
+
io-console (0.7.2)
|
131
|
+
irb (1.14.0)
|
132
|
+
rdoc (>= 4.0.0)
|
133
|
+
reline (>= 0.4.2)
|
118
134
|
json (2.7.2)
|
119
135
|
language_server-protocol (3.17.0.3)
|
136
|
+
logger (1.6.0)
|
120
137
|
loofah (2.22.0)
|
121
138
|
crass (~> 1.0.2)
|
122
139
|
nokogiri (>= 1.12.0)
|
@@ -126,11 +143,11 @@ GEM
|
|
126
143
|
net-pop
|
127
144
|
net-smtp
|
128
145
|
matrix (0.4.2)
|
129
|
-
method_source (1.
|
130
|
-
mini_mime (1.1.
|
131
|
-
mini_portile2 (2.8.
|
132
|
-
minitest (5.
|
133
|
-
net-imap (0.4.
|
146
|
+
method_source (1.1.0)
|
147
|
+
mini_mime (1.1.5)
|
148
|
+
mini_portile2 (2.8.7)
|
149
|
+
minitest (5.25.1)
|
150
|
+
net-imap (0.4.14)
|
134
151
|
date
|
135
152
|
net-protocol
|
136
153
|
net-pop (0.1.2)
|
@@ -139,21 +156,28 @@ GEM
|
|
139
156
|
timeout
|
140
157
|
net-smtp (0.5.0)
|
141
158
|
net-protocol
|
142
|
-
nokogiri (1.16.
|
159
|
+
nokogiri (1.16.7)
|
143
160
|
mini_portile2 (~> 2.8.2)
|
144
161
|
racc (~> 1.4)
|
145
|
-
parallel (1.
|
146
|
-
parser (3.3.
|
162
|
+
parallel (1.26.3)
|
163
|
+
parser (3.3.4.2)
|
147
164
|
ast (~> 2.4.1)
|
148
165
|
racc
|
149
|
-
pry (0.14.
|
166
|
+
pry (0.14.2)
|
150
167
|
coderay (~> 1.1)
|
151
168
|
method_source (~> 1.0)
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
169
|
+
psych (5.1.2)
|
170
|
+
stringio
|
171
|
+
public_suffix (6.0.1)
|
172
|
+
racc (1.8.1)
|
173
|
+
rack (3.1.7)
|
174
|
+
rack-session (2.0.0)
|
175
|
+
rack (>= 3.0.0)
|
176
|
+
rack-test (2.1.0)
|
177
|
+
rack (>= 1.3)
|
178
|
+
rackup (2.1.0)
|
179
|
+
rack (>= 3)
|
180
|
+
webrick (~> 1.8)
|
157
181
|
rails-controller-testing (1.0.5)
|
158
182
|
actionpack (>= 5.0.1.rc1)
|
159
183
|
actionview (>= 5.0.1.rc1)
|
@@ -165,62 +189,72 @@ GEM
|
|
165
189
|
rails-html-sanitizer (1.6.0)
|
166
190
|
loofah (~> 2.21)
|
167
191
|
nokogiri (~> 1.14)
|
168
|
-
railties (7.0
|
169
|
-
actionpack (= 7.0
|
170
|
-
activesupport (= 7.0
|
171
|
-
|
192
|
+
railties (7.2.0)
|
193
|
+
actionpack (= 7.2.0)
|
194
|
+
activesupport (= 7.2.0)
|
195
|
+
irb (~> 1.13)
|
196
|
+
rackup (>= 1.0.0)
|
172
197
|
rake (>= 12.2)
|
173
|
-
thor (~> 1.0)
|
174
|
-
zeitwerk (~> 2.
|
198
|
+
thor (~> 1.0, >= 1.2.2)
|
199
|
+
zeitwerk (~> 2.6)
|
175
200
|
rainbow (3.1.1)
|
176
|
-
rake (13.1
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
201
|
+
rake (13.2.1)
|
202
|
+
rdoc (6.7.0)
|
203
|
+
psych (>= 4.0.0)
|
204
|
+
regexp_parser (2.9.2)
|
205
|
+
reline (0.5.9)
|
206
|
+
io-console (~> 0.5)
|
207
|
+
rexml (3.3.5)
|
208
|
+
strscan
|
209
|
+
rspec-core (3.13.0)
|
210
|
+
rspec-support (~> 3.13.0)
|
211
|
+
rspec-expectations (3.13.1)
|
182
212
|
diff-lcs (>= 1.2.0, < 2.0)
|
183
|
-
rspec-support (~> 3.
|
184
|
-
rspec-mocks (3.
|
213
|
+
rspec-support (~> 3.13.0)
|
214
|
+
rspec-mocks (3.13.1)
|
185
215
|
diff-lcs (>= 1.2.0, < 2.0)
|
186
|
-
rspec-support (~> 3.
|
187
|
-
rspec-rails (
|
188
|
-
actionpack (>=
|
189
|
-
activesupport (>=
|
190
|
-
railties (>=
|
191
|
-
rspec-core (~> 3.
|
192
|
-
rspec-expectations (~> 3.
|
193
|
-
rspec-mocks (~> 3.
|
194
|
-
rspec-support (~> 3.
|
195
|
-
rspec-support (3.
|
196
|
-
rubocop (1.
|
216
|
+
rspec-support (~> 3.13.0)
|
217
|
+
rspec-rails (6.1.4)
|
218
|
+
actionpack (>= 6.1)
|
219
|
+
activesupport (>= 6.1)
|
220
|
+
railties (>= 6.1)
|
221
|
+
rspec-core (~> 3.13)
|
222
|
+
rspec-expectations (~> 3.13)
|
223
|
+
rspec-mocks (~> 3.13)
|
224
|
+
rspec-support (~> 3.13)
|
225
|
+
rspec-support (3.13.1)
|
226
|
+
rubocop (1.65.1)
|
197
227
|
json (~> 2.3)
|
198
228
|
language_server-protocol (>= 3.17.0)
|
199
229
|
parallel (~> 1.10)
|
200
230
|
parser (>= 3.3.0.2)
|
201
231
|
rainbow (>= 2.2.2, < 4.0)
|
202
|
-
regexp_parser (>=
|
232
|
+
regexp_parser (>= 2.4, < 3.0)
|
203
233
|
rexml (>= 3.2.5, < 4.0)
|
204
234
|
rubocop-ast (>= 1.31.1, < 2.0)
|
205
235
|
ruby-progressbar (~> 1.7)
|
206
236
|
unicode-display_width (>= 2.4.0, < 3.0)
|
207
|
-
rubocop-ast (1.
|
237
|
+
rubocop-ast (1.32.1)
|
208
238
|
parser (>= 3.3.1.0)
|
209
239
|
ruby-progressbar (1.13.0)
|
210
|
-
|
240
|
+
securerandom (0.3.1)
|
241
|
+
shoulda-matchers (6.4.0)
|
211
242
|
activesupport (>= 5.2.0)
|
212
243
|
smart_properties (1.17.0)
|
213
244
|
sqlite3 (1.7.3)
|
214
245
|
mini_portile2 (~> 2.8.0)
|
215
|
-
|
216
|
-
|
246
|
+
stringio (3.1.1)
|
247
|
+
strscan (3.1.0)
|
248
|
+
thor (1.3.1)
|
217
249
|
timeout (0.4.1)
|
218
250
|
tzinfo (2.0.6)
|
219
251
|
concurrent-ruby (~> 1.0)
|
220
252
|
unicode-display_width (2.5.0)
|
253
|
+
useragent (0.16.10)
|
254
|
+
webrick (1.8.1)
|
221
255
|
xpath (3.2.0)
|
222
256
|
nokogiri (~> 1.8)
|
223
|
-
zeitwerk (2.
|
257
|
+
zeitwerk (2.6.17)
|
224
258
|
|
225
259
|
PLATFORMS
|
226
260
|
ruby
|
@@ -240,7 +274,6 @@ DEPENDENCIES
|
|
240
274
|
rspec-rails
|
241
275
|
shoulda-matchers
|
242
276
|
sqlite3 (~> 1.7)
|
243
|
-
timecop
|
244
277
|
|
245
278
|
BUNDLED WITH
|
246
279
|
2.3.15
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ monitored by contributors.
|
|
18
18
|
|
19
19
|
## Getting Started
|
20
20
|
|
21
|
-
Clearance is a Rails engine tested against Rails `>=
|
21
|
+
Clearance is a Rails engine tested against Rails `>= 7.0` and Ruby `>= 3.1.6`.
|
22
22
|
|
23
23
|
You can add it to your Gemfile with:
|
24
24
|
|
@@ -49,6 +49,7 @@ Override any of these defaults in `config/initializers/clearance.rb`:
|
|
49
49
|
```ruby
|
50
50
|
Clearance.configure do |config|
|
51
51
|
config.allow_sign_up = true
|
52
|
+
config.allow_password_reset = true
|
52
53
|
config.cookie_domain = ".example.com"
|
53
54
|
config.cookie_expiration = lambda { |cookies| 1.year.from_now.utc }
|
54
55
|
config.cookie_name = "remember_token"
|
data/Rakefile
CHANGED
@@ -1,15 +1,12 @@
|
|
1
|
-
require "rubygems"
|
2
1
|
require "bundler/setup"
|
2
|
+
|
3
|
+
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
4
|
+
load "rails/tasks/engine.rake"
|
5
|
+
|
3
6
|
require "bundler/gem_tasks"
|
4
7
|
|
5
|
-
require "rake"
|
6
8
|
require "rspec/core/rake_task"
|
7
9
|
|
8
|
-
namespace :dummy do
|
9
|
-
require_relative "spec/dummy/application"
|
10
|
-
Dummy::Application.load_tasks
|
11
|
-
end
|
12
|
-
|
13
10
|
desc "Run specs other than spec/acceptance"
|
14
11
|
RSpec::Core::RakeTask.new("spec") do |task|
|
15
12
|
task.exclude_pattern = "spec/acceptance/**/*_spec.rb"
|
data/SECURITY.md
CHANGED
@@ -1,16 +1,20 @@
|
|
1
|
+
<!-- START /templates/security.md -->
|
1
2
|
# Security Policy
|
2
3
|
|
3
4
|
## Supported Versions
|
4
5
|
|
5
|
-
|
6
|
+
Only the the latest version of this project is supported at a given time. If
|
7
|
+
you find a security issue with an older version, please try updating to the
|
8
|
+
latest version first.
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
| 2.7.x | ✅ |
|
10
|
-
| 2.6.x | ✅ |
|
11
|
-
| 2.5.x | ✅ |
|
12
|
-
| < 2.5.0 | :x: |
|
10
|
+
If for some reason you can't update to the latest version, please let us know
|
11
|
+
your reasons so that we can have a better understanding of your situation.
|
13
12
|
|
14
13
|
## Reporting a Vulnerability
|
15
14
|
|
16
|
-
|
15
|
+
For security inquiries or vulnerability reports, visit
|
16
|
+
<https://thoughtbot.com/security>.
|
17
|
+
|
18
|
+
If you have any suggestions to improve this policy, visit <https://thoughtbot.com/security>.
|
19
|
+
|
20
|
+
<!-- END /templates/security.md -->
|
@@ -17,6 +17,8 @@
|
|
17
17
|
<% if Clearance.configuration.allow_sign_up? %>
|
18
18
|
<%= link_to t(".sign_up"), sign_up_path %>
|
19
19
|
<% end %>
|
20
|
-
|
20
|
+
<% if Clearance.configuration.allow_password_reset? %>
|
21
|
+
<%= link_to t(".forgot_password"), new_password_path %>
|
22
|
+
<% end %>
|
21
23
|
</div>
|
22
24
|
<% end %>
|
data/bin/setup
CHANGED
@@ -12,5 +12,5 @@ if [ -z "$CI" ]; then
|
|
12
12
|
fi
|
13
13
|
|
14
14
|
# Set up database for the application that Clearance tests against
|
15
|
-
RAILS_ENV=test bundle exec rake
|
16
|
-
RAILS_ENV=test bundle exec rake
|
15
|
+
RAILS_ENV=test bundle exec rake db:drop
|
16
|
+
RAILS_ENV=test bundle exec rake db:setup
|
data/clearance.gemspec
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
|
2
|
-
require 'clearance/version'
|
1
|
+
require_relative 'lib/clearance/version'
|
3
2
|
|
4
3
|
Gem::Specification.new do |s|
|
5
|
-
s.add_dependency 'bcrypt', '>= 3.1.1'
|
4
|
+
s.add_dependency 'bcrypt', '~> 3.1', '>= 3.1.1'
|
6
5
|
s.add_dependency 'argon2', '~> 2.0', '>= 2.0.2'
|
7
6
|
s.add_dependency 'email_validator', '~> 2.0'
|
8
|
-
s.add_dependency 'railties', '
|
9
|
-
s.add_dependency 'activemodel', '
|
10
|
-
s.add_dependency 'activerecord', '
|
11
|
-
s.add_dependency 'actionmailer', '
|
7
|
+
s.add_dependency 'railties', '~> 5.0'
|
8
|
+
s.add_dependency 'activemodel', '~> 5.0'
|
9
|
+
s.add_dependency 'activerecord', '~> 5.0'
|
10
|
+
s.add_dependency 'actionmailer', '~> 5.0'
|
12
11
|
s.authors = [
|
13
12
|
'Dan Croak',
|
14
13
|
'Eugene Bolshakov',
|
@@ -28,7 +27,8 @@ Gem::Specification.new do |s|
|
|
28
27
|
'Jason Morrison',
|
29
28
|
'Galen Frechette',
|
30
29
|
'Josh Steiner',
|
31
|
-
'Dorian Marié'
|
30
|
+
'Dorian Marié',
|
31
|
+
'Sara Jackson'
|
32
32
|
]
|
33
33
|
s.description = <<-DESCRIPTION
|
34
34
|
Clearance is built to support authentication and authorization via an
|
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
|
|
45
45
|
s.name = %q{clearance}
|
46
46
|
s.rdoc_options = ['--charset=UTF-8']
|
47
47
|
s.require_paths = ['lib']
|
48
|
-
s.required_ruby_version = Gem::Requirement.new('>=
|
48
|
+
s.required_ruby_version = Gem::Requirement.new('>= 3.1.6')
|
49
49
|
s.summary = 'Rails authentication & authorization with email & password.'
|
50
50
|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
51
51
|
s.version = Clearance::VERSION
|
data/config/routes.rb
CHANGED
@@ -11,9 +11,11 @@ if Clearance.configuration.routes_enabled?
|
|
11
11
|
resources :users,
|
12
12
|
controller: 'clearance/users',
|
13
13
|
only: Clearance.configuration.user_actions do
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
if Clearance.configuration.allow_password_reset?
|
15
|
+
resource :password,
|
16
|
+
controller: 'clearance/passwords',
|
17
|
+
only: [:edit, :update]
|
18
|
+
end
|
17
19
|
end
|
18
20
|
|
19
21
|
get '/sign_in' => 'clearance/sessions#new', as: 'sign_in'
|
data/gemfiles/rails_7.0.gemfile
CHANGED
@@ -15,7 +15,10 @@ gem "rails-controller-testing"
|
|
15
15
|
gem "rspec-rails"
|
16
16
|
gem "shoulda-matchers"
|
17
17
|
gem "sqlite3", "~> 1.7"
|
18
|
-
gem "timecop"
|
19
18
|
gem "railties", "~> 7.0.0"
|
19
|
+
gem "base64", require: false
|
20
|
+
gem "bigdecimal", require: false
|
21
|
+
gem "drb", require: false
|
22
|
+
gem "mutex_m", require: false
|
20
23
|
|
21
24
|
gemspec path: "../"
|