thoughtbot-clearance 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ h2. 0.8.2 (09/01/2009)
2
+
3
+ * current_user= accessor method. (Joe Ferris, Josh Clayton)
4
+ * set current_user in sign_in. (Jon Yurek)
5
+
1
6
  h2. 0.8.1 (08/31/2009)
2
7
 
3
8
  * Removed unnecessary remember_token_expires_at column and the
@@ -18,7 +18,7 @@ In config/environment.rb:
18
18
  config.gem "thoughtbot-clearance",
19
19
  :lib => 'clearance',
20
20
  :source => 'http://gems.github.com',
21
- :version => '0.7.0'
21
+ :version => '0.8.2'
22
22
  </pre>
23
23
 
24
24
  Vendor the gem:
@@ -111,7 +111,7 @@ h2. Authors
111
111
 
112
112
  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
113
 
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.
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
115
 
116
116
  h2. Questions?
117
117
 
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.1"
83
+ gem_spec.version = "0.8.2"
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"]
93
+ "Shay Arnett", "Jon Yurek"]
94
94
  gem_spec.files = FileList["[A-Z]*", "{app,config,generators,lib,shoulda_macros,rails}/**/*"]
95
95
  end
96
96
 
@@ -18,6 +18,13 @@ module Clearance
18
18
  @_current_user ||= user_from_cookie
19
19
  end
20
20
 
21
+ # Set the current user
22
+ #
23
+ # @param [User]
24
+ def current_user=(user)
25
+ @_current_user = user
26
+ end
27
+
21
28
  # Is the current user signed in?
22
29
  #
23
30
  # @return [true, false]
@@ -53,6 +60,7 @@ module Clearance
53
60
  :value => user.remember_token,
54
61
  :expires => 1.year.from_now.utc
55
62
  }
63
+ current_user = user
56
64
  end
57
65
  end
58
66
 
@@ -62,6 +70,7 @@ module Clearance
62
70
  # sign_out
63
71
  def sign_out
64
72
  cookies.delete(:remember_token)
73
+ current_user = nil
65
74
  end
66
75
 
67
76
  # Store the current location.
@@ -227,7 +227,6 @@ module Clearance
227
227
  module Shoulda
228
228
  module Helpers
229
229
  def sign_in_as(user)
230
- @controller.class_eval { attr_accessor :current_user }
231
230
  @controller.current_user = user
232
231
  return user
233
232
  end
@@ -237,7 +236,6 @@ module Clearance
237
236
  end
238
237
 
239
238
  def sign_out
240
- @controller.class_eval { attr_accessor :current_user }
241
239
  @controller.current_user = nil
242
240
  end
243
241
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thoughtbot-clearance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -24,7 +24,7 @@ autorequire:
24
24
  bindir: bin
25
25
  cert_chain: []
26
26
 
27
- date: 2009-08-30 21:00:00 -07:00
27
+ date: 2009-08-31 21:00:00 -07:00
28
28
  default_executable:
29
29
  dependencies: []
30
30