clearance 2.10.0 → 2.11.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/workflows/codeql.yml +39 -0
- data/.github/workflows/standardrb.yml +19 -0
- data/.github/workflows/tests.yml +4 -3
- data/Appraisals +1 -1
- data/CHANGELOG.md +21 -1
- data/CODEOWNERS +2 -0
- data/Gemfile +17 -14
- data/Gemfile.lock +117 -85
- data/README.md +1 -2
- data/Rakefile +1 -1
- data/app/controllers/clearance/passwords_controller.rb +6 -6
- data/app/mailers/clearance_mailer.rb +1 -1
- data/clearance.gemspec +38 -38
- data/config/routes.rb +7 -7
- data/gemfiles/rails_7.1.gemfile +3 -0
- data/gemfiles/rails_7.2.gemfile +3 -0
- data/gemfiles/rails_8.0.gemfile +5 -1
- data/lib/clearance/authentication.rb +4 -0
- data/lib/clearance/back_door.rb +3 -3
- data/lib/clearance/configuration.rb +6 -6
- data/lib/clearance/constraints.rb +2 -2
- data/lib/clearance/controller.rb +2 -2
- data/lib/clearance/default_sign_in_guard.rb +1 -1
- data/lib/clearance/password_strategies/bcrypt.rb +2 -2
- data/lib/clearance/session.rb +4 -6
- data/lib/clearance/sign_in_guard.rb +1 -1
- data/lib/clearance/testing/deny_access_matcher.rb +4 -4
- data/lib/clearance/token.rb +1 -1
- data/lib/clearance/user.rb +7 -7
- data/lib/clearance/version.rb +1 -1
- data/lib/clearance.rb +10 -10
- data/lib/generators/clearance/install/install_generator.rb +15 -15
- data/lib/generators/clearance/routes/routes_generator.rb +5 -5
- data/lib/generators/clearance/routes/templates/routes.rb +10 -10
- data/lib/generators/clearance/specs/specs_generator.rb +4 -4
- data/lib/generators/clearance/views/views_generator.rb +4 -4
- data/spec/acceptance/clearance_installation_spec.rb +3 -3
- data/spec/clearance/back_door_spec.rb +5 -5
- data/spec/clearance/constraints/signed_in_spec.rb +14 -14
- data/spec/clearance/constraints/signed_out_spec.rb +4 -4
- data/spec/clearance/default_sign_in_guard_spec.rb +6 -6
- data/spec/clearance/rack_session_spec.rb +9 -9
- data/spec/clearance/session_spec.rb +60 -62
- data/spec/clearance/sign_in_guard_spec.rb +7 -7
- data/spec/clearance/testing/controller_helpers_spec.rb +15 -14
- data/spec/clearance/testing/deny_access_matcher_spec.rb +1 -1
- data/spec/clearance/testing/view_helpers_spec.rb +2 -2
- data/spec/clearance/token_spec.rb +3 -3
- data/spec/configuration_spec.rb +8 -21
- data/spec/controllers/apis_controller_spec.rb +2 -2
- data/spec/controllers/forgeries_controller_spec.rb +12 -12
- data/spec/controllers/passwords_controller_spec.rb +25 -25
- data/spec/controllers/permissions_controller_spec.rb +12 -12
- data/spec/controllers/sessions_controller_spec.rb +6 -6
- data/spec/controllers/users_controller_spec.rb +5 -5
- data/spec/dummy/config/environments/test.rb +3 -3
- data/spec/factories/users.rb +3 -3
- data/spec/generators/clearance/install/install_generator_spec.rb +11 -11
- data/spec/generators/clearance/routes/routes_generator_spec.rb +1 -1
- data/spec/generators/clearance/specs/specs_generator_spec.rb +2 -2
- data/spec/generators/clearance/views/views_generator_spec.rb +2 -2
- data/spec/mailers/clearance_mailer_spec.rb +3 -2
- data/spec/models/user_spec.rb +2 -2
- data/spec/password_strategies/argon2_spec.rb +3 -3
- data/spec/password_strategies/bcrypt_spec.rb +4 -4
- data/spec/password_strategies/password_strategies_spec.rb +1 -1
- data/spec/requests/authentication_cookie_spec.rb +3 -3
- data/spec/requests/backdoor_spec.rb +1 -1
- data/spec/requests/cookie_options_spec.rb +2 -2
- data/spec/requests/csrf_rotation_spec.rb +1 -1
- data/spec/requests/password_maintenance_spec.rb +1 -1
- data/spec/requests/token_expiration_spec.rb +2 -2
- data/spec/routing/clearance_routes_spec.rb +36 -36
- data/spec/support/clearance.rb +1 -1
- data/spec/support/fake_model_without_password_strategy.rb +5 -2
- data/spec/support/generator_spec_helpers.rb +2 -2
- data/spec/support/request_with_remember_token.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba8d0e578c8ea2e05b8371d4f7c454a471b3d4453c966c78c6f5c86a456578b1
|
4
|
+
data.tar.gz: 547e6a373627223859c02542ae64436d6153253917c8c06fd959dbc322b556f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1531128089a20a6519a78dd10dd9143d511a35d1d8acdb6abe610767aec6f373e98314b8f0f2e57640a97f528601ff0861e1345ed63cdaf32d927a4562bd817e
|
7
|
+
data.tar.gz: abacb24d88a4a88915a502a85570f15ab32e7a2e60f7f4a6bcafd7c4cceef52122067bebafa656bec13370046a984b3756930a6ff7c86eb94f8fe8780ec6389d
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: "CodeQL Advanced"
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "main" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "main" ]
|
8
|
+
schedule:
|
9
|
+
- cron: '21 23 * * 1'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
analyze:
|
13
|
+
name: Analyze (${{ matrix.language }})
|
14
|
+
runs-on: 'ubuntu-latest'
|
15
|
+
permissions:
|
16
|
+
security-events: write
|
17
|
+
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
include:
|
22
|
+
- language: actions
|
23
|
+
build-mode: none
|
24
|
+
- language: ruby
|
25
|
+
build-mode: none
|
26
|
+
steps:
|
27
|
+
- name: Checkout repository
|
28
|
+
uses: actions/checkout@v5
|
29
|
+
|
30
|
+
- name: Initialize CodeQL
|
31
|
+
uses: github/codeql-action/init@v3
|
32
|
+
with:
|
33
|
+
languages: ${{ matrix.language }}
|
34
|
+
build-mode: ${{ matrix.build-mode }}
|
35
|
+
|
36
|
+
- name: Perform CodeQL Analysis
|
37
|
+
uses: github/codeql-action/analyze@v3
|
38
|
+
with:
|
39
|
+
category: "/language:${{matrix.language}}"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: Run Linter
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: "main"
|
6
|
+
pull_request:
|
7
|
+
branches: "*"
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
standardrb:
|
11
|
+
name: StandardRB
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v5
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
bundler-cache: true
|
18
|
+
ruby-version: 3.2.9
|
19
|
+
- run: bundle exec standardrb --format github --parallel
|
data/.github/workflows/tests.yml
CHANGED
@@ -20,15 +20,16 @@ jobs:
|
|
20
20
|
- "7.2"
|
21
21
|
- "8.0"
|
22
22
|
ruby:
|
23
|
-
- "3.2.
|
24
|
-
- "3.3.
|
23
|
+
- "3.2.9"
|
24
|
+
- "3.3.9"
|
25
|
+
- "3.4.5"
|
25
26
|
|
26
27
|
env:
|
27
28
|
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile
|
28
29
|
RAILS_ENV: test
|
29
30
|
|
30
31
|
steps:
|
31
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v5
|
32
33
|
|
33
34
|
- name: "Install Ruby ${{ matrix.ruby }}"
|
34
35
|
uses: ruby/setup-ruby@v1
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,27 @@ 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.11.0...main
|
9
|
+
|
10
|
+
## [2.11.0] - September 26, 2025
|
11
|
+
- Bump actions/checkout from 4 to 5 for tests workflow (#1051)
|
12
|
+
- Bump nokogiri from 1.18.6 to 1.18.9 (#1052)
|
13
|
+
- Bump Ruby 3.2.8 to 3.2.9 (#1053)
|
14
|
+
- Bump Ruby 3.3.7 to 3.3.9 (#1053)
|
15
|
+
- Add support for Ruby 3.4.5 (#1053)
|
16
|
+
- Add Standardrb (#1021) Mina Slater, Sara Jackson, and Fernando Perales
|
17
|
+
- Add code quality workflow (#1033) Sara Jackson and Fernando Perales
|
18
|
+
- Use latest version of code scanning (#1054)
|
19
|
+
- Update CodeQL settings: (#1055)
|
20
|
+
- Bump actions/checkout from 4 to 5 for standardrb workflow (#1056)
|
21
|
+
- Bump rspec-rails from 5.1.2 to 8.0.2 (#1057)
|
22
|
+
- Bump sqlite3 from 1.7.3 to 2.7.4 (#1062)
|
23
|
+
- Bump pry from 0.14.1 to 0.15.2 (#1059)
|
24
|
+
- Bump ammeter from 1.1.5 to 1.1.7 (#1060)
|
25
|
+
- Bump ffi from 1.16.3 to 1.17.2
|
26
|
+
- Bump net-imap from 0.4.14 to 0.4.20 (#1063)
|
27
|
+
|
28
|
+
[2.11.0]: https://github.com/thoughtbot/clearance/compare/v2.10.0...v2.11.0
|
9
29
|
|
10
30
|
## [2.10.0] - March 28, 2025
|
11
31
|
- Drop support for Rails 7.0 and Ruby 3.1 (#1045)
|
data/CODEOWNERS
CHANGED
data/Gemfile
CHANGED
@@ -1,17 +1,20 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
15
|
-
gem
|
16
|
-
gem
|
17
|
-
gem
|
5
|
+
gem "addressable"
|
6
|
+
gem "ammeter"
|
7
|
+
gem "appraisal"
|
8
|
+
gem "capybara"
|
9
|
+
gem "database_cleaner"
|
10
|
+
gem "erb_lint", require: false
|
11
|
+
gem "factory_bot_rails"
|
12
|
+
gem "ffi", "< 1.18.0"
|
13
|
+
gem "nokogiri"
|
14
|
+
gem "pry", require: false
|
15
|
+
gem "rails-controller-testing"
|
16
|
+
gem "rspec-rails"
|
17
|
+
gem "shoulda-matchers"
|
18
|
+
gem "sqlite3", "~> 2.7"
|
19
|
+
gem "standard", ">= 1.35.1", require: false
|
20
|
+
gem "timecop"
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
clearance (2.
|
4
|
+
clearance (2.11.0)
|
5
5
|
actionmailer (>= 5.0)
|
6
6
|
activemodel (>= 5.0)
|
7
7
|
activerecord (>= 5.0)
|
@@ -13,16 +13,16 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
actionmailer (7.2.
|
17
|
-
actionpack (= 7.2.
|
18
|
-
actionview (= 7.2.
|
19
|
-
activejob (= 7.2.
|
20
|
-
activesupport (= 7.2.
|
16
|
+
actionmailer (7.2.2.2)
|
17
|
+
actionpack (= 7.2.2.2)
|
18
|
+
actionview (= 7.2.2.2)
|
19
|
+
activejob (= 7.2.2.2)
|
20
|
+
activesupport (= 7.2.2.2)
|
21
21
|
mail (>= 2.8.0)
|
22
22
|
rails-dom-testing (~> 2.2)
|
23
|
-
actionpack (7.2.
|
24
|
-
actionview (= 7.2.
|
25
|
-
activesupport (= 7.2.
|
23
|
+
actionpack (7.2.2.2)
|
24
|
+
actionview (= 7.2.2.2)
|
25
|
+
activesupport (= 7.2.2.2)
|
26
26
|
nokogiri (>= 1.8.5)
|
27
27
|
racc
|
28
28
|
rack (>= 2.2.4, < 3.2)
|
@@ -31,23 +31,24 @@ GEM
|
|
31
31
|
rails-dom-testing (~> 2.2)
|
32
32
|
rails-html-sanitizer (~> 1.6)
|
33
33
|
useragent (~> 0.16)
|
34
|
-
actionview (7.2.
|
35
|
-
activesupport (= 7.2.
|
34
|
+
actionview (7.2.2.2)
|
35
|
+
activesupport (= 7.2.2.2)
|
36
36
|
builder (~> 3.1)
|
37
37
|
erubi (~> 1.11)
|
38
38
|
rails-dom-testing (~> 2.2)
|
39
39
|
rails-html-sanitizer (~> 1.6)
|
40
|
-
activejob (7.2.
|
41
|
-
activesupport (= 7.2.
|
40
|
+
activejob (7.2.2.2)
|
41
|
+
activesupport (= 7.2.2.2)
|
42
42
|
globalid (>= 0.3.6)
|
43
|
-
activemodel (7.2.
|
44
|
-
activesupport (= 7.2.
|
45
|
-
activerecord (7.2.
|
46
|
-
activemodel (= 7.2.
|
47
|
-
activesupport (= 7.2.
|
43
|
+
activemodel (7.2.2.2)
|
44
|
+
activesupport (= 7.2.2.2)
|
45
|
+
activerecord (7.2.2.2)
|
46
|
+
activemodel (= 7.2.2.2)
|
47
|
+
activesupport (= 7.2.2.2)
|
48
48
|
timeout (>= 0.4.0)
|
49
|
-
activesupport (7.2.
|
49
|
+
activesupport (7.2.2.2)
|
50
50
|
base64
|
51
|
+
benchmark (>= 0.3)
|
51
52
|
bigdecimal
|
52
53
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
53
54
|
connection_pool (>= 2.2.5)
|
@@ -70,9 +71,10 @@ GEM
|
|
70
71
|
argon2 (2.3.2)
|
71
72
|
ffi (~> 1.15)
|
72
73
|
ffi-compiler (~> 1.0)
|
73
|
-
ast (2.4.
|
74
|
-
base64 (0.
|
74
|
+
ast (2.4.2)
|
75
|
+
base64 (0.3.0)
|
75
76
|
bcrypt (3.1.20)
|
77
|
+
benchmark (0.4.1)
|
76
78
|
better_html (2.1.1)
|
77
79
|
actionview (>= 6.0)
|
78
80
|
activesupport (>= 6.0)
|
@@ -80,7 +82,7 @@ GEM
|
|
80
82
|
erubi (~> 1.4)
|
81
83
|
parser (>= 2.4)
|
82
84
|
smart_properties
|
83
|
-
bigdecimal (3.
|
85
|
+
bigdecimal (3.2.3)
|
84
86
|
builder (3.3.0)
|
85
87
|
capybara (3.40.0)
|
86
88
|
addressable
|
@@ -91,21 +93,24 @@ GEM
|
|
91
93
|
rack-test (>= 0.6.3)
|
92
94
|
regexp_parser (>= 1.5, < 3.0)
|
93
95
|
xpath (~> 3.2)
|
96
|
+
cgi (0.5.0)
|
94
97
|
coderay (1.1.3)
|
95
98
|
concurrent-ruby (1.3.5)
|
96
|
-
connection_pool (2.5.
|
99
|
+
connection_pool (2.5.4)
|
97
100
|
crass (1.0.6)
|
98
|
-
database_cleaner (2.0.
|
99
|
-
database_cleaner-active_record (
|
100
|
-
database_cleaner-active_record (2.
|
101
|
+
database_cleaner (2.0.1)
|
102
|
+
database_cleaner-active_record (~> 2.0.0)
|
103
|
+
database_cleaner-active_record (2.0.1)
|
101
104
|
activerecord (>= 5.a)
|
102
105
|
database_cleaner-core (~> 2.0.0)
|
103
106
|
database_cleaner-core (2.0.1)
|
104
107
|
date (3.4.1)
|
105
|
-
diff-lcs (1.
|
106
|
-
drb (2.2.
|
108
|
+
diff-lcs (1.6.2)
|
109
|
+
drb (2.2.3)
|
107
110
|
email_validator (2.2.4)
|
108
111
|
activemodel
|
112
|
+
erb (4.0.4)
|
113
|
+
cgi (>= 0.3.3)
|
109
114
|
erb_lint (0.9.0)
|
110
115
|
activesupport
|
111
116
|
better_html (>= 2.0.1)
|
@@ -114,12 +119,13 @@ GEM
|
|
114
119
|
rubocop (>= 1)
|
115
120
|
smart_properties
|
116
121
|
erubi (1.13.1)
|
117
|
-
factory_bot (6.
|
118
|
-
activesupport (>=
|
119
|
-
factory_bot_rails (6.
|
120
|
-
factory_bot (~> 6.
|
121
|
-
railties (>=
|
122
|
-
ffi (1.17.
|
122
|
+
factory_bot (6.5.5)
|
123
|
+
activesupport (>= 6.1.0)
|
124
|
+
factory_bot_rails (6.5.1)
|
125
|
+
factory_bot (~> 6.5)
|
126
|
+
railties (>= 6.1.0)
|
127
|
+
ffi (1.17.2-arm64-darwin)
|
128
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
123
129
|
ffi-compiler (1.3.2)
|
124
130
|
ffi (>= 1.15.5)
|
125
131
|
rake
|
@@ -127,15 +133,16 @@ GEM
|
|
127
133
|
activesupport (>= 6.1)
|
128
134
|
i18n (1.14.7)
|
129
135
|
concurrent-ruby (~> 1.0)
|
130
|
-
io-console (0.
|
131
|
-
irb (1.
|
136
|
+
io-console (0.8.1)
|
137
|
+
irb (1.15.2)
|
138
|
+
pp (>= 0.6.0)
|
132
139
|
rdoc (>= 4.0.0)
|
133
140
|
reline (>= 0.4.2)
|
134
|
-
json (2.
|
135
|
-
language_server-protocol (3.17.0.
|
141
|
+
json (2.13.2)
|
142
|
+
language_server-protocol (3.17.0.5)
|
136
143
|
lint_roller (1.1.0)
|
137
144
|
logger (1.7.0)
|
138
|
-
loofah (2.24.
|
145
|
+
loofah (2.24.1)
|
139
146
|
crass (~> 1.0.2)
|
140
147
|
nokogiri (>= 1.12.0)
|
141
148
|
mail (2.8.1)
|
@@ -143,12 +150,11 @@ GEM
|
|
143
150
|
net-imap
|
144
151
|
net-pop
|
145
152
|
net-smtp
|
146
|
-
matrix (0.4.
|
153
|
+
matrix (0.4.3)
|
147
154
|
method_source (1.1.0)
|
148
155
|
mini_mime (1.1.5)
|
149
|
-
mini_portile2 (2.8.8)
|
150
156
|
minitest (5.25.5)
|
151
|
-
net-imap (0.
|
157
|
+
net-imap (0.4.20)
|
152
158
|
date
|
153
159
|
net-protocol
|
154
160
|
net-pop (0.1.2)
|
@@ -157,73 +163,79 @@ GEM
|
|
157
163
|
timeout
|
158
164
|
net-smtp (0.5.1)
|
159
165
|
net-protocol
|
160
|
-
nokogiri (1.18.
|
161
|
-
|
166
|
+
nokogiri (1.18.9-arm64-darwin)
|
167
|
+
racc (~> 1.4)
|
168
|
+
nokogiri (1.18.9-x86_64-linux-gnu)
|
162
169
|
racc (~> 1.4)
|
163
|
-
parallel (1.
|
170
|
+
parallel (1.27.0)
|
164
171
|
parser (3.3.7.3)
|
165
172
|
ast (~> 2.4.1)
|
166
173
|
racc
|
174
|
+
pp (0.6.2)
|
175
|
+
prettyprint
|
176
|
+
prettyprint (0.2.0)
|
167
177
|
prism (1.4.0)
|
168
|
-
pry (0.
|
178
|
+
pry (0.15.2)
|
169
179
|
coderay (~> 1.1)
|
170
180
|
method_source (~> 1.0)
|
171
|
-
psych (5.
|
181
|
+
psych (5.2.6)
|
182
|
+
date
|
172
183
|
stringio
|
173
|
-
public_suffix (6.0.
|
184
|
+
public_suffix (6.0.2)
|
174
185
|
racc (1.8.1)
|
175
|
-
rack (3.1.
|
176
|
-
rack-session (2.
|
186
|
+
rack (3.1.16)
|
187
|
+
rack-session (2.1.1)
|
188
|
+
base64 (>= 0.1.0)
|
177
189
|
rack (>= 3.0.0)
|
178
|
-
rack-test (2.
|
190
|
+
rack-test (2.2.0)
|
179
191
|
rack (>= 1.3)
|
180
|
-
rackup (2.1
|
192
|
+
rackup (2.2.1)
|
181
193
|
rack (>= 3)
|
182
|
-
webrick (~> 1.8)
|
183
194
|
rails-controller-testing (1.0.5)
|
184
195
|
actionpack (>= 5.0.1.rc1)
|
185
196
|
actionview (>= 5.0.1.rc1)
|
186
197
|
activesupport (>= 5.0.1.rc1)
|
187
|
-
rails-dom-testing (2.
|
198
|
+
rails-dom-testing (2.3.0)
|
188
199
|
activesupport (>= 5.0.0)
|
189
200
|
minitest
|
190
201
|
nokogiri (>= 1.6)
|
191
202
|
rails-html-sanitizer (1.6.2)
|
192
203
|
loofah (~> 2.21)
|
193
204
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
194
|
-
railties (7.2.
|
195
|
-
actionpack (= 7.2.
|
196
|
-
activesupport (= 7.2.
|
205
|
+
railties (7.2.2.2)
|
206
|
+
actionpack (= 7.2.2.2)
|
207
|
+
activesupport (= 7.2.2.2)
|
197
208
|
irb (~> 1.13)
|
198
209
|
rackup (>= 1.0.0)
|
199
210
|
rake (>= 12.2)
|
200
211
|
thor (~> 1.0, >= 1.2.2)
|
201
212
|
zeitwerk (~> 2.6)
|
202
213
|
rainbow (3.1.1)
|
203
|
-
rake (13.
|
204
|
-
rdoc (6.
|
214
|
+
rake (13.3.0)
|
215
|
+
rdoc (6.14.2)
|
216
|
+
erb
|
205
217
|
psych (>= 4.0.0)
|
206
|
-
regexp_parser (2.
|
207
|
-
reline (0.
|
218
|
+
regexp_parser (2.11.2)
|
219
|
+
reline (0.6.2)
|
208
220
|
io-console (~> 0.5)
|
209
|
-
rspec-core (3.13.
|
221
|
+
rspec-core (3.13.5)
|
210
222
|
rspec-support (~> 3.13.0)
|
211
|
-
rspec-expectations (3.13.
|
223
|
+
rspec-expectations (3.13.5)
|
212
224
|
diff-lcs (>= 1.2.0, < 2.0)
|
213
225
|
rspec-support (~> 3.13.0)
|
214
|
-
rspec-mocks (3.13.
|
226
|
+
rspec-mocks (3.13.5)
|
215
227
|
diff-lcs (>= 1.2.0, < 2.0)
|
216
228
|
rspec-support (~> 3.13.0)
|
217
|
-
rspec-rails (
|
218
|
-
actionpack (>=
|
219
|
-
activesupport (>=
|
220
|
-
railties (>=
|
229
|
+
rspec-rails (8.0.2)
|
230
|
+
actionpack (>= 7.2)
|
231
|
+
activesupport (>= 7.2)
|
232
|
+
railties (>= 7.2)
|
221
233
|
rspec-core (~> 3.13)
|
222
234
|
rspec-expectations (~> 3.13)
|
223
235
|
rspec-mocks (~> 3.13)
|
224
236
|
rspec-support (~> 3.13)
|
225
|
-
rspec-support (3.13.
|
226
|
-
rubocop (1.75.
|
237
|
+
rspec-support (3.13.6)
|
238
|
+
rubocop (1.75.8)
|
227
239
|
json (~> 2.3)
|
228
240
|
language_server-protocol (~> 3.17.0.2)
|
229
241
|
lint_roller (~> 1.1.0)
|
@@ -231,35 +243,52 @@ GEM
|
|
231
243
|
parser (>= 3.3.0.2)
|
232
244
|
rainbow (>= 2.2.2, < 4.0)
|
233
245
|
regexp_parser (>= 2.9.3, < 3.0)
|
234
|
-
rubocop-ast (>= 1.
|
246
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
235
247
|
ruby-progressbar (~> 1.7)
|
236
248
|
unicode-display_width (>= 2.4.0, < 4.0)
|
237
|
-
rubocop-ast (1.
|
249
|
+
rubocop-ast (1.46.0)
|
238
250
|
parser (>= 3.3.7.2)
|
239
251
|
prism (~> 1.4)
|
252
|
+
rubocop-performance (1.25.0)
|
253
|
+
lint_roller (~> 1.1)
|
254
|
+
rubocop (>= 1.75.0, < 2.0)
|
255
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
240
256
|
ruby-progressbar (1.13.0)
|
241
257
|
securerandom (0.4.1)
|
242
|
-
shoulda-matchers (
|
258
|
+
shoulda-matchers (5.1.0)
|
243
259
|
activesupport (>= 5.2.0)
|
244
260
|
smart_properties (1.17.0)
|
245
|
-
sqlite3 (
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
261
|
+
sqlite3 (2.7.4-arm64-darwin)
|
262
|
+
sqlite3 (2.7.4-x86_64-linux-gnu)
|
263
|
+
standard (1.50.0)
|
264
|
+
language_server-protocol (~> 3.17.0.2)
|
265
|
+
lint_roller (~> 1.0)
|
266
|
+
rubocop (~> 1.75.5)
|
267
|
+
standard-custom (~> 1.0.0)
|
268
|
+
standard-performance (~> 1.8)
|
269
|
+
standard-custom (1.0.2)
|
270
|
+
lint_roller (~> 1.0)
|
271
|
+
rubocop (~> 1.50)
|
272
|
+
standard-performance (1.8.0)
|
273
|
+
lint_roller (~> 1.1)
|
274
|
+
rubocop-performance (~> 1.25.0)
|
275
|
+
stringio (3.1.7)
|
276
|
+
thor (1.4.0)
|
277
|
+
timecop (0.9.5)
|
278
|
+
timeout (0.4.3)
|
250
279
|
tzinfo (2.0.6)
|
251
280
|
concurrent-ruby (~> 1.0)
|
252
|
-
unicode-display_width (3.1.
|
281
|
+
unicode-display_width (3.1.5)
|
253
282
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
254
283
|
unicode-emoji (4.0.4)
|
255
|
-
useragent (0.16.
|
256
|
-
webrick (1.8.1)
|
284
|
+
useragent (0.16.11)
|
257
285
|
xpath (3.2.0)
|
258
286
|
nokogiri (~> 1.8)
|
259
|
-
zeitwerk (2.6.
|
287
|
+
zeitwerk (2.6.18)
|
260
288
|
|
261
289
|
PLATFORMS
|
262
|
-
|
290
|
+
arm64-darwin-24
|
291
|
+
x86_64-linux
|
263
292
|
|
264
293
|
DEPENDENCIES
|
265
294
|
addressable
|
@@ -270,12 +299,15 @@ DEPENDENCIES
|
|
270
299
|
database_cleaner
|
271
300
|
erb_lint
|
272
301
|
factory_bot_rails
|
302
|
+
ffi (< 1.18.0)
|
273
303
|
nokogiri
|
274
304
|
pry
|
275
305
|
rails-controller-testing
|
276
306
|
rspec-rails
|
277
307
|
shoulda-matchers
|
278
|
-
sqlite3 (~>
|
308
|
+
sqlite3 (~> 2.7)
|
309
|
+
standard (>= 1.35.1)
|
310
|
+
timecop
|
279
311
|
|
280
312
|
BUNDLED WITH
|
281
|
-
2.
|
313
|
+
2.5.6
|
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 `>= 7.1` and Ruby `>= 3.2.
|
21
|
+
Clearance is a Rails engine tested against Rails `>= 7.1` and Ruby `>= 3.2.9`.
|
22
22
|
|
23
23
|
You can add it to your Gemfile with:
|
24
24
|
|
@@ -511,5 +511,4 @@ We are [available for hire][hire].
|
|
511
511
|
[community]: https://thoughtbot.com/community?utm_source=github
|
512
512
|
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
513
513
|
|
514
|
-
|
515
514
|
<!-- END /templates/footer.md -->
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "active_support/deprecation"
|
2
2
|
|
3
3
|
class Clearance::PasswordsController < Clearance::BaseController
|
4
4
|
before_action :ensure_existing_user, only: [:edit, :update]
|
@@ -10,7 +10,7 @@ class Clearance::PasswordsController < Clearance::BaseController
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def create
|
13
|
-
if user = find_user_for_create
|
13
|
+
if (user = find_user_for_create)
|
14
14
|
user.forgot_password!
|
15
15
|
deliver_email(user)
|
16
16
|
end
|
@@ -56,8 +56,8 @@ class Clearance::PasswordsController < Clearance::BaseController
|
|
56
56
|
user_param = Clearance.configuration.user_id_parameter
|
57
57
|
token = params[:token] || session[:password_reset_token]
|
58
58
|
|
59
|
-
Clearance.configuration.user_model
|
60
|
-
find_by(id: params[user_param], confirmation_token: token.to_s)
|
59
|
+
Clearance.configuration.user_model
|
60
|
+
.find_by(id: params[user_param], confirmation_token: token.to_s)
|
61
61
|
end
|
62
62
|
|
63
63
|
def email_from_password_params
|
@@ -65,8 +65,8 @@ class Clearance::PasswordsController < Clearance::BaseController
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def find_user_for_create
|
68
|
-
Clearance.configuration.user_model
|
69
|
-
find_by_normalized_email(email_from_password_params)
|
68
|
+
Clearance.configuration.user_model
|
69
|
+
.find_by_normalized_email(email_from_password_params)
|
70
70
|
end
|
71
71
|
|
72
72
|
def find_user_for_edit
|