thoughtbot-clearance 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +0 -5
- data/Rakefile +12 -4
- data/TODO.textile +0 -1
- data/lib/clearance/app/controllers/application_controller.rb +1 -1
- data/lib/clearance/app/controllers/passwords_controller.rb +1 -1
- data/lib/clearance/app/controllers/sessions_controller.rb +1 -1
- data/lib/clearance/app/controllers/users_controller.rb +4 -4
- data/lib/clearance/test/functionals/users_controller_test.rb +1 -1
- data/lib/clearance/version.rb +1 -1
- data/test/rails_root/config/routes.rb +13 -18
- metadata +1 -1
data/README.textile
CHANGED
@@ -121,11 +121,6 @@ h2. Routes
|
|
121
121
|
|
122
122
|
map.root :controller => 'sessions', :action => 'new'
|
123
123
|
|
124
|
-
map.with_options :controller => 'sessions' do |m|
|
125
|
-
m.login '/login', :action => 'new'
|
126
|
-
m.logout '/logout', :action => 'destroy'
|
127
|
-
end
|
128
|
-
|
129
124
|
end
|
130
125
|
|
131
126
|
h2. Environments
|
data/Rakefile
CHANGED
@@ -33,7 +33,9 @@ namespace :gemspec do
|
|
33
33
|
f.write spec.to_ruby
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
36
|
+
end
|
37
|
+
|
38
|
+
namespace :version do
|
37
39
|
namespace :bump do
|
38
40
|
desc "Bump the gemspec a major version."
|
39
41
|
task :major do
|
@@ -51,8 +53,10 @@ end
|
|
51
53
|
end
|
52
54
|
|
53
55
|
spec.version = "#{major}.0.0"
|
56
|
+
puts "Version bumped to #{spec.version}"
|
57
|
+
|
54
58
|
Rake::Task["gemspec:write"].invoke
|
55
|
-
puts "
|
59
|
+
puts "Gemspec updated"
|
56
60
|
end
|
57
61
|
|
58
62
|
desc "Bump the gemspec a minor version."
|
@@ -71,8 +75,10 @@ end
|
|
71
75
|
end
|
72
76
|
|
73
77
|
spec.version = "#{Clearance::Version::MAJOR}.#{minor}.0"
|
78
|
+
puts "Version bumped to #{spec.version}"
|
79
|
+
|
74
80
|
Rake::Task["gemspec:write"].invoke
|
75
|
-
puts "
|
81
|
+
puts "Gemspec updated"
|
76
82
|
end
|
77
83
|
|
78
84
|
desc "Bump the gemspec a patch version."
|
@@ -91,8 +97,10 @@ end
|
|
91
97
|
end
|
92
98
|
|
93
99
|
spec.version = "#{Clearance::Version::MAJOR}.#{Clearance::Version::MINOR}.#{patch}"
|
100
|
+
puts "Version bumped to #{spec.version}"
|
101
|
+
|
94
102
|
Rake::Task["gemspec:write"].invoke
|
95
|
-
puts "
|
103
|
+
puts "Gemspec updated"
|
96
104
|
end
|
97
105
|
end
|
98
106
|
end
|
data/TODO.textile
CHANGED
@@ -4,7 +4,6 @@
|
|
4
4
|
# sessions controller test is missing some tests
|
5
5
|
# mailers should not hardcode example.com as from address
|
6
6
|
# check to make sure attr_accessible doesn't override and w/ attr_protected
|
7
|
-
# helpers and tests shouldn't depend on login/logout routes
|
8
7
|
# move shoulda macros in test_helper to shoulda_macros folder
|
9
8
|
# add shoulda and factory girl dependencies to gemspec
|
10
9
|
# refactor Mailer default_url_options[:host] to something cleaner
|
@@ -22,9 +22,9 @@ module Clearance
|
|
22
22
|
def create
|
23
23
|
@user = user_model.new params[:user]
|
24
24
|
if @user.save
|
25
|
-
|
26
|
-
flash[:notice] = "
|
27
|
-
|
25
|
+
UserMailer.deliver_confirmation @user
|
26
|
+
flash[:notice] = "You will receive an email within the next few minutes. It contains instructions to confirm your account."
|
27
|
+
redirect_to new_session_url
|
28
28
|
else
|
29
29
|
render :action => "new"
|
30
30
|
end
|
@@ -34,7 +34,7 @@ module Clearance
|
|
34
34
|
module PrivateInstanceMethods
|
35
35
|
|
36
36
|
def url_after_create
|
37
|
-
|
37
|
+
new_session_url
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
data/lib/clearance/version.rb
CHANGED
@@ -1,19 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
m.login '/login', :action => 'new'
|
15
|
-
m.logout '/logout', :action => 'destroy'
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
1
|
+
ActionController::Routing::Routes.draw do |map|
|
2
|
+
|
3
|
+
map.resources :users
|
4
|
+
map.resource :session
|
5
|
+
|
6
|
+
map.resources :users, :has_one => :password
|
7
|
+
map.resources :users, :has_one => :confirmation
|
8
|
+
|
9
|
+
map.resources :passwords
|
10
|
+
|
11
|
+
map.root :controller => 'sessions', :action => 'new'
|
12
|
+
|
13
|
+
end
|
19
14
|
|