clearance 2.9.3 → 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 -8
- data/Appraisals +1 -10
- data/CHANGELOG.md +26 -1
- data/CODEOWNERS +2 -0
- data/Gemfile +17 -14
- data/Gemfile.lock +139 -105
- 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 +31 -31
- data/spec/controllers/permissions_controller_spec.rb +13 -13
- data/spec/controllers/sessions_controller_spec.rb +7 -7
- 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 -5
- data/gemfiles/rails_7.0.gemfile +0 -24
- data/spec/support/html_escape_helper.rb +0 -13
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
@@ -16,24 +16,20 @@ jobs:
|
|
16
16
|
fail-fast: false
|
17
17
|
matrix:
|
18
18
|
gemfile:
|
19
|
-
- "7.0"
|
20
19
|
- "7.1"
|
21
20
|
- "7.2"
|
22
21
|
- "8.0"
|
23
22
|
ruby:
|
24
|
-
- "3.
|
25
|
-
- "3.
|
26
|
-
- "3.
|
27
|
-
exclude:
|
28
|
-
- ruby: "3.1.6"
|
29
|
-
gemfile: "8.0"
|
23
|
+
- "3.2.9"
|
24
|
+
- "3.3.9"
|
25
|
+
- "3.4.5"
|
30
26
|
|
31
27
|
env:
|
32
28
|
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile
|
33
29
|
RAILS_ENV: test
|
34
30
|
|
35
31
|
steps:
|
36
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v5
|
37
33
|
|
38
34
|
- name: "Install Ruby ${{ matrix.ruby }}"
|
39
35
|
uses: ruby/setup-ruby@v1
|
data/Appraisals
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
appraise "rails_7.0" do
|
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
|
-
end
|
9
|
-
|
10
1
|
appraise "rails_7.1" do
|
11
2
|
gem "railties", "~> 7.1.0"
|
12
3
|
end
|
@@ -17,5 +8,5 @@ end
|
|
17
8
|
|
18
9
|
appraise "rails_8.0" do
|
19
10
|
gem "railties", "~> 8.0.0"
|
20
|
-
gem
|
11
|
+
gem "sqlite3", ">= 2.1"
|
21
12
|
end
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,32 @@ 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
|
29
|
+
|
30
|
+
## [2.10.0] - March 28, 2025
|
31
|
+
- Drop support for Rails 7.0 and Ruby 3.1 (#1045)
|
32
|
+
|
33
|
+
[2.10.0]: https://github.com/thoughtbot/clearance/compare/v2.9.3...v2.10.0
|
9
34
|
|
10
35
|
## [2.9.3] - November 26, 2024
|
11
36
|
- Add Rails 8 to testing matrix (#1038) Hamed Asghari
|
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)
|
@@ -67,12 +68,13 @@ GEM
|
|
67
68
|
bundler
|
68
69
|
rake
|
69
70
|
thor (>= 0.14.0)
|
70
|
-
argon2 (2.3.
|
71
|
+
argon2 (2.3.2)
|
71
72
|
ffi (~> 1.15)
|
72
73
|
ffi-compiler (~> 1.0)
|
73
74
|
ast (2.4.2)
|
74
|
-
base64 (0.
|
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,50 +93,56 @@ 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
|
-
concurrent-ruby (1.3.
|
96
|
-
connection_pool (2.4
|
98
|
+
concurrent-ruby (1.3.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
|
-
date (3.4.
|
105
|
-
diff-lcs (1.
|
106
|
-
drb (2.2.
|
107
|
+
date (3.4.1)
|
108
|
+
diff-lcs (1.6.2)
|
109
|
+
drb (2.2.3)
|
107
110
|
email_validator (2.2.4)
|
108
111
|
activemodel
|
109
|
-
|
112
|
+
erb (4.0.4)
|
113
|
+
cgi (>= 0.3.3)
|
114
|
+
erb_lint (0.9.0)
|
110
115
|
activesupport
|
111
116
|
better_html (>= 2.0.1)
|
112
117
|
parser (>= 2.7.1.4)
|
113
118
|
rainbow
|
114
119
|
rubocop (>= 1)
|
115
120
|
smart_properties
|
116
|
-
erubi (1.13.
|
117
|
-
factory_bot (6.
|
118
|
-
activesupport (>=
|
119
|
-
factory_bot_rails (6.
|
120
|
-
factory_bot (~> 6.
|
121
|
-
railties (>=
|
122
|
-
ffi (1.17.
|
121
|
+
erubi (1.13.1)
|
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
|
126
132
|
globalid (1.2.1)
|
127
133
|
activesupport (>= 6.1)
|
128
|
-
i18n (1.14.
|
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.
|
136
|
-
|
137
|
-
|
141
|
+
json (2.13.2)
|
142
|
+
language_server-protocol (3.17.0.5)
|
143
|
+
lint_roller (1.1.0)
|
144
|
+
logger (1.7.0)
|
145
|
+
loofah (2.24.1)
|
138
146
|
crass (~> 1.0.2)
|
139
147
|
nokogiri (>= 1.12.0)
|
140
148
|
mail (2.8.1)
|
@@ -142,122 +150,145 @@ GEM
|
|
142
150
|
net-imap
|
143
151
|
net-pop
|
144
152
|
net-smtp
|
145
|
-
matrix (0.4.
|
153
|
+
matrix (0.4.3)
|
146
154
|
method_source (1.1.0)
|
147
155
|
mini_mime (1.1.5)
|
148
|
-
|
149
|
-
|
150
|
-
net-imap (0.5.1)
|
156
|
+
minitest (5.25.5)
|
157
|
+
net-imap (0.4.20)
|
151
158
|
date
|
152
159
|
net-protocol
|
153
160
|
net-pop (0.1.2)
|
154
161
|
net-protocol
|
155
162
|
net-protocol (0.2.2)
|
156
163
|
timeout
|
157
|
-
net-smtp (0.5.
|
164
|
+
net-smtp (0.5.1)
|
158
165
|
net-protocol
|
159
|
-
nokogiri (1.
|
160
|
-
|
166
|
+
nokogiri (1.18.9-arm64-darwin)
|
167
|
+
racc (~> 1.4)
|
168
|
+
nokogiri (1.18.9-x86_64-linux-gnu)
|
161
169
|
racc (~> 1.4)
|
162
|
-
parallel (1.
|
163
|
-
parser (3.3.
|
170
|
+
parallel (1.27.0)
|
171
|
+
parser (3.3.7.3)
|
164
172
|
ast (~> 2.4.1)
|
165
173
|
racc
|
166
|
-
|
174
|
+
pp (0.6.2)
|
175
|
+
prettyprint
|
176
|
+
prettyprint (0.2.0)
|
177
|
+
prism (1.4.0)
|
178
|
+
pry (0.15.2)
|
167
179
|
coderay (~> 1.1)
|
168
180
|
method_source (~> 1.0)
|
169
|
-
psych (5.
|
181
|
+
psych (5.2.6)
|
182
|
+
date
|
170
183
|
stringio
|
171
|
-
public_suffix (6.0.
|
184
|
+
public_suffix (6.0.2)
|
172
185
|
racc (1.8.1)
|
173
|
-
rack (3.1.
|
174
|
-
rack-session (2.
|
186
|
+
rack (3.1.16)
|
187
|
+
rack-session (2.1.1)
|
188
|
+
base64 (>= 0.1.0)
|
175
189
|
rack (>= 3.0.0)
|
176
|
-
rack-test (2.
|
190
|
+
rack-test (2.2.0)
|
177
191
|
rack (>= 1.3)
|
178
|
-
rackup (2.1
|
192
|
+
rackup (2.2.1)
|
179
193
|
rack (>= 3)
|
180
|
-
webrick (~> 1.8)
|
181
194
|
rails-controller-testing (1.0.5)
|
182
195
|
actionpack (>= 5.0.1.rc1)
|
183
196
|
actionview (>= 5.0.1.rc1)
|
184
197
|
activesupport (>= 5.0.1.rc1)
|
185
|
-
rails-dom-testing (2.
|
198
|
+
rails-dom-testing (2.3.0)
|
186
199
|
activesupport (>= 5.0.0)
|
187
200
|
minitest
|
188
201
|
nokogiri (>= 1.6)
|
189
|
-
rails-html-sanitizer (1.6.
|
202
|
+
rails-html-sanitizer (1.6.2)
|
190
203
|
loofah (~> 2.21)
|
191
|
-
nokogiri (
|
192
|
-
railties (7.2.
|
193
|
-
actionpack (= 7.2.
|
194
|
-
activesupport (= 7.2.
|
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)
|
205
|
+
railties (7.2.2.2)
|
206
|
+
actionpack (= 7.2.2.2)
|
207
|
+
activesupport (= 7.2.2.2)
|
195
208
|
irb (~> 1.13)
|
196
209
|
rackup (>= 1.0.0)
|
197
210
|
rake (>= 12.2)
|
198
211
|
thor (~> 1.0, >= 1.2.2)
|
199
212
|
zeitwerk (~> 2.6)
|
200
213
|
rainbow (3.1.1)
|
201
|
-
rake (13.
|
202
|
-
rdoc (6.
|
214
|
+
rake (13.3.0)
|
215
|
+
rdoc (6.14.2)
|
216
|
+
erb
|
203
217
|
psych (>= 4.0.0)
|
204
|
-
regexp_parser (2.
|
205
|
-
reline (0.
|
218
|
+
regexp_parser (2.11.2)
|
219
|
+
reline (0.6.2)
|
206
220
|
io-console (~> 0.5)
|
207
|
-
|
208
|
-
strscan
|
209
|
-
rspec-core (3.13.0)
|
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.
|
237
|
+
rspec-support (3.13.6)
|
238
|
+
rubocop (1.75.8)
|
227
239
|
json (~> 2.3)
|
228
|
-
language_server-protocol (
|
240
|
+
language_server-protocol (~> 3.17.0.2)
|
241
|
+
lint_roller (~> 1.1.0)
|
229
242
|
parallel (~> 1.10)
|
230
243
|
parser (>= 3.3.0.2)
|
231
244
|
rainbow (>= 2.2.2, < 4.0)
|
232
|
-
regexp_parser (>= 2.
|
233
|
-
|
234
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
245
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
246
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
235
247
|
ruby-progressbar (~> 1.7)
|
236
|
-
unicode-display_width (>= 2.4.0, <
|
237
|
-
rubocop-ast (1.
|
238
|
-
parser (>= 3.3.
|
248
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
249
|
+
rubocop-ast (1.46.0)
|
250
|
+
parser (>= 3.3.7.2)
|
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)
|
239
256
|
ruby-progressbar (1.13.0)
|
240
|
-
securerandom (0.
|
241
|
-
shoulda-matchers (
|
257
|
+
securerandom (0.4.1)
|
258
|
+
shoulda-matchers (5.1.0)
|
242
259
|
activesupport (>= 5.2.0)
|
243
260
|
smart_properties (1.17.0)
|
244
|
-
sqlite3 (
|
245
|
-
|
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 (
|
253
|
-
|
254
|
-
|
281
|
+
unicode-display_width (3.1.5)
|
282
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
283
|
+
unicode-emoji (4.0.4)
|
284
|
+
useragent (0.16.11)
|
255
285
|
xpath (3.2.0)
|
256
286
|
nokogiri (~> 1.8)
|
257
|
-
zeitwerk (2.6.
|
287
|
+
zeitwerk (2.6.18)
|
258
288
|
|
259
289
|
PLATFORMS
|
260
|
-
|
290
|
+
arm64-darwin-24
|
291
|
+
x86_64-linux
|
261
292
|
|
262
293
|
DEPENDENCIES
|
263
294
|
addressable
|
@@ -268,12 +299,15 @@ DEPENDENCIES
|
|
268
299
|
database_cleaner
|
269
300
|
erb_lint
|
270
301
|
factory_bot_rails
|
302
|
+
ffi (< 1.18.0)
|
271
303
|
nokogiri
|
272
304
|
pry
|
273
305
|
rails-controller-testing
|
274
306
|
rspec-rails
|
275
307
|
shoulda-matchers
|
276
|
-
sqlite3 (~>
|
308
|
+
sqlite3 (~> 2.7)
|
309
|
+
standard (>= 1.35.1)
|
310
|
+
timecop
|
277
311
|
|
278
312
|
BUNDLED WITH
|
279
|
-
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.
|
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
|