clearance 1.10.1 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of clearance might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +20 -8
- data/.yardopts +3 -0
- data/Appraisals +13 -16
- data/Gemfile +7 -5
- data/Gemfile.lock +124 -130
- data/NEWS.md +171 -2
- data/README.md +99 -42
- data/app/controllers/clearance/passwords_controller.rb +35 -21
- data/app/controllers/clearance/sessions_controller.rb +17 -3
- data/app/controllers/clearance/users_controller.rb +10 -4
- data/app/mailers/clearance_mailer.rb +2 -3
- data/app/views/clearance_mailer/change_password.text.erb +1 -1
- data/app/views/layouts/application.html.erb +0 -1
- data/bin/setup +6 -2
- data/clearance.gemspec +5 -2
- data/config/locales/clearance.en.yml +9 -0
- data/gemfiles/rails_4.2.gemfile +20 -0
- data/gemfiles/rails_5.0.gemfile +21 -0
- data/gemfiles/rails_5.1.gemfile +21 -0
- data/gemfiles/rails_5.2.gemfile +21 -0
- data/lib/clearance/authentication.rb +63 -3
- data/lib/clearance/authorization.rb +48 -5
- data/lib/clearance/back_door.rb +55 -6
- data/lib/clearance/configuration.rb +50 -10
- data/lib/clearance/constraints/signed_in.rb +21 -0
- data/lib/clearance/constraints/signed_out.rb +12 -0
- data/lib/clearance/constraints.rb +12 -0
- data/lib/clearance/controller.rb +13 -0
- data/lib/clearance/default_sign_in_guard.rb +17 -0
- data/lib/clearance/engine.rb +18 -5
- data/lib/clearance/password_strategies/bcrypt.rb +16 -21
- data/lib/clearance/password_strategies/bcrypt_migration_from_sha1.rb +10 -0
- data/lib/clearance/password_strategies/blowfish.rb +10 -1
- data/lib/clearance/password_strategies/sha1.rb +9 -0
- data/lib/clearance/password_strategies.rb +13 -0
- data/lib/clearance/rack_session.rb +13 -0
- data/lib/clearance/rspec.rb +15 -4
- data/lib/clearance/session.rb +62 -13
- data/lib/clearance/session_status.rb +7 -0
- data/lib/clearance/sign_in_guard.rb +65 -0
- data/lib/clearance/test_unit.rb +3 -3
- data/lib/clearance/testing/controller_helpers.rb +57 -0
- data/lib/clearance/testing/deny_access_matcher.rb +36 -2
- data/lib/clearance/testing/helpers.rb +9 -25
- data/lib/clearance/testing/view_helpers.rb +32 -0
- data/lib/clearance/token.rb +7 -0
- data/lib/clearance/user.rb +183 -4
- data/lib/clearance/version.rb +1 -1
- data/lib/generators/clearance/install/install_generator.rb +28 -9
- data/lib/generators/clearance/install/templates/README +1 -1
- data/lib/generators/clearance/install/templates/clearance.rb +1 -0
- data/lib/generators/clearance/install/templates/db/migrate/{add_clearance_to_users.rb → add_clearance_to_users.rb.erb} +3 -3
- data/lib/generators/clearance/install/templates/db/migrate/{create_users.rb → create_users.rb.erb} +2 -2
- data/lib/generators/clearance/install/templates/user.rb.erb +3 -0
- data/lib/generators/clearance/routes/routes_generator.rb +23 -0
- data/lib/generators/clearance/routes/templates/routes.rb +7 -7
- data/lib/generators/clearance/specs/templates/factories/clearance.rb +2 -2
- data/lib/generators/clearance/specs/templates/features/clearance/user_signs_out_spec.rb.tt +1 -1
- data/lib/generators/clearance/specs/templates/features/clearance/visitor_resets_password_spec.rb.tt +12 -3
- data/lib/generators/clearance/specs/templates/features/clearance/visitor_signs_in_spec.rb.tt +3 -3
- data/lib/generators/clearance/specs/templates/features/clearance/visitor_signs_up_spec.rb.tt +1 -1
- data/lib/generators/clearance/specs/templates/features/clearance/visitor_updates_password_spec.rb.tt +2 -2
- data/lib/generators/clearance/specs/templates/support/features/clearance_helpers.rb +2 -2
- data/spec/acceptance/clearance_installation_spec.rb +15 -7
- data/spec/app_templates/app/models/rails5/user.rb +5 -0
- data/spec/app_templates/config/initializers/clearance.rb +2 -0
- data/spec/app_templates/testapp/Gemfile +1 -1
- data/spec/app_templates/testapp/app/controllers/home_controller.rb +5 -1
- data/spec/clearance/back_door_spec.rb +70 -6
- data/spec/clearance/session_spec.rb +4 -16
- data/spec/clearance/testing/controller_helpers_spec.rb +38 -0
- data/spec/clearance/testing/view_helpers_spec.rb +37 -0
- data/spec/configuration_spec.rb +79 -86
- data/spec/controllers/apis_controller_spec.rb +6 -2
- data/spec/controllers/forgeries_controller_spec.rb +12 -3
- data/spec/controllers/passwords_controller_spec.rb +74 -38
- data/spec/controllers/permissions_controller_spec.rb +13 -3
- data/spec/controllers/sessions_controller_spec.rb +40 -11
- data/spec/controllers/users_controller_spec.rb +16 -8
- data/spec/dummy/app/controllers/application_controller.rb +5 -1
- data/spec/dummy/application.rb +9 -11
- data/spec/factories.rb +5 -5
- data/spec/generators/clearance/install/install_generator_spec.rb +29 -3
- data/spec/generators/clearance/routes/routes_generator_spec.rb +5 -1
- data/spec/helpers/helper_helpers_spec.rb +10 -0
- data/spec/{user_spec.rb → models/user_spec.rb} +10 -1
- data/spec/password_strategies/blowfish_spec.rb +1 -1
- data/spec/requests/cookie_options_spec.rb +52 -0
- data/spec/requests/csrf_rotation_spec.rb +35 -0
- data/spec/requests/password_maintenance_spec.rb +18 -0
- data/spec/requests/token_expiration_spec.rb +54 -0
- data/spec/spec_helper.rb +22 -4
- data/spec/support/environment.rb +12 -0
- data/spec/support/generator_spec_helpers.rb +13 -1
- data/spec/support/http_method_shim.rb +25 -0
- data/spec/support/request_with_remember_token.rb +5 -0
- data/spec/views/view_helpers_spec.rb +10 -0
- metadata +69 -15
- data/gemfiles/rails3.2.gemfile +0 -18
- data/gemfiles/rails4.0.gemfile +0 -19
- data/gemfiles/rails4.1.gemfile +0 -18
- data/gemfiles/rails4.2.gemfile +0 -18
- data/lib/generators/clearance/install/templates/user.rb +0 -3
- data/spec/clearance/testing/helpers_spec.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3d2b65ce30d78d380c94d95fc6fa32f1fa4340a145f6e33573ad746f5da4600e
|
4
|
+
data.tar.gz: a8b154b5ccfed1470fcc29155f3f57c676571539f9794c5b9a32ef2b3f4b8a20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ec8917dc40e39108f0ceb7333d8968d31d2cfa5d902ad1fc533a85fcc98b10d0665bd84484256ff9a3e3114f4c8d27c7bdad24c70cf72c63f6dfc3d151bac2f
|
7
|
+
data.tar.gz: 839701911aea43402b13d2d4ea84f13d904ccf1576a7d9bc913eeac2f48a992a08e57c0859aceb04764afc927425852f18084c0638978937db974449a5f25b4b
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -4,19 +4,31 @@ language:
|
|
4
4
|
- ruby
|
5
5
|
|
6
6
|
rvm:
|
7
|
-
-
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
- 2.
|
7
|
+
- 2.3.8
|
8
|
+
- 2.4.5
|
9
|
+
- 2.5.3
|
10
|
+
- 2.6.1
|
11
11
|
|
12
|
-
|
13
|
-
-
|
12
|
+
gemfile:
|
13
|
+
- gemfiles/rails_4.2.gemfile
|
14
|
+
- gemfiles/rails_5.0.gemfile
|
15
|
+
- gemfiles/rails_5.1.gemfile
|
16
|
+
- gemfiles/rails_5.2.gemfile
|
17
|
+
|
18
|
+
before_install:
|
19
|
+
- gem update --system
|
14
20
|
|
15
|
-
|
16
|
-
- "
|
21
|
+
install:
|
22
|
+
- "bin/setup"
|
17
23
|
|
18
24
|
branches:
|
19
25
|
only:
|
20
26
|
- master
|
27
|
+
- 2.0
|
28
|
+
|
29
|
+
matrix:
|
30
|
+
allow_failures:
|
31
|
+
- gemfile: gemfiles/rails_4.2.gemfile
|
32
|
+
rvm: 2.6.1
|
21
33
|
|
22
34
|
sudo: false
|
data/.yardopts
CHANGED
data/Appraisals
CHANGED
@@ -1,18 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
appraise 'rails4.0' do
|
8
|
-
gem 'rails', '~> 4.0.13'
|
9
|
-
gem 'test-unit'
|
10
|
-
end
|
1
|
+
rails_versions = %w(
|
2
|
+
4.2
|
3
|
+
5.0
|
4
|
+
5.1
|
5
|
+
5.2
|
6
|
+
)
|
11
7
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
rails_versions.each do |version|
|
9
|
+
appraise "rails_#{version}" do
|
10
|
+
gem "railties", "~> #{version}.0"
|
11
|
+
if Gem::Version.new(version) >= Gem::Version.new("5.0")
|
12
|
+
gem "rails-controller-testing"
|
13
|
+
end
|
14
|
+
end
|
18
15
|
end
|
data/Gemfile
CHANGED
@@ -2,14 +2,16 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem '
|
5
|
+
gem 'addressable', '~> 2.6.0'
|
6
|
+
gem 'appraisal'
|
6
7
|
gem 'ammeter'
|
7
8
|
gem 'bundler', '~> 1.3'
|
8
|
-
gem 'capybara', '>= 2.
|
9
|
+
gem 'capybara', '>= 2.6.2'
|
9
10
|
gem 'database_cleaner', '~> 1.0'
|
10
|
-
gem '
|
11
|
+
gem 'factory_bot_rails', '~> 5.0'
|
12
|
+
gem 'nokogiri', '~> 1.10.0'
|
11
13
|
gem 'rspec-rails', '~> 3.1'
|
12
|
-
gem 'shoulda-matchers', '~>
|
13
|
-
gem 'sqlite3', '~> 1.3'
|
14
|
+
gem 'shoulda-matchers', '~> 4.0'
|
15
|
+
gem 'sqlite3', '~> 1.3.13'
|
14
16
|
gem 'timecop', '~> 0.6'
|
15
17
|
gem 'pry', require: false
|
data/Gemfile.lock
CHANGED
@@ -1,171 +1,165 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
clearance (1.
|
4
|
+
clearance (1.17.0)
|
5
|
+
actionmailer (>= 3.1)
|
6
|
+
activemodel (>= 3.1)
|
7
|
+
activerecord (>= 3.1)
|
5
8
|
bcrypt
|
6
9
|
email_validator (~> 1.4)
|
7
|
-
|
10
|
+
railties (>= 3.1)
|
8
11
|
|
9
12
|
GEM
|
10
13
|
remote: https://rubygems.org/
|
11
14
|
specs:
|
12
|
-
actionmailer (
|
13
|
-
actionpack (=
|
14
|
-
actionview (=
|
15
|
-
activejob (=
|
15
|
+
actionmailer (5.2.3)
|
16
|
+
actionpack (= 5.2.3)
|
17
|
+
actionview (= 5.2.3)
|
18
|
+
activejob (= 5.2.3)
|
16
19
|
mail (~> 2.5, >= 2.5.4)
|
17
|
-
rails-dom-testing (~>
|
18
|
-
actionpack (
|
19
|
-
actionview (=
|
20
|
-
activesupport (=
|
21
|
-
rack (~>
|
22
|
-
rack-test (
|
23
|
-
rails-dom-testing (~>
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.
|
25
|
-
actionview (
|
26
|
-
activesupport (=
|
20
|
+
rails-dom-testing (~> 2.0)
|
21
|
+
actionpack (5.2.3)
|
22
|
+
actionview (= 5.2.3)
|
23
|
+
activesupport (= 5.2.3)
|
24
|
+
rack (~> 2.0)
|
25
|
+
rack-test (>= 0.6.3)
|
26
|
+
rails-dom-testing (~> 2.0)
|
27
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
28
|
+
actionview (5.2.3)
|
29
|
+
activesupport (= 5.2.3)
|
27
30
|
builder (~> 3.1)
|
28
|
-
|
29
|
-
rails-dom-testing (~>
|
30
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.
|
31
|
-
activejob (
|
32
|
-
activesupport (=
|
33
|
-
globalid (>= 0.3.
|
34
|
-
activemodel (
|
35
|
-
activesupport (=
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
i18n (
|
43
|
-
json (~> 1.7, >= 1.7.7)
|
31
|
+
erubi (~> 1.4)
|
32
|
+
rails-dom-testing (~> 2.0)
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
34
|
+
activejob (5.2.3)
|
35
|
+
activesupport (= 5.2.3)
|
36
|
+
globalid (>= 0.3.6)
|
37
|
+
activemodel (5.2.3)
|
38
|
+
activesupport (= 5.2.3)
|
39
|
+
activerecord (5.2.3)
|
40
|
+
activemodel (= 5.2.3)
|
41
|
+
activesupport (= 5.2.3)
|
42
|
+
arel (>= 9.0)
|
43
|
+
activesupport (5.2.3)
|
44
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
45
|
+
i18n (>= 0.7, < 2)
|
44
46
|
minitest (~> 5.1)
|
45
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
46
47
|
tzinfo (~> 1.1)
|
47
|
-
|
48
|
+
addressable (2.6.0)
|
49
|
+
public_suffix (>= 2.0.2, < 4.0)
|
50
|
+
ammeter (1.1.4)
|
48
51
|
activesupport (>= 3.0)
|
49
52
|
railties (>= 3.0)
|
50
53
|
rspec-rails (>= 2.2)
|
51
|
-
appraisal (
|
54
|
+
appraisal (2.2.0)
|
52
55
|
bundler
|
53
56
|
rake
|
54
57
|
thor (>= 0.14.0)
|
55
|
-
arel (
|
56
|
-
bcrypt (3.1.
|
57
|
-
builder (3.2.
|
58
|
-
capybara (
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
rack
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
58
|
+
arel (9.0.0)
|
59
|
+
bcrypt (3.1.12)
|
60
|
+
builder (3.2.3)
|
61
|
+
capybara (3.16.1)
|
62
|
+
addressable
|
63
|
+
mini_mime (>= 0.1.3)
|
64
|
+
nokogiri (~> 1.8)
|
65
|
+
rack (>= 1.6.0)
|
66
|
+
rack-test (>= 0.6.3)
|
67
|
+
regexp_parser (~> 1.2)
|
68
|
+
xpath (~> 3.2)
|
69
|
+
coderay (1.1.2)
|
70
|
+
concurrent-ruby (1.1.5)
|
71
|
+
crass (1.0.4)
|
72
|
+
database_cleaner (1.7.0)
|
73
|
+
diff-lcs (1.3)
|
67
74
|
email_validator (1.6.0)
|
68
75
|
activemodel
|
69
|
-
|
70
|
-
|
71
|
-
activesupport (>=
|
72
|
-
|
73
|
-
|
74
|
-
railties (>=
|
75
|
-
globalid (0.
|
76
|
-
activesupport (>= 4.
|
77
|
-
i18n (
|
78
|
-
|
79
|
-
loofah (2.
|
76
|
+
erubi (1.8.0)
|
77
|
+
factory_bot (5.0.2)
|
78
|
+
activesupport (>= 4.2.0)
|
79
|
+
factory_bot_rails (5.0.1)
|
80
|
+
factory_bot (~> 5.0.0)
|
81
|
+
railties (>= 4.2.0)
|
82
|
+
globalid (0.4.2)
|
83
|
+
activesupport (>= 4.2.0)
|
84
|
+
i18n (1.6.0)
|
85
|
+
concurrent-ruby (~> 1.0)
|
86
|
+
loofah (2.2.3)
|
87
|
+
crass (~> 1.0.2)
|
80
88
|
nokogiri (>= 1.5.9)
|
81
|
-
mail (2.
|
82
|
-
|
83
|
-
method_source (0.
|
84
|
-
|
85
|
-
|
86
|
-
minitest (5.
|
87
|
-
nokogiri (1.
|
88
|
-
|
89
|
-
pry (0.
|
89
|
+
mail (2.7.1)
|
90
|
+
mini_mime (>= 0.1.1)
|
91
|
+
method_source (0.9.2)
|
92
|
+
mini_mime (1.0.1)
|
93
|
+
mini_portile2 (2.4.0)
|
94
|
+
minitest (5.11.3)
|
95
|
+
nokogiri (1.10.2)
|
96
|
+
mini_portile2 (~> 2.4.0)
|
97
|
+
pry (0.12.2)
|
90
98
|
coderay (~> 1.1.0)
|
91
|
-
method_source (~> 0.
|
92
|
-
|
93
|
-
rack (
|
94
|
-
rack-test (
|
95
|
-
rack (>= 1.0)
|
96
|
-
rails (
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
activesupport (=
|
104
|
-
|
105
|
-
railties (= 4.2.0)
|
106
|
-
sprockets-rails
|
107
|
-
rails-deprecated_sanitizer (1.0.3)
|
108
|
-
activesupport (>= 4.2.0.alpha)
|
109
|
-
rails-dom-testing (1.0.6)
|
110
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
111
|
-
nokogiri (~> 1.6.0)
|
112
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
113
|
-
rails-html-sanitizer (1.0.2)
|
114
|
-
loofah (~> 2.0)
|
115
|
-
railties (4.2.0)
|
116
|
-
actionpack (= 4.2.0)
|
117
|
-
activesupport (= 4.2.0)
|
99
|
+
method_source (~> 0.9.0)
|
100
|
+
public_suffix (3.0.3)
|
101
|
+
rack (2.0.7)
|
102
|
+
rack-test (1.1.0)
|
103
|
+
rack (>= 1.0, < 3)
|
104
|
+
rails-dom-testing (2.0.3)
|
105
|
+
activesupport (>= 4.2.0)
|
106
|
+
nokogiri (>= 1.6)
|
107
|
+
rails-html-sanitizer (1.0.4)
|
108
|
+
loofah (~> 2.2, >= 2.2.2)
|
109
|
+
railties (5.2.3)
|
110
|
+
actionpack (= 5.2.3)
|
111
|
+
activesupport (= 5.2.3)
|
112
|
+
method_source
|
118
113
|
rake (>= 0.8.7)
|
119
|
-
thor (>= 0.
|
120
|
-
rake (
|
121
|
-
|
122
|
-
|
123
|
-
|
114
|
+
thor (>= 0.19.0, < 2.0)
|
115
|
+
rake (12.3.2)
|
116
|
+
regexp_parser (1.4.0)
|
117
|
+
rspec-core (3.8.0)
|
118
|
+
rspec-support (~> 3.8.0)
|
119
|
+
rspec-expectations (3.8.2)
|
124
120
|
diff-lcs (>= 1.2.0, < 2.0)
|
125
|
-
rspec-support (~> 3.
|
126
|
-
rspec-mocks (3.
|
121
|
+
rspec-support (~> 3.8.0)
|
122
|
+
rspec-mocks (3.8.0)
|
127
123
|
diff-lcs (>= 1.2.0, < 2.0)
|
128
|
-
rspec-support (~> 3.
|
129
|
-
rspec-rails (3.2
|
130
|
-
actionpack (>= 3.0, <= 4.2)
|
131
|
-
activesupport (>= 3.0, <= 4.2)
|
132
|
-
railties (>= 3.0, <= 4.2)
|
133
|
-
rspec-core (~> 3.2.0)
|
134
|
-
rspec-expectations (~> 3.2.0)
|
135
|
-
rspec-mocks (~> 3.2.0)
|
136
|
-
rspec-support (~> 3.2.0)
|
137
|
-
rspec-support (3.2.1)
|
138
|
-
shoulda-matchers (2.8.0)
|
139
|
-
activesupport (>= 3.0.0)
|
140
|
-
slop (3.6.0)
|
141
|
-
sprockets (3.1.0)
|
142
|
-
rack (~> 1.0)
|
143
|
-
sprockets-rails (2.3.1)
|
124
|
+
rspec-support (~> 3.8.0)
|
125
|
+
rspec-rails (3.8.2)
|
144
126
|
actionpack (>= 3.0)
|
145
127
|
activesupport (>= 3.0)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
128
|
+
railties (>= 3.0)
|
129
|
+
rspec-core (~> 3.8.0)
|
130
|
+
rspec-expectations (~> 3.8.0)
|
131
|
+
rspec-mocks (~> 3.8.0)
|
132
|
+
rspec-support (~> 3.8.0)
|
133
|
+
rspec-support (3.8.0)
|
134
|
+
shoulda-matchers (4.0.1)
|
135
|
+
activesupport (>= 4.2.0)
|
136
|
+
sqlite3 (1.3.13)
|
137
|
+
thor (0.20.3)
|
138
|
+
thread_safe (0.3.6)
|
139
|
+
timecop (0.9.1)
|
140
|
+
tzinfo (1.2.5)
|
152
141
|
thread_safe (~> 0.1)
|
153
|
-
xpath (2.0
|
154
|
-
nokogiri (~> 1.
|
142
|
+
xpath (3.2.0)
|
143
|
+
nokogiri (~> 1.8)
|
155
144
|
|
156
145
|
PLATFORMS
|
157
146
|
ruby
|
158
147
|
|
159
148
|
DEPENDENCIES
|
149
|
+
addressable (~> 2.6.0)
|
160
150
|
ammeter
|
161
|
-
appraisal
|
151
|
+
appraisal
|
162
152
|
bundler (~> 1.3)
|
163
|
-
capybara (>= 2.
|
153
|
+
capybara (>= 2.6.2)
|
164
154
|
clearance!
|
165
155
|
database_cleaner (~> 1.0)
|
166
|
-
|
156
|
+
factory_bot_rails (~> 5.0)
|
157
|
+
nokogiri (~> 1.10.0)
|
167
158
|
pry
|
168
159
|
rspec-rails (~> 3.1)
|
169
|
-
shoulda-matchers (~>
|
170
|
-
sqlite3 (~> 1.3)
|
160
|
+
shoulda-matchers (~> 4.0)
|
161
|
+
sqlite3 (~> 1.3.13)
|
171
162
|
timecop (~> 0.6)
|
163
|
+
|
164
|
+
BUNDLED WITH
|
165
|
+
1.17.3
|
data/NEWS.md
CHANGED
@@ -1,7 +1,177 @@
|
|
1
1
|
# News
|
2
2
|
|
3
3
|
The noteworthy changes for each Clearance version are included here. For a
|
4
|
-
complete changelog, see the git history.
|
4
|
+
complete changelog, see the git history for each version via the version links.
|
5
|
+
|
6
|
+
## [1.17.0] - April 11, 2019
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
|
10
|
+
- Update the `HttpOnly` cookie setting for the remember token to default to
|
11
|
+
true, which prevents the value from being available to JavaScript.
|
12
|
+
- Add configuration option to allow the auth backdoor to work in specified
|
13
|
+
environments (defaults to `test`, `development`, `ci`).
|
14
|
+
|
15
|
+
[1.17.0]: https://github.com/thoughtbot/clearance/compare/v1.16.2...1.17.0
|
16
|
+
|
17
|
+
## [1.16.2] - February 25, 2019
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
- Added missing translation keys
|
21
|
+
- Fix issue where a cookie value could be set more than once when interacting
|
22
|
+
with the `httponly` option
|
23
|
+
|
24
|
+
### Changed
|
25
|
+
- Remove Rails as a dependency so that clearance does not trigger a cascade of
|
26
|
+
requirements as rails pulls in every framework. Instead, depend on just the
|
27
|
+
frameworks relevant to Clearance.
|
28
|
+
- Prevent `Clearance::BackDoor` from being used outside the "test" environment.
|
29
|
+
|
30
|
+
[1.16.2]: https://github.com/thoughtbot/clearance/compare/v1.16.1...v1.16.2
|
31
|
+
|
32
|
+
## [1.16.1] - November 2, 2017
|
33
|
+
|
34
|
+
### Fixed
|
35
|
+
- Fixed issue where tokens from abandoned password reset attempts were stored in
|
36
|
+
the session, preventing newly generated password reset tokens from working.
|
37
|
+
- Improve compatibility with Rails API projects by calling `helper_method` only
|
38
|
+
when it is defined.
|
39
|
+
- URL fragment in server-set `session[:return_to]` values are preserved when
|
40
|
+
redirecting to the stored value.
|
41
|
+
- Eliminated deprecation in Clearance test helpers that were related to the
|
42
|
+
renaming of FactoryGirl to FactoryBot.
|
43
|
+
|
44
|
+
[1.16.1]: https://github.com/thoughtbot/clearance/compare/v1.16.0...v1.16.1
|
45
|
+
|
46
|
+
## [1.16.0] - January 16, 2017
|
47
|
+
|
48
|
+
### Security
|
49
|
+
- Clearance users can now help prevent [session fixation attacks] by setting
|
50
|
+
`Clearance.configuration.rotate_csrf_on_sign_in` to `true`. This will cause
|
51
|
+
the user's CSRF token to be rotated on sign in and is recommended for all
|
52
|
+
Clearance applications. This setting will default to `true` in Clearance 2.0.
|
53
|
+
Clearance will emit a warning on each sign in until this configuration setting
|
54
|
+
is explicitly set to `true` or `false`.
|
55
|
+
|
56
|
+
[session fixation attacks]: https://www.owasp.org/index.php/Session_fixation
|
57
|
+
[1.16.0]: https://github.com/thoughtbot/clearance/compare/v1.15.1...v1.16.0
|
58
|
+
|
59
|
+
## [1.15.1] - October 6, 2016
|
60
|
+
|
61
|
+
### Fixed
|
62
|
+
- Password reset form redirect no longer uses a named route helper, which means
|
63
|
+
it will work for developers that have customized their routes.
|
64
|
+
|
65
|
+
[1.15.1]: https://github.com/thoughtbot/clearance/compare/v1.15.0...v1.15.1
|
66
|
+
|
67
|
+
## [1.15.0] - September 26, 2016
|
68
|
+
|
69
|
+
### Security
|
70
|
+
- Prevent possible password reset token leak to external sites linked to on the
|
71
|
+
password reset page. See [PR #707] for more information.
|
72
|
+
|
73
|
+
[PR #707]: https://github.com/thoughtbot/clearance/pull/707
|
74
|
+
[1.15.0]: https://github.com/thoughtbot/clearance/compare/v1.14.2...v1.15.0
|
75
|
+
|
76
|
+
## [1.14.2] - August 10, 2016
|
77
|
+
|
78
|
+
### Fixed
|
79
|
+
- Fixed incompatibility with `attr_encrypted` gem by inlining the body of the
|
80
|
+
`encrypt` helper method used in the BCrypt password strategy.
|
81
|
+
|
82
|
+
[1.14.2]: https://github.com/thoughtbot/clearance/compare/v1.14.1...v1.14.2
|
83
|
+
|
84
|
+
## [1.14.1] - May 12, 2016
|
85
|
+
|
86
|
+
### Fixed
|
87
|
+
- Fixed insertion of `include Clearance::User` when running the install
|
88
|
+
generator in an app that already has a `User` model.
|
89
|
+
- Updated `deny_access` matcher to assert against configured redirect location
|
90
|
+
rather than hard coded `/`.
|
91
|
+
|
92
|
+
[1.14.1]: https://github.com/thoughtbot/clearance/compare/v1.14.0...v1.14.1
|
93
|
+
|
94
|
+
## [1.14.0] - April 29, 2016
|
95
|
+
|
96
|
+
### Added
|
97
|
+
- `Clearance::BackDoor` now accepts a block, allowing the user for a test to be
|
98
|
+
looked up by a parameter other than `id` if you have overridden `to_param` for
|
99
|
+
the `User` model.
|
100
|
+
|
101
|
+
### Fixed
|
102
|
+
- We now correctly track the dirty state of `User#encrypted_password`, which
|
103
|
+
fixes custom validations on `User#password` (e.g. validating password length)
|
104
|
+
that were conditional on the password actually changing.
|
105
|
+
- The `clearance:install` generator will now generate a `User` model that
|
106
|
+
inherits from `ApplicationRecord` if run on a Rails 5 app that doesn't already
|
107
|
+
have a `User` model.
|
108
|
+
|
109
|
+
### Deprecated
|
110
|
+
- `User#password_changing` is deprecated in favor of automatic dirty tracking on
|
111
|
+
`encrypted_password` and `password`. If you are calling this in your
|
112
|
+
application you should be able to remove it.
|
113
|
+
|
114
|
+
[1.14.0]: https://github.com/thoughtbot/clearance/compare/v1.13.0...v1.14.0
|
115
|
+
|
116
|
+
## [1.13.0] - March 4, 2016
|
117
|
+
|
118
|
+
### Added
|
119
|
+
- Clearance now supports Rails 5.0.0.beta3 and newer.
|
120
|
+
|
121
|
+
### Fixed
|
122
|
+
- Clearance will now infer the parameter name to use when accessing user
|
123
|
+
parameters in a request. This previously used `:user`, which was incorrect for
|
124
|
+
customized user models.
|
125
|
+
- Generated feature specs no longer rely on RSpec monkey patches.
|
126
|
+
|
127
|
+
[1.13.0]: https://github.com/thoughtbot/clearance/compare/v1.12.1...v1.13.0
|
128
|
+
|
129
|
+
## [1.12.1] - January 7, 2016
|
130
|
+
|
131
|
+
### Fixed
|
132
|
+
- Fixed the `create_users` migration generated by `rails generate
|
133
|
+
clearance:install` under Rails 3.x.
|
134
|
+
|
135
|
+
[1.12.1]: https://github.com/thoughtbot/clearance/compare/v1.12.0...v1.12.1
|
136
|
+
|
137
|
+
## [1.12.0] - November 17, 2015
|
138
|
+
|
139
|
+
### Added
|
140
|
+
- Users will now see a flash message when redirected to sign in by
|
141
|
+
`require_login`. This I18n key for this message is
|
142
|
+
`flashes.failure_when_not_signed_in` and defaults to "Please sign in to
|
143
|
+
continue".
|
144
|
+
- Added significant API documentation. API documentation effort is ongoing.
|
145
|
+
|
146
|
+
### Fixed
|
147
|
+
- Fixed expectation in the generated `visitor_resets_password_spec.rb` file.
|
148
|
+
- Corrected indentation of routes inserted by the routes generator.
|
149
|
+
- Corrected indentation of `include Clearance::User` when the install generator
|
150
|
+
adds it to an existing user class.
|
151
|
+
|
152
|
+
[1.12.0]: https://github.com/thoughtbot/clearance/compare/v1.11.0...v1.12.0
|
153
|
+
|
154
|
+
## [1.11.0] - August 21, 2015
|
155
|
+
|
156
|
+
### Added
|
157
|
+
- Add `sign_in` and `sign_in_as` helper methods to view specs. These helpers
|
158
|
+
avoid errors from verified partial doubles that come from. See
|
159
|
+
[462c009].
|
160
|
+
|
161
|
+
### Fixed
|
162
|
+
- `clearance:routes` generator now properly disables internal routes in your
|
163
|
+
Clearance initializer.
|
164
|
+
- Clearance now accesses the cookie jar via ActionDispatch::Request rather than
|
165
|
+
`Rack::Request`. This is more consistent with what Rails does internally.
|
166
|
+
|
167
|
+
### Deprecated
|
168
|
+
- `Clearance::Testing::Helpers` has been deprecated in favor of
|
169
|
+
`Clearance::Testing::ControllerHelpers`. Most users are accessing these
|
170
|
+
helpers by requiring `clearance/rspec` or `clearance/test_unit` and should be
|
171
|
+
unaffected.
|
172
|
+
|
173
|
+
[462c009]: https://github.com/thoughtbot/clearance/commit/462c00965c14b2492500fbb4fecd7b84b9790bb9
|
174
|
+
[1.11.0]: https://github.com/thoughtbot/clearance/compare/v1.10.1...v1.11.0
|
5
175
|
|
6
176
|
## [1.10.1] - May 15, 2015
|
7
177
|
|
@@ -203,7 +373,6 @@ complete changelog, see the git history.
|
|
203
373
|
|
204
374
|
[1.1.0]: https://github.com/thoughtbot/clearance/compare/v1.0.1...v1.1.0
|
205
375
|
|
206
|
-
|
207
376
|
## [1.0.1] - August 9, 2013
|
208
377
|
|
209
378
|
### Fixed
|