clearance 0.8.3 → 0.8.4
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.
- data/CHANGELOG.textile +7 -0
- data/README.textile +14 -13
- data/Rakefile +2 -2
- data/app/controllers/clearance/users_controller.rb +0 -1
- data/generators/clearance/clearance_generator.rb +0 -1
- data/generators/clearance_features/templates/features/step_definitions/clearance_steps.rb +6 -4
- data/lib/clearance/user.rb +6 -0
- metadata +4 -3
data/CHANGELOG.textile
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
h2. 0.8.4
|
2
|
+
|
3
|
+
* [#48] remove unnecessary require 'factory_girl' in generator (Dan Croak)
|
4
|
+
* reference gemcutter (not github) as the gem source in README (Dan Croak)
|
5
|
+
* add IRC, rdoc.info links to README (Dan Croak)
|
6
|
+
* move user confirmation email trigger into model (Chad Pytel)
|
7
|
+
|
1
8
|
h2. 0.8.3 (09/21/2009)
|
2
9
|
|
3
10
|
* [#27] remove class_eval in Clearance::Authentication. (Anuj Dutta)
|
data/README.textile
CHANGED
@@ -4,6 +4,16 @@ Rails authentication with email & password.
|
|
4
4
|
|
5
5
|
"We have clearance, Clarence.":http://www.youtube.com/v/mNRXJEE3Nz8
|
6
6
|
|
7
|
+
h2. Help
|
8
|
+
|
9
|
+
* "#thoughtbot":irc://irc.freenode.net/thoughtbot IRC channel on freenode
|
10
|
+
* "documentation":http://rdoc.info/projects/thoughtbot/clearance
|
11
|
+
* "mailing list":http://groups.google.com/group/thoughtbot-clearance
|
12
|
+
|
13
|
+
h2. Bugs, Patches
|
14
|
+
|
15
|
+
Fork away and create a "Github Issue":http://github.com/thoughtbot/clearance/issues. Please don't send pull requests.
|
16
|
+
|
7
17
|
h2. Suspenders
|
8
18
|
|
9
19
|
Clearance is included in "Suspenders":http://github.com/thoughtbot/suspenders, which thoughtbot uses on all of our apps. We highly recommend you try it. Suspenders is the "King Gem" in our ecosystem, representing what we think the current state-of-the-art is in Rails development.
|
@@ -15,10 +25,10 @@ Clearance is a Rails engine. It works with versions of Rails greater than 2.3.
|
|
15
25
|
In config/environment.rb:
|
16
26
|
|
17
27
|
<pre>
|
18
|
-
config.gem "
|
28
|
+
config.gem "clearance",
|
19
29
|
:lib => 'clearance',
|
20
|
-
:source => 'http://
|
21
|
-
:version => '0.8.
|
30
|
+
:source => 'http://gemcutter.org',
|
31
|
+
:version => '0.8.3'
|
22
32
|
</pre>
|
23
33
|
|
24
34
|
Vendor the gem:
|
@@ -111,14 +121,5 @@ h2. Authors
|
|
111
121
|
|
112
122
|
Clearance was extracted out of "Hoptoad":http://hoptoadapp.com. We merged the authentication code from two of thoughtbot's clients' Rails apps and have since used it each time we need authentication. The following people have improved the library. Thank you!
|
113
123
|
|
114
|
-
Dan Croak, Mike Burns, Jason Morrison, Joe Ferris, Eugene Bolshakov, Nick Quaranto, Josh Nichols, Mike Breen, Marcel Görner, Bence Nagy, Ben Mabey, Eloy Duran, Tim Pope, Mihai Anca, Mark Cornick, Shay Arnett, Joshua Clayton, Mustafa Ekim, Jon Yurek,
|
115
|
-
|
116
|
-
h2. Questions?
|
117
|
-
|
118
|
-
Ask the "mailing list":http://groups.google.com/group/thoughtbot-clearance
|
119
|
-
|
120
|
-
h2. Suggestions, Bugs, Refactoring?
|
121
|
-
|
122
|
-
Fork away and create a "Github Issue":http://github.com/thoughtbot/clearance/issues. Please don't send pull requests.
|
123
|
-
|
124
|
+
Dan Croak, Mike Burns, Jason Morrison, Joe Ferris, Eugene Bolshakov, Nick Quaranto, Josh Nichols, Mike Breen, Marcel Görner, Bence Nagy, Ben Mabey, Eloy Duran, Tim Pope, Mihai Anca, Mark Cornick, Shay Arnett, Joshua Clayton, Mustafa Ekim, Jon Yurek, Anuj Dutta, and Chad Pytel.
|
124
125
|
|
data/Rakefile
CHANGED
@@ -80,7 +80,7 @@ task :default => ['test:basic', 'test:features',
|
|
80
80
|
|
81
81
|
gem_spec = Gem::Specification.new do |gem_spec|
|
82
82
|
gem_spec.name = "clearance"
|
83
|
-
gem_spec.version = "0.8.
|
83
|
+
gem_spec.version = "0.8.4"
|
84
84
|
gem_spec.summary = "Rails authentication with email & password."
|
85
85
|
gem_spec.email = "support@thoughtbot.com"
|
86
86
|
gem_spec.homepage = "http://github.com/thoughtbot/clearance"
|
@@ -90,7 +90,7 @@ gem_spec = Gem::Specification.new do |gem_spec|
|
|
90
90
|
"Josh Nichols", "Mike Breen", "Marcel Görner",
|
91
91
|
"Bence Nagy", "Ben Mabey", "Eloy Duran",
|
92
92
|
"Tim Pope", "Mihai Anca", "Mark Cornick",
|
93
|
-
"Shay Arnett", "Jon Yurek"]
|
93
|
+
"Shay Arnett", "Jon Yurek", "Chad Pytel"]
|
94
94
|
gem_spec.files = FileList["[A-Z]*", "{app,config,generators,lib,shoulda_macros,rails}/**/*"]
|
95
95
|
end
|
96
96
|
|
@@ -63,11 +63,13 @@ end
|
|
63
63
|
|
64
64
|
Then /^a password reset message should be sent to "(.*)"$/ do |email|
|
65
65
|
user = User.find_by_email(email)
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
assert !ActionMailer::Base.deliveries.empty?
|
67
|
+
ActionMailer::Base.deliveries.any? do |email|
|
68
|
+
email.to == user.email &&
|
69
|
+
email.subject =~ /password/i &&
|
70
|
+
email.body =~ /#{user.confirmation_token}/
|
71
|
+
end
|
69
72
|
assert !user.confirmation_token.blank?
|
70
|
-
assert_match /#{user.confirmation_token}/, sent.body
|
71
73
|
end
|
72
74
|
|
73
75
|
When /^I follow the password reset link sent to "(.*)"$/ do |email|
|
data/lib/clearance/user.rb
CHANGED
@@ -86,6 +86,8 @@ module Clearance
|
|
86
86
|
before_save :initialize_salt,
|
87
87
|
:encrypt_password,
|
88
88
|
:initialize_confirmation_token
|
89
|
+
|
90
|
+
after_create :send_confirmation_email, :unless => :email_confirmed?
|
89
91
|
end
|
90
92
|
end
|
91
93
|
end
|
@@ -180,6 +182,10 @@ module Clearance
|
|
180
182
|
def password_required?
|
181
183
|
encrypted_password.blank? || !password.blank?
|
182
184
|
end
|
185
|
+
|
186
|
+
def send_confirmation_email
|
187
|
+
ClearanceMailer.deliver_confirmation self
|
188
|
+
end
|
183
189
|
end
|
184
190
|
|
185
191
|
module ClassMethods
|
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: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
@@ -21,11 +21,12 @@ authors:
|
|
21
21
|
- Mark Cornick
|
22
22
|
- Shay Arnett
|
23
23
|
- Jon Yurek
|
24
|
+
- Chad Pytel
|
24
25
|
autorequire:
|
25
26
|
bindir: bin
|
26
27
|
cert_chain: []
|
27
28
|
|
28
|
-
date: 2009-
|
29
|
+
date: 2009-12-08 00:00:00 -05:00
|
29
30
|
default_executable:
|
30
31
|
dependencies: []
|
31
32
|
|
@@ -113,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
114
|
requirements: []
|
114
115
|
|
115
116
|
rubyforge_project:
|
116
|
-
rubygems_version: 1.3.
|
117
|
+
rubygems_version: 1.3.5
|
117
118
|
signing_key:
|
118
119
|
specification_version: 3
|
119
120
|
summary: Rails authentication with email & password.
|