thoughtbot-clearance 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,14 @@
1
- h1. 0.6.1 (04/21/2009)
1
+ h2. 0.6.2 (04/22/2009)
2
+
3
+ * Insert Clearance::User into User model if it exists. (Nick Quaranto)
4
+ * World(NavigationHelpers) Cucumber 3.0 style. (Shay Arnett & Mark Cornick)
5
+
6
+ h2. 0.6.1 (04/21/2009)
2
7
  * Scope operators are necessary to keep Rails happy. Reverting the original
3
8
  revert so they're back in the library now for constants referenced inside of
4
9
  the gem. (Nick Quaranto)
5
10
 
6
- h1. 0.6.0 (04/21/2009)
11
+ h2. 0.6.0 (04/21/2009)
7
12
 
8
13
  * Converted Clearance to a Rails engine. (Dan Croak & Joe Ferris)
9
14
  * Include Clearance::User in User model in app. (Dan Croak & Joe Ferris)
@@ -32,7 +37,7 @@ h2. 0.5.6 (4/11/2009)
32
37
  * [#57] Step definition changed for "User should see error messages" so
33
38
  features won't fail for certain validations. (Nick Quaranto)
34
39
 
35
- h1. 0.5.5 (3/23/2009)
40
+ h2. 0.5.5 (3/23/2009)
36
41
 
37
42
  * Removing duplicate test to get rid of warning. (Nick Quaranto)
38
43
 
@@ -17,7 +17,7 @@ In config/environment.rb:
17
17
  config.gem "thoughtbot-clearance",
18
18
  :lib => 'clearance',
19
19
  :source => 'http://gems.github.com',
20
- :version => '0.6.1'
20
+ :version => '0.6.2'
21
21
 
22
22
  Vendor the gem:
23
23
 
@@ -95,7 +95,7 @@ h2. Authors
95
95
 
96
96
  Clearance was extracted out of "Hoptoad":http://hoptoadapp.com. We merged the authentication code from two of thoughtbot's client's Rails apps. The following people have made significant contributions, suggestions, and generally improved the library. Thank you!
97
97
 
98
- 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.
98
+ 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.
99
99
 
100
100
  h2. Questions?
101
101
 
data/Rakefile CHANGED
@@ -51,7 +51,7 @@ task :default => ['test:all', 'test:features']
51
51
 
52
52
  gem_spec = Gem::Specification.new do |gem_spec|
53
53
  gem_spec.name = "clearance"
54
- gem_spec.version = "0.6.1"
54
+ gem_spec.version = "0.6.2"
55
55
  gem_spec.summary = "Rails authentication with email & password."
56
56
  gem_spec.email = "support@thoughtbot.com"
57
57
  gem_spec.homepage = "http://github.com/thoughtbot/clearance"
@@ -60,7 +60,8 @@ gem_spec = Gem::Specification.new do |gem_spec|
60
60
  "Joe Ferris", "Eugene Bolshakov", "Nick Quaranto",
61
61
  "Josh Nichols", "Mike Breen", "Marcel Görner",
62
62
  "Bence Nagy", "Ben Mabey", "Eloy Duran",
63
- "Tim Pope", "Mihai Anca", "Mark Cornick"]
63
+ "Tim Pope", "Mihai Anca", "Mark Cornick",
64
+ "Shay Arnett"]
64
65
  gem_spec.files = FileList["[A-Z]*", "{app,config,generators,lib,shoulda_macros,rails}/**/*"]
65
66
  end
66
67
 
@@ -9,8 +9,13 @@ class ClearanceGenerator < Rails::Generator::Base
9
9
  m.insert_into "app/controllers/application_controller.rb",
10
10
  "include Clearance::Authentication"
11
11
 
12
- m.directory File.join("app", "models")
13
- m.file "user.rb", "app/models/user.rb"
12
+ user_model = "app/models/user.rb"
13
+ if File.exists?(user_model)
14
+ m.insert_into user_model, "include Clearance::User"
15
+ else
16
+ m.directory File.join("app", "models")
17
+ m.file "user.rb", user_model
18
+ end
14
19
 
15
20
  m.directory File.join("test", "factories")
16
21
  m.file "factories.rb", "test/factories/clearance.rb"
@@ -3,13 +3,7 @@
3
3
 
4
4
  Ok, enough fancy automatic stuff. Time for some old school monkey copy-pasting.
5
5
 
6
- 1. If you already had a User model, include the Clearance::User module now:
7
-
8
- class User < ActiveRecord::Base
9
- include Clearance::User
10
- end
11
-
12
- 2. Define a HOST constant in your environments files.
6
+ 1. Define a HOST constant in your environments files.
13
7
  In config/environments/test.rb and config/environments/development.rb it can be:
14
8
 
15
9
  HOST = "localhost"
@@ -17,11 +11,11 @@ In config/environments/test.rb and config/environments/development.rb it can be:
17
11
  In production.rb it must be the actual host your application is deployed to.
18
12
  The constant is used by mailers to generate URLs in emails.
19
13
 
20
- 3. In config/environment.rb:
14
+ 2. In config/environment.rb:
21
15
 
22
16
  DO_NOT_REPLY = "donotreply@example.com"
23
17
 
24
- 4. Define root_url to *something* in your config/routes.rb:
18
+ 3. Define root_url to *something* in your config/routes.rb:
25
19
 
26
20
  map.root :controller => 'home'
27
21
 
@@ -19,7 +19,4 @@ module NavigationHelpers
19
19
  end
20
20
  end
21
21
 
22
- World do |world|
23
- world.extend NavigationHelpers
24
- world
25
- end
22
+ World(NavigationHelpers)
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.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -19,11 +19,12 @@ authors:
19
19
  - Tim Pope
20
20
  - Mihai Anca
21
21
  - Mark Cornick
22
+ - Shay Arnett
22
23
  autorequire:
23
24
  bindir: bin
24
25
  cert_chain: []
25
26
 
26
- date: 2009-04-20 21:00:00 -07:00
27
+ date: 2009-04-21 21:00:00 -07:00
27
28
  default_executable:
28
29
  dependencies: []
29
30