clearance 1.14.1 → 1.14.2
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 +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +1 -1
- data/NEWS.md +8 -0
- data/README.md +5 -1
- data/lib/clearance/password_strategies/bcrypt.rb +9 -21
- data/lib/clearance/user.rb +1 -1
- data/lib/clearance/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40854620afcb6b59bf196bbb4cfd0573c3eec03b
|
4
|
+
data.tar.gz: 69c381cdfb9a23b792b4566ea37932d8692cfc30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb6b07886b51a27a1280aa4fa02e4eec6ec9804fc018c255e7ae573072ebf452b8347f810b6fecf4f3aba86f6cee46807bfd9e5339820f119fa1daa1403c409d
|
7
|
+
data.tar.gz: ef885276fba036cd91b5ed679edd62c459d0e70f6e7b74049b917b8d6c929376994a3e8942396bad490f5a5d182b1028fbe976920f50f302db37196143489dd4
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/NEWS.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
The noteworthy changes for each Clearance version are included here. For a
|
4
4
|
complete changelog, see the git history for each version via the version links.
|
5
5
|
|
6
|
+
## [1.14.2] - August 10, 2016
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
- Fixed incompatibility with `attr_encrypted` gem by inlining the body of the
|
10
|
+
`encrypt` helper method used in the BCrypt password strategy.
|
11
|
+
|
12
|
+
[1.14.2]: https://github.com/thoughtbot/clearance/compare/v1.14.1...v1.14.2
|
13
|
+
|
6
14
|
## [1.14.1] - May 12, 2016
|
7
15
|
|
8
16
|
### Fixed
|
data/README.md
CHANGED
@@ -152,7 +152,8 @@ end
|
|
152
152
|
See [config/routes.rb](/config/routes.rb) for the default set of routes.
|
153
153
|
|
154
154
|
As of Clearance 1.5 it is recommended that you disable Clearance routes and take
|
155
|
-
full control over routing and URL design.
|
155
|
+
full control over routing and URL design. This ensures that your app's URL design
|
156
|
+
won't be affected if the gem's routes and URL design are changed.
|
156
157
|
|
157
158
|
To disable the routes, set `config.routes = false`. You can optionally run
|
158
159
|
`rails generate clearance:routes` to dump a copy of the default routes into your
|
@@ -237,6 +238,9 @@ translation.
|
|
237
238
|
See [config/locales/clearance.en.yml](/config/locales/clearance.en.yml) for the
|
238
239
|
default behavior.
|
239
240
|
|
241
|
+
You can also install [clearance-i18n](https://github.com/thoughtbot/clearance-i18n)
|
242
|
+
for access to additional, user-contributed translations.
|
243
|
+
|
240
244
|
### User Model
|
241
245
|
|
242
246
|
See [lib/clearance/user.rb](/lib/clearance/user.rb) for the default behavior.
|
@@ -19,30 +19,18 @@ module Clearance
|
|
19
19
|
@password = new_password
|
20
20
|
|
21
21
|
if new_password.present?
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
cost = if defined?(::Rails) && ::Rails.env.test?
|
23
|
+
::BCrypt::Engine::MIN_COST
|
24
|
+
else
|
25
|
+
::BCrypt::Engine::DEFAULT_COST
|
26
|
+
end
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
::BCrypt::Password.create(password, cost: cost)
|
31
|
-
end
|
32
|
-
|
33
|
-
# @api private
|
34
|
-
def cost
|
35
|
-
if test_environment?
|
36
|
-
::BCrypt::Engine::MIN_COST
|
37
|
-
else
|
38
|
-
::BCrypt::Engine::DEFAULT_COST
|
28
|
+
self.encrypted_password = ::BCrypt::Password.create(
|
29
|
+
new_password,
|
30
|
+
cost: cost,
|
31
|
+
)
|
39
32
|
end
|
40
33
|
end
|
41
|
-
|
42
|
-
# @api private
|
43
|
-
def test_environment?
|
44
|
-
defined?(::Rails) && ::Rails.env.test?
|
45
|
-
end
|
46
34
|
end
|
47
35
|
end
|
48
36
|
end
|
data/lib/clearance/user.rb
CHANGED
data/lib/clearance/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
@@ -25,7 +25,7 @@ authors:
|
|
25
25
|
autorequire:
|
26
26
|
bindir: bin
|
27
27
|
cert_chain: []
|
28
|
-
date: 2016-
|
28
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
29
29
|
dependencies:
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: bcrypt
|