tonkapark-clearance 0.7.0 → 0.7.0.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.textile
CHANGED
@@ -1,12 +1,6 @@
|
|
1
1
|
h1. Clearance
|
2
2
|
|
3
|
-
Rails authentication with email & password.
|
4
|
-
|
5
|
-
"We have clearance, Clarence.":http://www.youtube.com/v/mNRXJEE3Nz8
|
6
|
-
|
7
|
-
h2. Suspenders
|
8
|
-
|
9
|
-
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, representating what we think the current state-of-the-art is in Rails development.
|
3
|
+
Forked version of Thoughtbot's Clearance, Rails authentication with email & password.
|
10
4
|
|
11
5
|
h2. Installation
|
12
6
|
|
@@ -15,10 +9,10 @@ Clearance is a Rails engine. It works with versions of Rails greater than 2.3.
|
|
15
9
|
In config/environment.rb:
|
16
10
|
|
17
11
|
<pre>
|
18
|
-
config.gem "
|
12
|
+
config.gem "tonkapark-clearance",
|
19
13
|
:lib => 'clearance',
|
20
14
|
:source => 'http://gems.github.com',
|
21
|
-
:version => '0.7.0'
|
15
|
+
:version => '0.7.0.1'
|
22
16
|
</pre>
|
23
17
|
|
24
18
|
Vendor the gem:
|
@@ -67,57 +61,3 @@ Define root_url to *something* in your config/routes.rb:
|
|
67
61
|
<pre>
|
68
62
|
map.root :controller => 'home'
|
69
63
|
</pre>
|
70
|
-
|
71
|
-
h2. Cucumber Features
|
72
|
-
|
73
|
-
As your app evolves, you want to know that authentication still works. thoughtbot's opinion is that you should test its integration with your app using "Cucumber":http://cukes.info/.
|
74
|
-
|
75
|
-
Run the Cucumber generator (if you haven't already) and Clearance's feature generator:
|
76
|
-
|
77
|
-
<pre>
|
78
|
-
script/generate cucumber
|
79
|
-
script/generate clearance_features
|
80
|
-
</pre>
|
81
|
-
|
82
|
-
All of the files generated should be new with the exception of the features/support/paths.rb file. If you have not modified your paths.rb then you will be okay to replace it with this one. If you need to keep your paths.rb file then add these locations in your paths.rb manually:
|
83
|
-
|
84
|
-
<pre>
|
85
|
-
def path_to(page_name)
|
86
|
-
case page_name
|
87
|
-
...
|
88
|
-
when /the sign up page/i
|
89
|
-
new_user_path
|
90
|
-
when /the sign in page/i
|
91
|
-
new_session_path
|
92
|
-
when /the password reset request page/i
|
93
|
-
new_password_path
|
94
|
-
...
|
95
|
-
end
|
96
|
-
</pre>
|
97
|
-
|
98
|
-
h2. Formtastic views
|
99
|
-
|
100
|
-
We have begun standardizing our forms using "Formtastic":http://github.com/justinfrench/formtastic. We highly recommend trying it. It will make your Rails view life more interesting.
|
101
|
-
|
102
|
-
Clearance has another generator to generate Formastic views:
|
103
|
-
|
104
|
-
<pre>
|
105
|
-
script/generate clearance_views
|
106
|
-
</pre>
|
107
|
-
|
108
|
-
Its implementation is designed so that other view styles can be generated if the community wants it. However, we haven't needed them so you'll have to write the patch and send it back if you want other styles (such as Haml).
|
109
|
-
|
110
|
-
h2. Authors
|
111
|
-
|
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
|
-
|
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.
|
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
|
-
|
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.7.0"
|
83
|
+
gem_spec.version = "0.7.0.1"
|
84
84
|
gem_spec.summary = "Forked thoughbot/clearance. Rails authentication with email & password."
|
85
85
|
gem_spec.email = "matt@tonkapark.com"
|
86
86
|
gem_spec.homepage = "http://github.com/thoughtbot/clearance"
|
@@ -23,7 +23,7 @@ class Clearance::SessionsController < ApplicationController
|
|
23
23
|
else
|
24
24
|
::ClearanceMailer.deliver_confirmation(@user)
|
25
25
|
flash_notice_after_create
|
26
|
-
redirect_to(
|
26
|
+
redirect_to(sign_in_url)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -62,6 +62,6 @@ class Clearance::SessionsController < ApplicationController
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def url_after_destroy
|
65
|
-
|
65
|
+
sign_in_url
|
66
66
|
end
|
67
67
|
end
|
data/clearance.gemspec
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.7.0
|
4
|
+
version: 0.7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Anderson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-29 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tonkapark-clearance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0
|
4
|
+
version: 0.7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Anderson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-28 22:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -108,8 +108,6 @@ files:
|
|
108
108
|
- rails/init.rb
|
109
109
|
has_rdoc: true
|
110
110
|
homepage: http://github.com/thoughtbot/clearance
|
111
|
-
licenses: []
|
112
|
-
|
113
111
|
post_install_message:
|
114
112
|
rdoc_options: []
|
115
113
|
|
@@ -130,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
128
|
requirements: []
|
131
129
|
|
132
130
|
rubyforge_project:
|
133
|
-
rubygems_version: 1.
|
131
|
+
rubygems_version: 1.2.0
|
134
132
|
signing_key:
|
135
133
|
specification_version: 3
|
136
134
|
summary: Forked thoughbot/clearance. Rails authentication with email & password.
|