Skip to content

Commit

Permalink
Added rake task to record stats, specs, routes, and code notes to the…
Browse files Browse the repository at this point in the history
… project.
  • Loading branch information
Justin Camerer committed May 8, 2008
1 parent 2e62315 commit 1d74ab0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
13 changes: 6 additions & 7 deletions doc/routes.txt
@@ -1,5 +1,4 @@
(in /Users/iamjwc/programming/craig/rails-base)
/selenium/:filename {:controller=>"switch_environment", :action=>"index"}
POST /user {:controller=>"user", :action=>"create"}
POST /user.:format {:controller=>"user", :action=>"create"}
GET /user/new {:controller=>"user", :action=>"new"}
Expand Down Expand Up @@ -28,10 +27,6 @@ formatted_create_password_reset_code_user POST /user/create_password_reset_cod
POST /users.:format {:controller=>"users", :action=>"create"}
new_user GET /users/new {:controller=>"users", :action=>"new"}
formatted_new_user GET /users/new.:format {:controller=>"users", :action=>"new"}
edit_user GET /users/:id/edit {:controller=>"users", :action=>"edit"}
formatted_edit_user GET /users/:id/edit.:format {:controller=>"users", :action=>"edit"}
roles_user GET /users/:id/roles {:controller=>"users", :action=>"roles"}
formatted_roles_user GET /users/:id/roles.:format {:controller=>"users", :action=>"roles"}
unsuspend_user PUT /users/:id/unsuspend {:controller=>"users", :action=>"unsuspend"}
formatted_unsuspend_user PUT /users/:id/unsuspend.:format {:controller=>"users", :action=>"unsuspend"}
change_roles_user PUT /users/:id/change_roles {:controller=>"users", :action=>"change_roles"}
Expand All @@ -40,6 +35,10 @@ formatted_create_password_reset_code_user POST /user/create_password_reset_cod
formatted_reset_password_user PUT /users/:id/reset_password.:format {:controller=>"users", :action=>"reset_password"}
suspend_user PUT /users/:id/suspend {:controller=>"users", :action=>"suspend"}
formatted_suspend_user PUT /users/:id/suspend.:format {:controller=>"users", :action=>"suspend"}
edit_user GET /users/:id/edit {:controller=>"users", :action=>"edit"}
formatted_edit_user GET /users/:id/edit.:format {:controller=>"users", :action=>"edit"}
roles_user GET /users/:id/roles {:controller=>"users", :action=>"roles"}
formatted_roles_user GET /users/:id/roles.:format {:controller=>"users", :action=>"roles"}
user GET /users/:id {:controller=>"users", :action=>"show"}
formatted_user GET /users/:id.:format {:controller=>"users", :action=>"show"}
PUT /users/:id {:controller=>"users", :action=>"update"}
Expand All @@ -60,8 +59,8 @@ formatted_create_password_reset_code_user POST /user/create_password_reset_cod
PUT /session.:format {:controller=>"session", :action=>"update"}
DELETE /session {:controller=>"session", :action=>"destroy"}
DELETE /session.:format {:controller=>"session", :action=>"destroy"}
login /user/login {:controller=>"session", :action=>:new}
logout /user/logout {:controller=>"session", :action=>:logout}
login /session/login {:controller=>"session", :action=>:new}
logout /session/logout {:controller=>"session", :action=>:logout}
index / {:controller=>"index", :action=>:index}
/:controller/:action/:id
/:controller/:action/:id.:format
6 changes: 6 additions & 0 deletions doc/specs.txt
Expand Up @@ -32,6 +32,12 @@ UserController after logging in
- should allow a user to change their password if they supplied two matching passwords
- should not allow a user to change their password if they supplied two different passwords

UsersController when logged in as an admin
- should display a list of the users
- should be able to create new users
- should be able to suspend and unsuspend a user
- should be able to send a user a password reset code

User
- requires login
- requires password
Expand Down
8 changes: 4 additions & 4 deletions doc/stats.txt
Expand Up @@ -2,16 +2,16 @@
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 227 | 166 | 5 | 28 | 5 | 3 |
| Controllers | 230 | 168 | 5 | 28 | 5 | 4 |
| Helpers | 9 | 8 | 0 | 0 | 0 | 0 |
| Models | 207 | 148 | 4 | 30 | 7 | 2 |
| Libraries | 430 | 242 | 1 | 34 | 34 | 5 |
| Model specs | 190 | 151 | 0 | 1 | 0 | 149 |
| View specs | 0 | 0 | 0 | 0 | 0 | 0 |
| Controller specs | 296 | 220 | 0 | 4 | 0 | 53 |
| Controller specs | 321 | 248 | 0 | 4 | 0 | 60 |
| Helper specs | 0 | 0 | 0 | 0 | 0 | 0 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total | 1359 | 935 | 10 | 97 | 9 | 7 |
| Total | 1387 | 965 | 10 | 97 | 9 | 7 |
+----------------------+-------+-------+---------+---------+-----+-------+
Code LOC: 564 Test LOC: 371 Code to Test Ratio: 1:0.7
Code LOC: 566 Test LOC: 399 Code to Test Ratio: 1:0.7

14 changes: 14 additions & 0 deletions lib/tasks/git.rake
@@ -0,0 +1,14 @@
require 'rake'

namespace :git do
namespace :commit do
task :prepare do
%x{rake stats > doc/stats.txt }
%x{rake spec:doc > doc/specs.txt }
%x{rake routes > doc/routes.txt }
%x{rake notes > doc/code-notes.txt }
%x{git add doc/stats.txt doc/specs.txt doc/routes.txt doc/code-notes.txt }
end
end
end

0 comments on commit 1d74ab0

Please sign in to comment.