From svn at explainpmt.com Mon Feb 6 17:37:47 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 6 Feb 2006 22:37:47 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [160] Edit user form now opens
in same window (completes SC10)
Message-ID: <20060206223747.DB0CDC98FE@thurlow.textdrive.com>
Revision: 160
Author: rmannl
Date: 2006-02-06 22:37:43 +0000 (Mon, 06 Feb 2006)
Log Message:
-----------
Edit user form now opens in same window (completes SC10)
Modified Paths:
--------------
trunk/app/controllers/users_controller.rb
trunk/app/views/layouts/main.rhtml
trunk/app/views/users/index.rhtml
Modified: trunk/app/controllers/users_controller.rb
===================================================================
--- trunk/app/controllers/users_controller.rb 2006-02-06 22:33:16 UTC (rev 159)
+++ trunk/app/controllers/users_controller.rb 2006-02-06 22:37:43 UTC (rev 160)
@@ -19,7 +19,6 @@
class UsersController < ApplicationController
before_filter :require_admin_privileges, :except => [:index, :project]
- popups :edit, :update
# If the 'project_id' request parameter is set, this will display the
# project's team members. Otherwise, it shows all users on the system.
Modified: trunk/app/views/layouts/main.rhtml
===================================================================
--- trunk/app/views/layouts/main.rhtml 2006-02-06 22:33:16 UTC (rev 159)
+++ trunk/app/views/layouts/main.rhtml 2006-02-06 22:37:43 UTC (rev 160)
@@ -15,8 +15,7 @@
<%= top_menu %>
Modified: trunk/public/stylesheets/layout.css
===================================================================
--- trunk/public/stylesheets/layout.css 2006-02-08 03:53:22 UTC (rev 161)
+++ trunk/public/stylesheets/layout.css 2006-02-08 21:30:18 UTC (rev 162)
@@ -192,25 +192,29 @@
#SectionTitle {
padding: 8px;
}
+
#SectionMenu {
padding: 8px;
}
+
#TopMenu {
padding: 8px;
float: right;
}
-#StatusBar {
+#StatusLeft {
position: absolute;
- top: 8px;
+ top: 10px;
left: 15px;
font-size: 10px;
}
-#StatusBar select {
+
+#StatusLeft select {
height: 15px;
font-size: 10px;
}
-#StatusBar input {
+
+#StatusLeft input {
font-size: 10px;
}
From edavis10 at gmail.com Wed Feb 8 19:49:06 2006
From: edavis10 at gmail.com (Eric Davis)
Date: Wed, 08 Feb 2006 16:49:06 -0800
Subject: [eXPlainPMT Developers] Simple Bug Tracking
Message-ID: <43EA9182.2040501@gmail.com>
I use eXPlainPMT everyday at work now for my projects and one feature
that I would like is a simple bug tracker (INBOX != bug_tracker). I was
planning to write a simple scaffolded bug tracker one but I think it
would be a nice feature for eXPlainPMT.
=-=-=-=
Story:
Submitter-
I want to be able to send an email to bugs at example.com and then receive
an email back that will tell me the issue number for my submittal. I
would then be able to view that issue. any comments, and status of it
through eXPlainPMT.
Developer-
The system will email me that a new issue was created. I would then log
in and view the submission to see if it is a valid request. I can then
close the issue, accept the issue, or comment on the issue. If I accept
the issue the issue will then be linked to a story card which can be
picked up like any other story. Once that story card is completed the
system should email the submitter to inform them.
=-=-=-=
Technical: I think all that would be needed is a email sender/receiver,
and controller/model similar to stories. We could add this into stories
themselves but I think issues/bugs should be separate until the issue is
accepted.
=-=-=-=
At the very least, eXPlainPMT should be able to receive stories via
email (set status to received for filtering) and allow a submitter/user
to see the progress on them (SC31 - public read-only access would solve
this).
What do you all think? I want to keep it simple and don't want to
maintain another web app with duplicated data to track issues.
--
Eric Davis
edavis10 at gmail.com | http://www.theadmin.org
v2sw5/7Rhw5lnln3pr5Ock1ma6u6/8LMw2m6l7Di2e6t4Gb8ODTH+en5g5Ma22 hackerkey.com
From johnwilger at gmail.com Thu Feb 9 13:29:52 2006
From: johnwilger at gmail.com (John Wilger)
Date: Thu, 9 Feb 2006 10:29:52 -0800
Subject: [eXPlainPMT Developers] Simple Bug Tracking
In-Reply-To: <43EA9182.2040501@gmail.com>
References: <43EA9182.2040501@gmail.com>
Message-ID:
On 2/8/06, Eric Davis wrote:
> I use eXPlainPMT everyday at work now for my projects and one feature
> that I would like is a simple bug tracker (INBOX != bug_tracker). I was
> planning to write a simple scaffolded bug tracker one but I think it
> would be a nice feature for eXPlainPMT.
Defect tracking is definitely "on the radar" as something to be
included in eXPlainPMT. The story card tracking features currently in
the system work, but are still a bit rough around the edges. I'd like
to get those edges cleaned up a bit more before we start working on
other major features, but defect tracking is likely the next major
feature to be tackled.
Personally, I've been using story cards to track defects on my own
projects (including this one) by prepending "[DEFECT]" to the title.
This isn't a good "inbox" for defects, since you should only write the
story once the defect has been verified, but it at least provides the
tracking. Not a great solution, but a temporary work around.
> Submitter-
> I want to be able to send an email to bugs at example.com and then receive
> an email back that will tell me the issue number for my submittal. I
> would then be able to view that issue. any comments, and status of it
> through eXPlainPMT.
I think I'd separate this into two (at least) cards -- one to allow
defects to be submitted via the web interface, and another to
optionally allow defects to be submitted via email as well (since
setting up the email receiving requires more per-project configuration
-- the web interface is a good step in between the two).
>
> Developer-
> The system will email me that a new issue was created. I would then log
> in and view the submission to see if it is a valid request. I can then
> close the issue, accept the issue, or comment on the issue. If I accept
> the issue the issue will then be linked to a story card which can be
> picked up like any other story. Once that story card is completed the
> system should email the submitter to inform them.
This is basically right on target for what I was thinking. Again, I
would probably seperate the "email" functionality into a seperate
card, though.
> At the very least, eXPlainPMT should be able to receive stories via
> email (set status to received for filtering)
Receiving actual story cards via email (in addition to defect reports)
is a good idea, but definitely a lower priority for me at this point.
> What do you all think? I want to keep it simple and don't want to
> maintain another web app with duplicated data to track issues.
I'd expect to see us start working on the defect reporting
functionality sometime in the first half of this year. In the
meantime, I'd suggest just prepending to the story titles as I
suggested above if you want to avoid using a seperate defect-tracking
tool.
--
Regards,
John Wilger
http://johnwilger.com
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
From edavis10 at gmail.com Thu Feb 9 14:45:34 2006
From: edavis10 at gmail.com (edavis10@gmail.com)
Date: Thu, 09 Feb 2006 11:45:34 -0800
Subject: [eXPlainPMT Developers] Simple Bug Tracking
In-Reply-To:
References: <43EA9182.2040501@gmail.com>
Message-ID: <43EB9BDE.8050800@gmail.com>
John Wilger wrote:
> Defect tracking is definitely "on the radar" as something to be
> included in eXPlainPMT.
Good to hear that this is in the general scope of the project.
> Personally, I've been using story cards to track defects on my own
> projects (including this one) by prepending "[DEFECT]" to the title.
> This isn't a good "inbox" for defects, since you should only write the
> story once the defect has been verified, but it at least provides the
> tracking. Not a great solution, but a temporary work around.
Yea I have been doing something similar but the hardest part is my users
are not highly technical. If they have to jump though too many hoops
they would just IM or email the bug out of the system.
> I think I'd separate this into two (at least) cards -- one to allow
> defects to be submitted via the web interface, and another to
> optionally allow defects to be submitted via email as well (since
> setting up the email receiving requires more per-project configuration
> -- the web interface is a good step in between the two).
I totally agree, a web-interface is a must.
> I'd expect to see us start working on the defect reporting
> functionality sometime in the first half of this year.
Ok, depending on how much my load scales up I might try to work on this
on the side and then merge it in to the main code later.
Thanks for the comments.
Eric Davis
From svn at explainpmt.com Thu Feb 9 16:45:18 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Thu, 9 Feb 2006 21:45:18 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [163] Just testing something
Message-ID: <20060209214518.58B1FC99B2@thurlow.textdrive.com>
Revision: 163
Author: jwilger
Date: 2006-02-09 21:45:17 +0000 (Thu, 09 Feb 2006)
Log Message:
-----------
Just testing something
Modified Paths:
--------------
trunk/README
Modified: trunk/README
===================================================================
--- trunk/README 2006-02-08 21:30:18 UTC (rev 162)
+++ trunk/README 2006-02-09 21:45:17 UTC (rev 163)
@@ -54,3 +54,4 @@
7. Load up the application in your browser, log in, and enjoy!
+test
From svn at explainpmt.com Thu Feb 9 16:54:59 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Thu, 9 Feb 2006 21:54:59 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [164] Just testing something
Message-ID: <20060209215459.BD712C9A7A@thurlow.textdrive.com>
Revision: 164
Author: jwilger
Date: 2006-02-09 21:54:58 +0000 (Thu, 09 Feb 2006)
Log Message:
-----------
Just testing something
Modified Paths:
--------------
trunk/README
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1221
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1221
Modified: trunk/README
===================================================================
--- trunk/README 2006-02-09 21:45:17 UTC (rev 163)
+++ trunk/README 2006-02-09 21:54:58 UTC (rev 164)
@@ -53,5 +53,3 @@
Apache or lighttpd as directed in the documentation for the Rails framework.
7. Load up the application in your browser, log in, and enjoy!
-
-test
From johnwilger at gmail.com Thu Feb 9 18:01:08 2006
From: johnwilger at gmail.com (John Wilger)
Date: Thu, 9 Feb 2006 15:01:08 -0800
Subject: [eXPlainPMT Developers] rejected SC9 & SC10
Message-ID:
I just rejected SC9 & SC10. See notes on the cards.
--
Regards,
John Wilger
http://johnwilger.com
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
From mannl at gmx.com Thu Feb 9 19:30:10 2006
From: mannl at gmx.com (Robert C. Mannl)
Date: Fri, 10 Feb 2006 01:30:10 +0100
Subject: [eXPlainPMT Developers] rejected SC9 & SC10
In-Reply-To:
References:
Message-ID: <74838B14-3CC0-430E-BB86-0EE0E3C69F18@gmx.com>
Ok, gonna work on this hopefully before this iteration ends,
cheers,
Rob
From johnwilger at gmail.com Fri Feb 10 11:16:06 2006
From: johnwilger at gmail.com (John Wilger)
Date: Fri, 10 Feb 2006 08:16:06 -0800
Subject: [eXPlainPMT Developers] rejected SC9 & SC10
In-Reply-To: <74838B14-3CC0-430E-BB86-0EE0E3C69F18@gmx.com>
References:
<74838B14-3CC0-430E-BB86-0EE0E3C69F18@gmx.com>
Message-ID:
On 2/9/06, Robert C. Mannl wrote:
> Ok, gonna work on this hopefully before this iteration ends,
You can probably use some of the same logic that is used when editing
a story card, since the same issue occurred there. Perhaps there's a
good way to then refactor that out into something more generically
reusable.
--
Regards,
John Wilger
http://johnwilger.com
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
From svn at explainpmt.com Fri Feb 10 17:19:21 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 10 Feb 2006 22:19:21 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [165] Refactored 'back to
referer' redirection
Message-ID: <20060210221921.2FCD4C9878@thurlow.textdrive.com>
Revision: 165
Author: rmannl
Date: 2006-02-10 22:19:14 +0000 (Fri, 10 Feb 2006)
Log Message:
-----------
Refactored 'back to referer' redirection
Modified Paths:
--------------
trunk/app/controllers/application.rb
trunk/app/controllers/stories_controller.rb
trunk/app/controllers/users_controller.rb
trunk/test/functional/users_controller_test.rb
Modified: trunk/app/controllers/application.rb
===================================================================
--- trunk/app/controllers/application.rb 2006-02-09 21:54:58 UTC (rev 164)
+++ trunk/app/controllers/application.rb 2006-02-10 22:19:14 UTC (rev 165)
@@ -132,6 +132,26 @@
return false
end
end
+
+ # Saves the HTTP_REFERER into the session
+ # Used in conjunction with #return_to_referer
+ def register_referer
+ @session[:referer] = request.env['HTTP_REFERER'] unless
+ request.env['HTTP_REFERER'].blank?
+ end
+
+ # Redirects the user back to the registered referer, and deletes the referer
+ # Returns false if no referer was registered
+ # Used in conjunction with #register_referer
+ def redirect_to_referer
+ if session[:referer]
+ redirect_to session[:referer]
+ session[:referer] = nil
+ return true
+ else
+ return false
+ end
+ end
end
Modified: trunk/app/controllers/stories_controller.rb
===================================================================
--- trunk/app/controllers/stories_controller.rb 2006-02-09 21:54:58 UTC (rev 164)
+++ trunk/app/controllers/stories_controller.rb 2006-02-10 22:19:14 UTC (rev 165)
@@ -78,7 +78,7 @@
def edit
@page_title = "Edit story card"
@selected_main_menu_link = :none
- @session[:return_to] = request.env['HTTP_REFERER']
+ register_referer
if @story = @session[:edit_story]
@session[:edit_story] = nil
@@ -99,11 +99,7 @@
story.save
flash[:status] = 'The changes to the story card have been saved.'
- if @session[:return_to]
- logger.debug('Returning to '+ at session[:return_to])
- redirect_to @session[:return_to]
- @session[:return_to] = nil
- else
+ unless redirect_to_referer
redirect_to :controller => 'stories', :action => 'index',
:project_id => @project.id.to_s
end
Modified: trunk/app/controllers/users_controller.rb
===================================================================
--- trunk/app/controllers/users_controller.rb 2006-02-09 21:54:58 UTC (rev 164)
+++ trunk/app/controllers/users_controller.rb 2006-02-10 22:19:14 UTC (rev 165)
@@ -39,6 +39,7 @@
@user = @session[:new_user]
@session[:new_user] = nil
else
+ register_referer
@user = User.new
end
end
@@ -50,6 +51,8 @@
if @session[:edit_user]
@user = @session[:edit_user]
@session[:edit_user] = nil
+ else
+ register_referer
end
end
@@ -66,7 +69,10 @@
flash[:status] = "User account for #{user.full_name} has been " +
"created and added to the project team."
end
- render 'layouts/refresh_parent_close_popup'
+
+ unless redirect_to_referer
+ redirect_to :controller => 'dashboard'
+ end
else
@session[:new_user] = user
if @project
@@ -95,7 +101,9 @@
if user.valid?
user.save
flash[:status] = "User account for #{user.full_name} has been updated."
- render 'layouts/refresh_parent_close_popup'
+ unless redirect_to_referer
+ redirect_to :controller => 'dashboard'
+ end
else
@session[:edit_user] = user
redirect_to(:controller => 'users', :action => 'edit', :id => user.id)
Modified: trunk/test/functional/users_controller_test.rb
===================================================================
--- trunk/test/functional/users_controller_test.rb 2006-02-09 21:54:58 UTC (rev 164)
+++ trunk/test/functional/users_controller_test.rb 2006-02-10 22:19:14 UTC (rev 165)
@@ -43,7 +43,8 @@
get :edit, 'id' => @user_one.id
assert_response :success
post :update, 'id' => @user_one.id, 'user' => {}
- assert_response :success
+ assert_response :redirect
+ assert_redirected_to :controller => 'dashboard'
user = User.find @user_one.id
assert !user.admin?
end
@@ -109,8 +110,8 @@
'password_confirmation' => 'test_create_password',
'email' => 'test_create at example.com', 'first_name' => 'Test',
'last_name' => 'Create' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'dashboard'
assert_equal num_users + 1, User.count
end
@@ -133,8 +134,8 @@
'password_confirmation' => 'test_create_password',
'email' => 'test_create at example.com', 'first_name' => 'Test',
'last_name' => 'Create' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'dashboard'
assert_equal num_users + 1, User.count
user = User.find :first,
:conditions => [ 'username = ?', 'test_create_with_project' ]
@@ -172,8 +173,8 @@
def test_update
@request.session[ :current_user ] = @admin
post :update, 'id' => @user_one.id, 'user' => { 'last_name' => 'Foo' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'dashboard'
assert_equal 'Foo', User.find( @user_one.id ).last_name
end
From mannl at gmx.com Fri Feb 10 17:21:22 2006
From: mannl at gmx.com (Robert C. Mannl)
Date: Fri, 10 Feb 2006 23:21:22 +0100
Subject: [eXPlainPMT Developers] rejected SC9 & SC10
In-Reply-To:
References:
<74838B14-3CC0-430E-BB86-0EE0E3C69F18@gmx.com>
Message-ID: <8543B2A3-7C91-4F9E-B337-CC147BFAEDEE@gmx.com>
>> Ok, gonna work on this hopefully before this iteration ends,
>
> You can probably use some of the same logic that is used when editing
> a story card, since the same issue occurred there. Perhaps there's a
> good way to then refactor that out into something more generically
> reusable.
Ok, I did that. I added two methods to the ApplicationController:
register_referer # Saves the referer into the session
redirect_to_referer # Redirects the user back to the referer
specified in the session
I wrote a test which simulates a HTTP_REFERER. I then implemented the
code into UsersController and StoriesController to make the test
work. Real world testing worked (opening the browser, and hitting
the app). However, the test still failed. Hence, my test is broken,
and I can't figure out why:
def test_new_and_create_with_referer
# Set referer
referer = 'http://test-referer.com/'
@request.env['HTTP_REFERER'] = referer
# Hit the new action where the referer is saved into the session
using
# ApplicationController#register_referer
# This is where the problem happens: the action doesn't seem to see
# the HTTP_REFERER I set above. I tested this using breakpointers.
get :new
# Post to the create action
post :create, 'user' => { 'username' => 'test_create',
'password' => 'test_create_password',
'password_confirmation' => 'test_create_password',
'email' => 'test_create at example.com', 'first_name' => 'Test',
'last_name' => 'Create' }
# The user ought to be redirected to the referer specified above
assert_redirected_to referer
end
I will try figuring this out tomorrow.
If anyone has any ideas, they are greatly appreciated.
Rob
From svn at explainpmt.com Fri Feb 10 20:03:24 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Sat, 11 Feb 2006 01:03:24 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [166] Tagging release
20060211.0
Message-ID: <20060211010324.D8577C999A@thurlow.textdrive.com>
Revision: 166
Author: jwilger
Date: 2006-02-11 01:03:24 +0000 (Sat, 11 Feb 2006)
Log Message:
-----------
Tagging release 20060211.0
Added Paths:
-----------
tags/release_20060211.0/
Copied: tags/release_20060211.0 (from rev 165, trunk)
From svn at explainpmt.com Fri Feb 10 20:05:28 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Sat, 11 Feb 2006 01:05:28 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [167] updating version string
for release
Message-ID: <20060211010528.EB51EC99B5@thurlow.textdrive.com>
Revision: 167
Author: jwilger
Date: 2006-02-11 01:05:28 +0000 (Sat, 11 Feb 2006)
Log Message:
-----------
updating version string for release
Modified Paths:
--------------
tags/release_20060211.0/app/helpers/application_helper.rb
Modified: tags/release_20060211.0/app/helpers/application_helper.rb
===================================================================
--- tags/release_20060211.0/app/helpers/application_helper.rb 2006-02-11 01:03:24 UTC (rev 166)
+++ tags/release_20060211.0/app/helpers/application_helper.rb 2006-02-11 01:05:28 UTC (rev 167)
@@ -19,7 +19,7 @@
# The methods added to this helper will be available to all templates in the application.
module ApplicationHelper
- VERSION = 'dev trunk'
+ VERSION = '20060211.0'
# Used to determine if the currently logged in user has administrative
# privileges
From svn at explainpmt.com Sun Feb 12 20:06:19 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 01:06:19 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [168] r1236@Zen: eric |
2006-02-12 17:05:06 -0800
Message-ID: <20060213010619.D1A2EC9C34@thurlow.textdrive.com>
Revision: 168
Author: edavis
Date: 2006-02-13 01:06:18 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
r1236 at Zen: eric | 2006-02-12 17:05:06 -0800
Fixed failing test in test_add_users(ProjectsControllerTest).
Logic was correct, just the users were coming back in a different order than
what the assert was expecting.
Modified Paths:
--------------
trunk/test/functional/projects_controller_test.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1221
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1236
Modified: trunk/test/functional/projects_controller_test.rb
===================================================================
--- trunk/test/functional/projects_controller_test.rb 2006-02-11 01:05:28 UTC (rev 167)
+++ trunk/test/functional/projects_controller_test.rb 2006-02-13 01:06:18 UTC (rev 168)
@@ -106,7 +106,9 @@
assert_response :success
assert_equal @project_one, assigns( :project )
assert_template 'add_users'
- available = User.find( :all ) - @project_one.users
+ available = User.find( :all,
+ :order => 'last_name ASC, first_name ASC' ) -
+ @project_one.users
assert_equal available, assigns( :available_users )
end
From svn at explainpmt.com Sun Feb 12 20:52:10 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 01:52:10 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [169] r1238@Zen: eric |
2006-02-12 17:51:39 -0800
Message-ID: <20060213015210.2CF2BC9BB4@thurlow.textdrive.com>
Revision: 169
Author: edavis
Date: 2006-02-13 01:52:07 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
r1238 at Zen: eric | 2006-02-12 17:51:39 -0800
SC50: [DEFECT] milestones calendar on project dashboard should not display
project name before milestone name
Updated the _milestones_calendar.rhtml to change the text of the link on the
calendar based on if the page is showing a project or all project (@project is
set or not)
Also added assert_tags to check for the presence of the text during tests.
Modified Paths:
--------------
trunk/app/views/milestones/_milestones_calendar.rhtml
trunk/test/functional/milestones_controller_test.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1236
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1238
Modified: trunk/app/views/milestones/_milestones_calendar.rhtml
===================================================================
--- trunk/app/views/milestones/_milestones_calendar.rhtml 2006-02-13 01:06:18 UTC (rev 168)
+++ trunk/app/views/milestones/_milestones_calendar.rhtml 2006-02-13 01:52:07 UTC (rev 169)
@@ -16,7 +16,13 @@
<% day[:milestones].each do |milestone| %>
- <%= popup_link("#{milestone.project.name}: #{milestone.name}",
+ <% if @project -%>
+ <% milestone_popup_name = milestone.name -%>
+ <% else -%>
+ <% milestone_popup_name = "#{milestone.project.name}: " +
+ "#{milestone.name}" -%>
+ <% end -%>
+ <%= popup_link( milestone_popup_name,
"milestone_#{milestone.id}",
'width=500,height=500,resizable,scrollbars',
:controller => 'milestones',
Modified: trunk/test/functional/milestones_controller_test.rb
===================================================================
--- trunk/test/functional/milestones_controller_test.rb 2006-02-13 01:06:18 UTC (rev 168)
+++ trunk/test/functional/milestones_controller_test.rb 2006-02-13 01:52:07 UTC (rev 169)
@@ -160,11 +160,16 @@
assert_template '_milestones_calendar'
days = empty_milestones_days_array
days[0][:milestones] << @future_milestone1
+ # These two lines are randomly causing the next assertion to fail. This
+ # is because somehow, from one test to the next, the @days is having them
+ # loaded in different orders.
days[13][:milestones] << @future_milestone4
days[13][:milestones] << @future_milestone3
assert_equal days, assigns(:days)
assert_equal 'Upcoming Milestones (all projects):',
assigns(:calendar_title)
+ assert_tag :tag => "li", :content =>"Project One: Milestone Seven"
+ assert_tag :tag => "li", :content =>"Project Two: Milestone Eight"
end
def test_milestones_calendar_one_project
@@ -176,6 +181,8 @@
days[13][:milestones] << @future_milestone3
assert_equal days, assigns(:days)
assert_equal 'Upcoming Milestones:', assigns(:calendar_title)
+ assert_no_tag :tag => "li", :content =>"Project One: Milestone Seven"
+ assert_tag :tag => "li", :content =>"Milestone Seven"
end
def test_list_future
From edavis10 at gmail.com Sun Feb 12 20:55:12 2006
From: edavis10 at gmail.com (Eric Davis)
Date: Sun, 12 Feb 2006 17:55:12 -0800
Subject: [eXPlainPMT Developers] SC 50 Complete
Message-ID: <43EFE700.4080704@gmail.com>
SC50: [DEFECT] milestones calendar on project dashboard should not
display project name before milestone n{ame}
Completed in r169. I as assuming that the title meant to have ame at
the end of it, it was truncated and there was no definition.
--
Eric Davis
edavis10 at gmail.com | http://www.theadmin.org
v2sw5/7Rhw5lnln3pr5Ock1ma6u6/8LMw2m6l7Di2e6t4Gb8ODTH+en5g5Ma22 hackerkey.com
From svn at explainpmt.com Sun Feb 12 21:18:25 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 02:18:25 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [170] r1240@Zen: eric |
2006-02-12 18:17:29 -0800
Message-ID: <20060213021825.C0AD4C9A8F@thurlow.textdrive.com>
Revision: 170
Author: edavis
Date: 2006-02-13 02:18:23 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
r1240 at Zen: eric | 2006-02-12 18:17:29 -0800
Adjusted milestones fixture and the calendar tests so two milestones do not
fall on the same day. When they do the tests may cause false positive
failures (or true negative passes ??). This test should now be consistent in
it's behavior.
Modified Paths:
--------------
trunk/test/fixtures/milestones.yml
trunk/test/functional/milestones_controller_test.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1238
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
Modified: trunk/test/fixtures/milestones.yml
===================================================================
--- trunk/test/fixtures/milestones.yml 2006-02-13 01:52:07 UTC (rev 169)
+++ trunk/test/fixtures/milestones.yml 2006-02-13 02:18:23 UTC (rev 170)
@@ -32,7 +32,7 @@
id: 7
project_id: 1
name: 'Milestone Seven'
- date: <%= Date.today + 13 %>
+ date: <%= Date.today + 12 %>
eighth:
id: 8
project_id: 2
Modified: trunk/test/functional/milestones_controller_test.rb
===================================================================
--- trunk/test/functional/milestones_controller_test.rb 2006-02-13 01:52:07 UTC (rev 169)
+++ trunk/test/functional/milestones_controller_test.rb 2006-02-13 02:18:23 UTC (rev 170)
@@ -160,11 +160,8 @@
assert_template '_milestones_calendar'
days = empty_milestones_days_array
days[0][:milestones] << @future_milestone1
- # These two lines are randomly causing the next assertion to fail. This
- # is because somehow, from one test to the next, the @days is having them
- # loaded in different orders.
+ days[12][:milestones] << @future_milestone3
days[13][:milestones] << @future_milestone4
- days[13][:milestones] << @future_milestone3
assert_equal days, assigns(:days)
assert_equal 'Upcoming Milestones (all projects):',
assigns(:calendar_title)
@@ -178,7 +175,7 @@
assert_template '_milestones_calendar'
days = empty_milestones_days_array
days[0][:milestones] << @future_milestone1
- days[13][:milestones] << @future_milestone3
+ days[12][:milestones] << @future_milestone3
assert_equal days, assigns(:days)
assert_equal 'Upcoming Milestones:', assigns(:calendar_title)
assert_no_tag :tag => "li", :content =>"Project One: Milestone Seven"
From svn at explainpmt.com Mon Feb 13 09:51:09 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 14:51:09 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [171] Ignoring
explainpmt.tmproj in project root dir (TextMate project file)
Message-ID: <20060213145109.E987BC9C61@thurlow.textdrive.com>
Revision: 171
Author: jwilger
Date: 2006-02-13 14:51:05 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
Ignoring explainpmt.tmproj in project root dir (TextMate project file)
Fixed defect SC36. Contact cards for users with long names are now displayed without being mangled.
Modified Paths:
--------------
trunk/app/controllers/users_controller.rb
trunk/app/views/users/index.rhtml
trunk/app/views/users/project.rhtml
trunk/config/environment.rb
trunk/public/stylesheets/layout.css
trunk/test/functional/users_controller_test.rb
Added Paths:
-----------
trunk/app/views/users/_contact_cards.rhtml
trunk/lib/array_each_slice.rb
trunk/test/unit/array_each_slice_test.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- doc
+ doc
explainpmt.tmproj
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:63
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:72
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
Modified: trunk/app/controllers/users_controller.rb
===================================================================
--- trunk/app/controllers/users_controller.rb 2006-02-13 02:18:23 UTC (rev 170)
+++ trunk/app/controllers/users_controller.rb 2006-02-13 14:51:05 UTC (rev 171)
@@ -25,6 +25,7 @@
def index
if @project
@page_title = "Project Team"
+ @users = @project.users
render 'users/project'
else
@page_title = "System Users"
Added: trunk/app/views/users/_contact_cards.rhtml
===================================================================
--- trunk/app/views/users/_contact_cards.rhtml (rev 0)
+++ trunk/app/views/users/_contact_cards.rhtml 2006-02-13 14:51:05 UTC (rev 171)
@@ -0,0 +1,43 @@
+
\ No newline at end of file
Modified: trunk/app/views/users/index.rhtml
===================================================================
--- trunk/app/views/users/index.rhtml 2006-02-13 02:18:23 UTC (rev 170)
+++ trunk/app/views/users/index.rhtml 2006-02-13 14:51:05 UTC (rev 171)
@@ -11,33 +11,7 @@
<% end %>
- <% end %>
+ <%= render_partial 'contact_cards' %>
Modified: trunk/config/environment.rb
===================================================================
--- trunk/config/environment.rb 2006-02-13 02:18:23 UTC (rev 170)
+++ trunk/config/environment.rb 2006-02-13 14:51:05 UTC (rev 171)
@@ -50,4 +50,5 @@
# inflect.uncountable %w( fish sheep )
# end
-# Include your application configuration below
\ No newline at end of file
+# Include your application configuration below
+require 'array_each_slice'
\ No newline at end of file
Added: trunk/lib/array_each_slice.rb
===================================================================
--- trunk/lib/array_each_slice.rb (rev 0)
+++ trunk/lib/array_each_slice.rb 2006-02-13 14:51:05 UTC (rev 171)
@@ -0,0 +1,10 @@
+class Array
+ def each_slice(size, &block)
+ array = self.dup
+ until array.empty?
+ slice = []
+ size.times { slice << array.shift }
+ yield slice.reject { |x| x.nil? }
+ end
+ end
+end
\ No newline at end of file
Modified: trunk/public/stylesheets/layout.css
===================================================================
--- trunk/public/stylesheets/layout.css 2006-02-13 02:18:23 UTC (rev 170)
+++ trunk/public/stylesheets/layout.css 2006-02-13 14:51:05 UTC (rev 171)
@@ -64,10 +64,7 @@
}
div.contact_card {
- float: left;
- width: 15em;
- height: 8em;
- overflow: hidden;
+ width: 20em;
border: 1px solid;
margin: 2px;
padding: 3px;
@@ -76,7 +73,6 @@
div.contact_card h3 {
font-size: 15px;
- height: 21px;
margin: 0 0 5px 0;
padding: 0 17px 0 0;
}
Modified: trunk/test/functional/users_controller_test.rb
===================================================================
--- trunk/test/functional/users_controller_test.rb 2006-02-13 02:18:23 UTC (rev 170)
+++ trunk/test/functional/users_controller_test.rb 2006-02-13 14:51:05 UTC (rev 171)
@@ -69,6 +69,7 @@
get :index, 'project_id' => @project_one.id
assert_template 'project'
assert_equal @project_one, assigns( :project )
+ assert_equal @project_one.users, assigns(:users)
end
def test_new
Added: trunk/test/unit/array_each_slice_test.rb
===================================================================
--- trunk/test/unit/array_each_slice_test.rb (rev 0)
+++ trunk/test/unit/array_each_slice_test.rb 2006-02-13 14:51:05 UTC (rev 171)
@@ -0,0 +1,22 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'array_each_slice'
+class ArrayEachSliceTest < Test::Unit::TestCase
+ def test_each_slice
+ a = [1,2,3,4,5,6,7,8,9]
+ expected = [[1,2,3],[4,5,6],[7,8,9]]
+ result = []
+ a.each_slice 3 do |slice|
+ result << slice
+ end
+ assert_equal expected, result
+ end
+
+ def test_each_slice_does_not_modify_receiver
+ a = [1,2,3]
+ b = a.dup
+ a.each_slice 3 do |slice|
+ slice
+ end
+ assert_equal b, a
+ end
+end
\ No newline at end of file
From svn at explainpmt.com Mon Feb 13 10:09:38 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 15:09:38 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [172] Added migration to
increase length of stories.title column to 255.
Message-ID: <20060213150938.24810C9B23@thurlow.textdrive.com>
Revision: 172
Author: jwilger
Date: 2006-02-13 15:09:35 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
Added migration to increase length of stories.title column to 255. The schema.rb file didn't have this restriction, but older installs that used the raw SQL file to set up the database were set up with a smaller length for this column. (SC51)
Modified Paths:
--------------
trunk/db/schema.rb
Added Paths:
-----------
trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb
trunk/db/migrate/002_add_length255_to_story_title.rb
Removed Paths:
-------------
trunk/db/migrate/1_fix_stories_table_to_use_integer_fields_not_boolean.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:72
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:74
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
Added: trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb
===================================================================
--- trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb (rev 0)
+++ trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb 2006-02-13 15:09:35 UTC (rev 172)
@@ -0,0 +1,13 @@
+class FixStoriesTableToUseIntegerFieldsNotBoolean < ActiveRecord::Migration
+ def self.up
+ change_column :stories, :status, :integer
+ change_column :stories, :risk, :integer
+ change_column :stories, :priority, :integer
+ end
+
+ def self.down
+ change_column :stories, :status, :boolean
+ change_column :stories, :risk, :boolean
+ change_column :stories, :priority, :boolean
+ end
+end
Added: trunk/db/migrate/002_add_length255_to_story_title.rb
===================================================================
--- trunk/db/migrate/002_add_length255_to_story_title.rb (rev 0)
+++ trunk/db/migrate/002_add_length255_to_story_title.rb 2006-02-13 15:09:35 UTC (rev 172)
@@ -0,0 +1,9 @@
+class AddLength255ToStoryTitle < ActiveRecord::Migration
+ def self.up
+ change_column :stories, :title, :string, :length => 255
+ end
+
+ def self.down
+ change_column :stories, :title, :string
+ end
+end
Deleted: trunk/db/migrate/1_fix_stories_table_to_use_integer_fields_not_boolean.rb
===================================================================
--- trunk/db/migrate/1_fix_stories_table_to_use_integer_fields_not_boolean.rb 2006-02-13 14:51:05 UTC (rev 171)
+++ trunk/db/migrate/1_fix_stories_table_to_use_integer_fields_not_boolean.rb 2006-02-13 15:09:35 UTC (rev 172)
@@ -1,13 +0,0 @@
-class FixStoriesTableToUseIntegerFieldsNotBoolean < ActiveRecord::Migration
- def self.up
- change_column :stories, :status, :integer
- change_column :stories, :risk, :integer
- change_column :stories, :priority, :integer
- end
-
- def self.down
- change_column :stories, :status, :boolean
- change_column :stories, :risk, :boolean
- change_column :stories, :priority, :boolean
- end
-end
Modified: trunk/db/schema.rb
===================================================================
--- trunk/db/schema.rb 2006-02-13 14:51:05 UTC (rev 171)
+++ trunk/db/schema.rb 2006-02-13 15:09:35 UTC (rev 172)
@@ -2,7 +2,7 @@
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
-ActiveRecord::Schema.define(:version => 1) do
+ActiveRecord::Schema.define(:version => 2) do
create_table "iterations", :force => true do |t|
t.column "project_id", :integer, :default => 0, :null => false
From svn at explainpmt.com Mon Feb 13 10:26:40 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 15:26:40 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [173] Fixed
StoriesControllerTest#test_update_return_to_referer.
Message-ID: <20060213152640.C7970C9BDA@thurlow.textdrive.com>
Revision: 173
Author: jwilger
Date: 2006-02-13 15:26:38 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
Fixed StoriesControllerTest#test_update_return_to_referer. The incorrect session variable was being set, so the action didn't _have_ a referer to return to.
Modified Paths:
--------------
trunk/app/controllers/application.rb
trunk/app/controllers/stories_controller.rb
trunk/test/functional/stories_controller_test.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:74
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:76
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
Modified: trunk/app/controllers/application.rb
===================================================================
--- trunk/app/controllers/application.rb 2006-02-13 15:09:35 UTC (rev 172)
+++ trunk/app/controllers/application.rb 2006-02-13 15:26:38 UTC (rev 173)
@@ -1,157 +1,158 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
-# The filters added to this controller will be run for all controllers in the application.
-# Likewise will all the methods added be available for all controllers.
-class ApplicationController < ActionController::Base
- model :user
- model :project
- model :iteration
- model :story
- model :milestone
-
- helper :sort
- helper :collection_table
-
- layout :choose_layout
- before_filter :check_authentication
- before_filter :set_selected_project
- before_filter :require_team_membership
-
- protected
-
- # Used as a before_filter to instantiate the @project instance variable based
- # on the 'project_id' request parameter. This ensures that @project is always
- # available when performing actions that should occur within the context of a
- # single project.
- def set_selected_project
- if @params['project_id']
- @project = Project.find(@params['project_id'])
- else
- @project = nil
- end
- end
-
- # Used as a before_filter to ensure that the 'current_user' session variable
- # contians a valid User (or descendent class) object. Otherwise the user is
- # redirected to the login page. If redirected, the 'return-to' session
- # variable will contain the path to the page the user was originally trying to
- # access.
- def check_authentication
- unless @session[:current_user].kind_of?(User) or
- self.class == SessionController
-
- @session[:return_to] = @request.request_uri
- flash[:status] = "Please log in, and we'll send you right along."
- redirect_to :controller => 'session', :action => 'login'
- return false
- end
- end
-
- # This method can be used as a before_filter for actions which should require
- # admin privileges to perform. If the user tries to perform an action which
- # triggers this filter, and they do not have admin privileges, they will be
- # redirected to the error page with an error message saying that they must log
- # in as an administrator to perform the requested action.
- def require_admin_privileges
- unless @session[:current_user].admin?
- flash[:error] = "You must be logged in as an administrator to perform " +
- "the requested action."
- redirect_to :controller => 'error', :action => 'index'
- return false
- end
- end
-
- # Used as a before_filter to ensure that the currently logged in user is
- # allowed to access the current project by determining whether he is an
- # administrator or if he is on the project team.
- def require_team_membership
- if @project and !@session[:current_user].admin?
- unless User.find(@session[:current_user].id).projects.include?(@project)
- flash[:error] = 'You do not have permission to access the project, ' +
- 'because you are not part of the project team.'
- redirect_to :controller => 'error', :action => 'index'
- return false
- end
- end
- end
-
- # Used in the controller class definitions to specify which actions should be
- # rendered using the popup layout.
- def self.popups(*popup_actions)
- @@popups ||= {}
- @@popups[controller_name] ||= []
- popup_actions.each do |a|
- @@popups[controller_name] << a.to_sym
- end
- end
-
- # Chooses whether to use the regular page layout or the popup page layout
- # depending on whether the action is listed as one of the controller's popup
- # views.
- def choose_layout
- @@popups ||= {}
- @@popups[controller_name] ||= []
- if @@popups[controller_name].include?(action_name.to_sym)
- 'layouts/popup'
- else
- 'layouts/main'
- end
- end
-
- # Used as a before_filter to ensure that a project is selected. If no project
- # is selected, the user is sent to an error page.
- def require_current_project
- unless @project
- @@popups ||= {}
- @@popups[controller_name] ||= []
- if @@popups[controller_name].include? action_name.to_sym
- redirect_to :controller => 'error', :action => 'popup'
- else
- redirect_to :controller => 'error', :action => 'index'
- end
- flash[:error] = "You attempted to access a view that requires a " +
- "project to be selected, but no project id was set in " +
- "your request."
- return false
- end
- end
-
- # Saves the HTTP_REFERER into the session
- # Used in conjunction with #return_to_referer
- def register_referer
- @session[:referer] = request.env['HTTP_REFERER'] unless
- request.env['HTTP_REFERER'].blank?
- end
-
- # Redirects the user back to the registered referer, and deletes the referer
- # Returns false if no referer was registered
- # Used in conjunction with #register_referer
- def redirect_to_referer
- if session[:referer]
- redirect_to session[:referer]
- session[:referer] = nil
- return true
- else
- return false
- end
- end
-end
-
-
+=begin License
+ eXPlain Project Management Tool
+ Copyright (C) 2005 John Wilger
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+=end LICENSE
+
+# The filters added to this controller will be run for all controllers in the application.
+# Likewise will all the methods added be available for all controllers.
+class ApplicationController < ActionController::Base
+ model :user
+ model :project
+ model :iteration
+ model :story
+ model :milestone
+
+ helper :sort
+ helper :collection_table
+
+ layout :choose_layout
+ before_filter :check_authentication
+ before_filter :set_selected_project
+ before_filter :require_team_membership
+
+ protected
+
+ # Used as a before_filter to instantiate the @project instance variable based
+ # on the 'project_id' request parameter. This ensures that @project is always
+ # available when performing actions that should occur within the context of a
+ # single project.
+ def set_selected_project
+ if @params['project_id']
+ @project = Project.find(@params['project_id'])
+ else
+ @project = nil
+ end
+ end
+
+ # Used as a before_filter to ensure that the 'current_user' session variable
+ # contians a valid User (or descendent class) object. Otherwise the user is
+ # redirected to the login page. If redirected, the 'return-to' session
+ # variable will contain the path to the page the user was originally trying to
+ # access.
+ def check_authentication
+ unless @session[:current_user].kind_of?(User) or
+ self.class == SessionController
+
+ @session[:return_to] = @request.request_uri
+ flash[:status] = "Please log in, and we'll send you right along."
+ redirect_to :controller => 'session', :action => 'login'
+ return false
+ end
+ end
+
+ # This method can be used as a before_filter for actions which should require
+ # admin privileges to perform. If the user tries to perform an action which
+ # triggers this filter, and they do not have admin privileges, they will be
+ # redirected to the error page with an error message saying that they must log
+ # in as an administrator to perform the requested action.
+ def require_admin_privileges
+ unless @session[:current_user].admin?
+ flash[:error] = "You must be logged in as an administrator to perform " +
+ "the requested action."
+ redirect_to :controller => 'error', :action => 'index'
+ return false
+ end
+ end
+
+ # Used as a before_filter to ensure that the currently logged in user is
+ # allowed to access the current project by determining whether he is an
+ # administrator or if he is on the project team.
+ def require_team_membership
+ if @project and !@session[:current_user].admin?
+ unless User.find(@session[:current_user].id).projects.include?(@project)
+ flash[:error] = 'You do not have permission to access the project, ' +
+ 'because you are not part of the project team.'
+ redirect_to :controller => 'error', :action => 'index'
+ return false
+ end
+ end
+ end
+
+ # Used in the controller class definitions to specify which actions should be
+ # rendered using the popup layout.
+ def self.popups(*popup_actions)
+ @@popups ||= {}
+ @@popups[controller_name] ||= []
+ popup_actions.each do |a|
+ @@popups[controller_name] << a.to_sym
+ end
+ end
+
+ # Chooses whether to use the regular page layout or the popup page layout
+ # depending on whether the action is listed as one of the controller's popup
+ # views.
+ def choose_layout
+ @@popups ||= {}
+ @@popups[controller_name] ||= []
+ if @@popups[controller_name].include?(action_name.to_sym)
+ 'layouts/popup'
+ else
+ 'layouts/main'
+ end
+ end
+
+ # Used as a before_filter to ensure that a project is selected. If no project
+ # is selected, the user is sent to an error page.
+ def require_current_project
+ unless @project
+ @@popups ||= {}
+ @@popups[controller_name] ||= []
+ if @@popups[controller_name].include? action_name.to_sym
+ redirect_to :controller => 'error', :action => 'popup'
+ else
+ redirect_to :controller => 'error', :action => 'index'
+ end
+ flash[:error] = "You attempted to access a view that requires a " +
+ "project to be selected, but no project id was set in " +
+ "your request."
+ return false
+ end
+ end
+
+ # Saves the HTTP_REFERER into the session
+ # Used in conjunction with #return_to_referer
+ def register_referer
+ unless request.env['HTTP_REFERER'].blank?
+ session[:referer] = request.env['HTTP_REFERER']
+ end
+ end
+
+ # Redirects the user back to the registered referer, and deletes the referer
+ # Returns false if no referer was registered
+ # Used in conjunction with #register_referer
+ def redirect_to_referer
+ if session[:referer]
+ redirect_to session[:referer]
+ session[:referer] = nil
+ true
+ else
+ false
+ end
+ end
+end
+
+
Modified: trunk/app/controllers/stories_controller.rb
===================================================================
--- trunk/app/controllers/stories_controller.rb 2006-02-13 15:09:35 UTC (rev 172)
+++ trunk/app/controllers/stories_controller.rb 2006-02-13 15:26:38 UTC (rev 173)
@@ -88,7 +88,7 @@
@story.return_ids_for_aggregations
end
- # Updates a story card with the information posted form the #edit action.
+ # Updates a story card with the information posted from the #edit action.
def update
@page_title = "Edit story card"
@selected_main_menu_link = :none
Modified: trunk/test/functional/stories_controller_test.rb
===================================================================
--- trunk/test/functional/stories_controller_test.rb 2006-02-13 15:09:35 UTC (rev 172)
+++ trunk/test/functional/stories_controller_test.rb 2006-02-13 15:26:38 UTC (rev 173)
@@ -115,10 +115,10 @@
end
def test_update_return_to_referer
- @request.session[:return_to] = '/project/1/iterations/show/1'
+ @request.session[:referer] = 'http://test.host/project/1/iterations/show/1'
post :update, 'project_id' => @project_one.id, 'id' => @story_one.id,
- 'story' => { 'title' => 'Test Update' }
- assert_redirected_to '/project/1/iterations/show/1'
+ 'story' => { 'title' => 'Test Update' }
+ assert_redirected_to 'http://test.host/project/1/iterations/show/1'
end
def test_update_invalid
From svn at explainpmt.com Mon Feb 13 12:10:54 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 13 Feb 2006 17:10:54 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [174] Stories can now be
assigned to iterations from backlog screen (the list of
stories was previously not contained in the form).
Message-ID: <20060213171054.7359DC9A78@thurlow.textdrive.com>
Revision: 174
Author: jwilger
Date: 2006-02-13 17:10:51 +0000 (Mon, 13 Feb 2006)
Log Message:
-----------
Stories can now be assigned to iterations from backlog screen (the list of stories was previously not contained in the form). (SC56)
Modified Paths:
--------------
trunk/app/views/stories/index.rhtml
trunk/test/functional/iterations_controller_test.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:76
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:78
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
Modified: trunk/app/views/stories/index.rhtml
===================================================================
--- trunk/app/views/stories/index.rhtml 2006-02-13 15:26:38 UTC (rev 173)
+++ trunk/app/views/stories/index.rhtml 2006-02-13 17:10:51 UTC (rev 174)
@@ -1,82 +1,82 @@
<% end %>
\ No newline at end of file
Modified: trunk/test/functional/iterations_controller_test.rb
===================================================================
--- trunk/test/functional/iterations_controller_test.rb 2006-02-13 15:26:38 UTC (rev 173)
+++ trunk/test/functional/iterations_controller_test.rb 2006-02-13 17:10:51 UTC (rev 174)
@@ -197,8 +197,8 @@
end
def test_assign_stories
- post :assign_stories, 'id' => '1', 'project_id' => '1',
- 'selected_stories' => [ 4, 5 ], 'move_to' => 2
+ post :assign_stories, :id => 1, :project_id => 1,
+ :selected_stories => [ 4, 5 ], :move_to => 2
assert_response :success
assert_template 'layouts/refresh_parent_close_popup'
sc_one = Story.find 4
@@ -217,4 +217,4 @@
assert_nil flash[ :status ]
assert flash[ :error ]
end
-end
+end
\ No newline at end of file
From svn at explainpmt.com Thu Feb 16 16:54:33 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Thu, 16 Feb 2006 21:54:33 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [175] fixed typo in comment
Message-ID: <20060216215433.F2A50C97F8@thurlow.textdrive.com>
Revision: 175
Author: jwilger
Date: 2006-02-16 21:54:33 +0000 (Thu, 16 Feb 2006)
Log Message:
-----------
fixed typo in comment
Modified Paths:
--------------
trunk/app/controllers/iterations_controller.rb
Modified: trunk/app/controllers/iterations_controller.rb
===================================================================
--- trunk/app/controllers/iterations_controller.rb 2006-02-13 17:10:51 UTC (rev 174)
+++ trunk/app/controllers/iterations_controller.rb 2006-02-16 21:54:33 UTC (rev 175)
@@ -164,7 +164,7 @@
private
- # Doest the actual work of changing the iteration assignment for #move_stories
+ # Does the actual work of changing the iteration assignment for #move_stories
# and #assign_stories
def change_story_assignment
stories = ( @params['selected_stories'] || [] ).map do |sid|
From svn at explainpmt.com Thu Feb 16 17:00:29 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Thu, 16 Feb 2006 22:00:29 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [176] Added data to one of the
fixture stories to make it a valid entity.
Message-ID: <20060216220029.1E02CC98AD@thurlow.textdrive.com>
Revision: 176
Author: jwilger
Date: 2006-02-16 22:00:27 +0000 (Thu, 16 Feb 2006)
Log Message:
-----------
Added data to one of the fixture stories to make it a valid entity.
Modified Paths:
--------------
trunk/test/fixtures/stories.yml
Modified: trunk/test/fixtures/stories.yml
===================================================================
--- trunk/test/fixtures/stories.yml 2006-02-16 21:54:33 UTC (rev 175)
+++ trunk/test/fixtures/stories.yml 2006-02-16 22:00:27 UTC (rev 176)
@@ -17,6 +17,8 @@
title: 'Second Story'
status: 6
points: 3
+ priority: 2
+ risk: 1
third:
id: 3
scid: 3
@@ -24,6 +26,8 @@
title: 'Third Story'
status: 8
points: 2
+ priority: 2
+ risk: 1
fourth:
id: 4
scid: 4
@@ -54,4 +58,4 @@
status: 2
points: 2
priority: 1
- risk: 1
+ risk: 1
\ No newline at end of file
From svn at explainpmt.com Thu Feb 16 17:39:36 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Thu, 16 Feb 2006 22:39:36 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [177] modified main layout
template to include the default Rails javascript files
Message-ID: <20060216223936.AD2F0C988D@thurlow.textdrive.com>
Revision: 177
Author: jwilger
Date: 2006-02-16 22:39:35 +0000 (Thu, 16 Feb 2006)
Log Message:
-----------
modified main layout template to include the default Rails javascript files
Modified Paths:
--------------
trunk/app/views/layouts/main.rhtml
Modified: trunk/app/views/layouts/main.rhtml
===================================================================
--- trunk/app/views/layouts/main.rhtml 2006-02-16 22:00:27 UTC (rev 176)
+++ trunk/app/views/layouts/main.rhtml 2006-02-16 22:39:35 UTC (rev 177)
@@ -5,8 +5,7 @@
eXPlainPMT » <%= page_title %>
<%= stylesheet_link_tag 'main' %>
-
+ <%= javascript_include_tag :defaults %>
From svn at explainpmt.com Fri Feb 17 11:26:31 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 17 Feb 2006 16:26:31 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [178] In process of making new
project form open in same window.
Message-ID: <20060217162631.49599C98D6@thurlow.textdrive.com>
Revision: 178
Author: jwilger
Date: 2006-02-17 16:26:29 +0000 (Fri, 17 Feb 2006)
Log Message:
-----------
In process of making new project form open in same window. Using AJAX techniques to load form inline. Not quite complete yet, though.
Modified Paths:
--------------
trunk/app/controllers/projects_controller.rb
trunk/app/views/projects/index.rhtml
trunk/test/functional/projects_controller_test.rb
Added Paths:
-----------
trunk/app/views/projects/_create_new_project.rhtml
trunk/app/views/projects/_new.rhtml
Removed Paths:
-------------
trunk/app/views/projects/new.rhtml
Modified: trunk/app/controllers/projects_controller.rb
===================================================================
--- trunk/app/controllers/projects_controller.rb 2006-02-16 22:39:35 UTC (rev 177)
+++ trunk/app/controllers/projects_controller.rb 2006-02-17 16:26:29 UTC (rev 178)
@@ -25,7 +25,7 @@
:update_users, :edit,
:update, :remove_user,
:delete, :index ]
- popups :new, :create, :add_users, :update_users, :edit, :update
+ popups :add_users, :update_users, :edit, :update
# Lists all of the projects that exist on the system.
def index
@@ -35,12 +35,9 @@
# Displays a form for creating a new project.
def new
- @page_title = "New Project"
- if @project = @session[:new_project]
- @session[:new_project] = nil
- else
- @project = Project.new
- end
+ @project = session[:new_project] || Project.new
+ session[:new_project] = nil
+ render :partial => 'new'
end
# Creates a new project based on the information submitted from the #new
@@ -52,8 +49,7 @@
if @params['add_me'] == '1'
@session[:current_user].projects << project
end
- flash[:status] = "New project \"#{project.name}\" has been created."
- render 'layouts/refresh_parent_close_popup'
+ render :partial => 'create_new_project'
else
@session[:new_project] = project
redirect_to :controller => 'projects', :action => 'new'
Added: trunk/app/views/projects/_create_new_project.rhtml
===================================================================
--- trunk/app/views/projects/_create_new_project.rhtml (rev 0)
+++ trunk/app/views/projects/_create_new_project.rhtml 2006-02-17 16:26:29 UTC (rev 178)
@@ -0,0 +1,4 @@
+
<% @projects.each do |p| %>
Modified: trunk/test/functional/projects_controller_test.rb
===================================================================
--- trunk/test/functional/projects_controller_test.rb 2006-02-19 05:42:53 UTC (rev 180)
+++ trunk/test/functional/projects_controller_test.rb 2006-02-19 05:54:33 UTC (rev 181)
@@ -5,9 +5,9 @@
class ProjectsController; def rescue_action(e) raise e end; end
class ProjectsControllerTest < Test::Unit::TestCase
- FULL_PAGES = [:index]
- POPUPS = [:new,:create,:add_users,:update_users,:edit,:update]
- NO_RENDERS = [:remove_user,:delete]
+ FULL_PAGES = [:index, :new]
+ POPUPS = [:add_users,:update_users,:edit,:update]
+ NO_RENDERS = [:remove_user,:delete, :create]
ALL_ACTIONS = FULL_PAGES + POPUPS + NO_RENDERS
fixtures ALL_FIXTURES
@@ -76,8 +76,8 @@
mem_num_before_create = current_user.projects.size
post :create, 'project' => { 'name' => 'Test Create',
'description' => '' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'projects', :action => 'index'
assert_equal num_before_create + 1, Project.count
assert_equal mem_num_before_create, current_user.projects.size
end
@@ -87,8 +87,8 @@
mem_num_before_create = current_user.projects.size
post :create, 'add_me' => '1', 'project' => { 'name' => 'Test Create',
'description' => '' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'projects', :action => 'index'
assert_equal num_before_create + 1, Project.count
assert_equal mem_num_before_create + 1, current_user.projects.size
end
From svn at explainpmt.com Sun Feb 19 01:18:00 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Sun, 19 Feb 2006 06:18:00 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [182] Finished implimenting
changes to make new project form open in same window.
Message-ID: <20060219061800.466B4C9898@thurlow.textdrive.com>
Revision: 182
Author: jwilger
Date: 2006-02-19 06:17:58 +0000 (Sun, 19 Feb 2006)
Log Message:
-----------
Finished implimenting changes to make new project form open in same window. Needed to rename the instance variable for the project object to "new_project" instead of just "project" so that the variable would not conflict with the variable used to detect the current project in menus, etc. This is kind of a code smell that needs to be revisited.
Modified Paths:
--------------
trunk/app/controllers/projects_controller.rb
trunk/app/views/projects/edit.rhtml
trunk/app/views/projects/new.rhtml
trunk/test/functional/projects_controller_test.rb
Removed Paths:
-------------
trunk/app/views/projects/_project_form.rhtml
Modified: trunk/app/controllers/projects_controller.rb
===================================================================
--- trunk/app/controllers/projects_controller.rb 2006-02-19 05:54:33 UTC (rev 181)
+++ trunk/app/controllers/projects_controller.rb 2006-02-19 06:17:58 UTC (rev 182)
@@ -36,17 +36,17 @@
# Displays a form for creating a new project.
def new
@page_title = "New Project"
- if @project = @session[:new_project]
+ if @new_project = @session[:new_project]
@session[:new_project] = nil
else
- @project = Project.new
+ @new_project = Project.new
end
end
# Creates a new project based on the information submitted from the #new
# action.
def create
- project = Project.new(@params['project'])
+ project = Project.new(@params['new_project'])
if project.valid?
project.save
if @params['add_me'] == '1'
Deleted: trunk/app/views/projects/_project_form.rhtml
===================================================================
--- trunk/app/views/projects/_project_form.rhtml 2006-02-19 05:54:33 UTC (rev 181)
+++ trunk/app/views/projects/_project_form.rhtml 2006-02-19 06:17:58 UTC (rev 182)
@@ -1,33 +0,0 @@
-
-
Modified: trunk/app/views/projects/edit.rhtml
===================================================================
--- trunk/app/views/projects/edit.rhtml 2006-02-19 05:54:33 UTC (rev 181)
+++ trunk/app/views/projects/edit.rhtml 2006-02-19 06:17:58 UTC (rev 182)
@@ -1,5 +1,25 @@
<%= start_form_tag(:controller => 'projects', :action => 'update',
:id => @project.id) %>
-<%= render_partial('project_form', :project => @project) %>
+
<%= end_form_tag %>
Modified: trunk/app/views/projects/new.rhtml
===================================================================
--- trunk/app/views/projects/new.rhtml 2006-02-19 05:54:33 UTC (rev 181)
+++ trunk/app/views/projects/new.rhtml 2006-02-19 06:17:58 UTC (rev 182)
@@ -1,3 +1,32 @@
<%= start_form_tag(:controller => 'projects', :action => 'create') %>
-<%= render_partial('project_form', :project => @project) %>
+
<%= end_form_tag %>
Modified: trunk/test/functional/projects_controller_test.rb
===================================================================
--- trunk/test/functional/projects_controller_test.rb 2006-02-19 05:54:33 UTC (rev 181)
+++ trunk/test/functional/projects_controller_test.rb 2006-02-19 06:17:58 UTC (rev 182)
@@ -56,25 +56,25 @@
get :new
assert_response :success
assert_template 'new'
- assert_kind_of Project, assigns(:project)
- assert assigns( :project ).new_record?
+ assert_kind_of Project, assigns(:new_project)
+ assert assigns(:new_project).new_record?
end
def test_new_from_error
project = Project.create
assert !project.valid?
- @request.session[ :new_project ] = project
+ @request.session[:new_project] = project
get :new
assert_response :success
assert_template 'new'
- assert_equal project, assigns( :project )
- assert_nil session[ :new_project ]
+ assert_equal project, assigns(:new_project)
+ assert_nil session[:new_project]
end
def test_create_no_membership
num_before_create = Project.count
mem_num_before_create = current_user.projects.size
- post :create, 'project' => { 'name' => 'Test Create',
+ post :create, 'new_project' => { 'name' => 'Test Create',
'description' => '' }
assert_response :redirect
assert_redirected_to :controller => 'projects', :action => 'index'
@@ -85,7 +85,7 @@
def test_create_add_membership
num_before_create = Project.count
mem_num_before_create = current_user.projects.size
- post :create, 'add_me' => '1', 'project' => { 'name' => 'Test Create',
+ post :create, 'add_me' => '1', 'new_project' => { 'name' => 'Test Create',
'description' => '' }
assert_response :redirect
assert_redirected_to :controller => 'projects', :action => 'index'
@@ -97,7 +97,7 @@
num_before_create = Project.count
post :create
assert_redirected_to :controller => 'projects', :action => 'new'
- assert session[ :new_project ]
+ assert session[:new_project]
assert_equal num_before_create, Project.count
end
From edavis10 at gmail.com Sun Feb 19 19:40:39 2006
From: edavis10 at gmail.com (Eric Davis)
Date: Sun, 19 Feb 2006 16:40:39 -0800
Subject: [eXPlainPMT Developers] SC45: Rework migrations so they build the
entire database
Message-ID: <43F91007.60308@gmail.com>
Dev:
I have been trying to think what would be the best route to complete
this story, and am looking for some feedback. At first I thought it
would be easiest to make a 000 migration (similar to Typo's) but when it
is run it will only create the schema table and not the rest of the
'self.up'.
I am thinking of just bumping all the migrations up a number like:
001 - Initial
002 - Fix Stories
003 - Add Length
And then use some if/else logic to catch if the user does not need this
migration (i.e. the user is on old r2 already so the new r3 would try to
do the same thing.)
But since the only two migrations in there only 'change_column' then
would that extra logic be needed.
Comments?
--
Eric Davis
edavis10 at gmail.com | http://www.theadmin.org
v2sw5/7Rhw5lnln3pr5Ock1ma6u6/8LMw2m6l7Di2e6t4Gb8ODTH+en5g5Ma22 hackerkey.com
From johnwilger at gmail.com Sun Feb 19 22:14:36 2006
From: johnwilger at gmail.com (John Wilger)
Date: Sun, 19 Feb 2006 19:14:36 -0800
Subject: [eXPlainPMT Developers] SC45: Rework migrations so they build
the entire database
In-Reply-To: <43F91007.60308@gmail.com>
References: <43F91007.60308@gmail.com>
Message-ID:
On 2/19/06, Eric Davis wrote:
> I am thinking of just bumping all the migrations up a number like:
>
> 001 - Initial
> 002 - Fix Stories
> 003 - Add Length
My thinking when I created the story card was that the
pre-migration-1-schema information could just be added to the "version
001" migration. I would just change the file/class name of the 001
migration and have self.up create the entire database as it would
appear after the current 001 migration is run. That way the version
numbers don't have to be shifted.
If you run `rake migrate VERSION=1` followed by `rake db_schema_dump`,
the db/schema.rb file will contain almost exactly what you would need
for the self.up method in the new 001 migration.
--
Regards,
John Wilger
http://johnwilger.com
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
From edavis10 at gmail.com Sun Feb 19 22:54:48 2006
From: edavis10 at gmail.com (edavis10@gmail.com)
Date: Sun, 19 Feb 2006 19:54:48 -0800
Subject: [eXPlainPMT Developers] SC45: Rework migrations so they build
the entire database
In-Reply-To:
References: <43F91007.60308@gmail.com>
Message-ID: <43F93D88.5040403@gmail.com>
John Wilger wrote:
> My thinking when I created the story card was that the
> pre-migration-1-schema information could just be added to the "version
> 001" migration. I would just change the file/class name of the 001
> migration and have self.up create the entire database as it would
> appear after the current 001 migration is run. That way the version
> numbers don't have to be shifted.
Duh, of course that would work. Here I go trying to make things complex
again, Thanks John, I will try to get that in tonight.
--
Eric Davis
edavis10 at gmail.com | http://www.theadmin.org
v2sw5/7Rhw5lnln3pr5Ock1ma6u6/8LMw2m6l7Di2e6t4Gb8ODTH+en5g5Ma22 hackerkey.com
From svn at explainpmt.com Mon Feb 20 00:14:15 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 20 Feb 2006 05:14:15 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [183] r1256@Zen: eric |
2006-02-19 21:10:51 -0800
Message-ID: <20060220051415.886C4C98D5@thurlow.textdrive.com>
Revision: 183
Author: edavis
Date: 2006-02-20 05:14:13 +0000 (Mon, 20 Feb 2006)
Log Message:
-----------
r1256 at Zen: eric | 2006-02-19 21:10:51 -0800
SC45: Rework migrations so they build the entire database
Part one, using the schema.rb from migration VERSION=1 to setup the proper database tables.
r1257 at Zen: eric | 2006-02-19 21:12:38 -0800
SC45: Rework migrations so they build the entire database
Part Two. Moved 001 migration to it's new name.
Added Paths:
-----------
trunk/db/migrate/001_create_initial_database.rb
Removed Paths:
-------------
trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:78
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1240
+ 2e303da0-459f-4ae5-bd56-650f3f8823a3:/explainpmt/local:78
b310ec42-2ae2-468a-b21b-4ca1e43c3af0:/explainpmt/local:1257
Added: trunk/db/migrate/001_create_initial_database.rb
===================================================================
--- trunk/db/migrate/001_create_initial_database.rb (rev 0)
+++ trunk/db/migrate/001_create_initial_database.rb 2006-02-20 05:14:13 UTC (rev 183)
@@ -0,0 +1,68 @@
+class CreateInitialDatabase < ActiveRecord::Migration
+ def self.up
+ create_table "iterations", :force => true do |t|
+ t.column "project_id", :integer, :default => 0, :null => false
+ t.column "start_date", :date
+ t.column "length", :integer, :default => 14
+ t.column "budget", :integer
+ t.column "created_at", :datetime
+ t.column "updated_at", :datetime
+ end
+
+ create_table "milestones", :force => true do |t|
+ t.column "project_id", :integer, :default => 0, :null => false
+ t.column "date", :date
+ t.column "name", :string
+ t.column "description", :text
+ t.column "created_at", :datetime
+ t.column "updated_at", :datetime
+ end
+
+ create_table "projects", :force => true do |t|
+ t.column "name", :string
+ t.column "description", :text
+ t.column "created_at", :datetime
+ t.column "updated_at", :datetime
+ end
+
+ create_table "projects_users", :id => false, :force => true do |t|
+ t.column "user_id", :integer, :default => 0, :null => false
+ t.column "project_id", :integer, :default => 0, :null => false
+ end
+
+ create_table "stories", :force => true do |t|
+ t.column "scid", :integer, :default => 0, :null => false
+ t.column "project_id", :integer, :default => 0, :null => false
+ t.column "iteration_id", :integer
+ t.column "user_id", :integer
+ t.column "title", :string
+ t.column "points", :integer
+ t.column "status", :integer
+ t.column "priority", :integer
+ t.column "risk", :integer
+ t.column "description", :text
+ end
+
+ create_table "users", :force => true do |t|
+ t.column "username", :string
+ t.column "password", :string
+ t.column "email", :string
+ t.column "first_name", :string
+ t.column "last_name", :string
+ t.column "admin", :boolean, :default => false
+ t.column "created_at", :datetime
+ t.column "updated_at", :datetime
+ end
+
+
+ end
+
+ def self.down
+ drop_table "iterations"
+ drop_table "milestones"
+ drop_table "projects"
+ drop_table "projects_users"
+ drop_table "stories"
+ drop_table "users"
+ end
+end
Deleted: trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb
===================================================================
--- trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb 2006-02-19 06:17:58 UTC (rev 182)
+++ trunk/db/migrate/001_fix_stories_table_to_use_integer_fields_not_boolean.rb 2006-02-20 05:14:13 UTC (rev 183)
@@ -1,13 +0,0 @@
-class FixStoriesTableToUseIntegerFieldsNotBoolean < ActiveRecord::Migration
- def self.up
- change_column :stories, :status, :integer
- change_column :stories, :risk, :integer
- change_column :stories, :priority, :integer
- end
-
- def self.down
- change_column :stories, :status, :boolean
- change_column :stories, :risk, :boolean
- change_column :stories, :priority, :boolean
- end
-end
From johnwilger at gmail.com Mon Feb 20 00:41:57 2006
From: johnwilger at gmail.com (John Wilger)
Date: Sun, 19 Feb 2006 21:41:57 -0800
Subject: [eXPlainPMT Developers] SC31: optional public access -- discussion
Message-ID:
Eric,
I see that you've started working on SC31. I wanted to talk a bit
about what I think this should look like. I'm assuming you put these
comments on the card:
ED: I think this would also need a link on the login screen to an
action that would list all public
projects.
TODO:
* Migration to add in public? to Project
* Adjust view for ProjectController
* New method to allow access if the project is public.
before_filter :public maybe?
* User's dashboard should show public RO projects.
* Maybe even change the default route to go to the public page and
give it a link to login to see
the User's dashboard
As for the first note, I don't really think you'd need to list public
projects on the login screen. I see it working such that you would get
to public projects only by an explicit link -- i.e.
http://dev.example.com/project/4 -- the main public site for a project
could then link to this URL. Remember that anyone who can actually
_change_ information in the project would have to be logged in and be
part of the project team (or an admin) anyway -- they'll see a link to
the project just like they do for projects they currently belong to.
Also don't think that the dashboard should show links to public
projects. Again, if they have an account, they're either on the
project team or likely don't care to keep that close of an eye on the
other project (they can always bookmark it elsewhere if they are
interested in a project they don't actually belong to).
I think the "main" page for a project can still be the dashboard view.
The biggest difference between the page that team members see vs. the
page that the general public would see is that the general public
would not see a list of story cards that are assigned to them. Should
be simple enough to just remove that section of the page where it
doesn't apply.
--
Regards,
John Wilger
http://johnwilger.com
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
From edavis10 at gmail.com Mon Feb 20 09:01:09 2006
From: edavis10 at gmail.com (edavis10@gmail.com)
Date: Mon, 20 Feb 2006 06:01:09 -0800
Subject: [eXPlainPMT Developers] SC31: optional public access --
discussion
In-Reply-To:
References:
Message-ID: <43F9CBA5.6030102@gmail.com>
John Wilger wrote:
> Eric,
>
> I see that you've started working on SC31. I wanted to talk a bit
> about what I think this should look like. I'm assuming you put these
> comments on the card:
Yep, that was me. I was using it to jot down some notes on it before I
announced it to the mailing list.
> As for the first note, I don't really think you'd need to list public
> projects on the login screen. I see it working such that you would get
> to public projects only by an explicit link -- i.e.
> http://dev.example.com/project/4 -- the main public site for a project
This is how I original thought about making the feature work. Another
way I thought could be to have a 'guest' user that belongs to certain
projects. Just like any other user they would login and can access only
the projects they are allowed to (I have a hack like this running at
http://explainpmt.theadmin.org ).
I was thinking about having it so that when you first list the
application, you would see a page that would list the public projects.
>From here the user can browse them or login with a user account and see
their projects also. This would work best for Open projects, so once
the project is shared anyone can look at it.
> Also don't think that the dashboard should show links to public
> projects. Again, if they have an account, they're either on the
> project team or likely don't care to keep that close of an eye on the
> other project (they can always bookmark it elsewhere if they are
> interested in a project they don't actually belong to).
Yes, I agree that this would be the correct way for the dashboard if you
want to make the projects like how you said in the last quote.
I think John's way would work best in a business type environment, where
most people are too busy to care about what else is going on. Whereas
my idea is better suited to a non-commercial (Open Source development,
or volunteer workforce) in that more information is able to be browsed to.
John and others, what do you think of my idea for the feature?
--
Eric Davis
edavis10 at gmail.com | http://www.theadmin.org
v2sw5/7Rhw5lnln3pr5Ock1ma6u6/8LMw2m6l7Di2e6t4Gb8ODTH+en5g5Ma22 hackerkey.com
From johnwilger at gmail.com Tue Feb 21 23:27:47 2006
From: johnwilger at gmail.com (John Wilger)
Date: Tue, 21 Feb 2006 20:27:47 -0800
Subject: [eXPlainPMT Developers] SC31: optional public access --
discussion
In-Reply-To: <43F9CBA5.6030102@gmail.com>
References:
<43F9CBA5.6030102@gmail.com>
Message-ID:
On 2/20/06, edavis10 at gmail.com wrote:
> John Wilger wrote:
> > As for the first note, I don't really think you'd need to list public
> > projects on the login screen. I see it working such that you would get
> > to public projects only by an explicit link -- i.e.
> > http://dev.example.com/project/4 -- the main public site for a project
>
> This is how I original thought about making the feature work. Another
> way I thought could be to have a 'guest' user that belongs to certain
> projects. Just like any other user they would login and can access only
> the projects they are allowed to (I have a hack like this running at
> http://explainpmt.theadmin.org ).
I'd much rather have the "public" access bypass any login at all. Down
the road, I see incorporating per-project wikis and/or weblogs into
the product so that you could conceivably use eXPlainPMT as the main
public site for a project. Having to log in (even with a "guest" user)
would make this less useful.
>
> I was thinking about having it so that when you first list the
> application, you would see a page that would list the public projects.
> >From here the user can browse them or login with a user account and see
> their projects also. This would work best for Open projects, so once
> the project is shared anyone can look at it
That could work.
--
Regards,
John Wilger
http://johnwilger.com
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
From svn at explainpmt.com Wed Feb 22 10:40:15 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Wed, 22 Feb 2006 15:40:15 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [184] Made some modifications
to migration 001.
Message-ID: <20060222154015.21E94C98DD@thurlow.textdrive.com>
Revision: 184
Author: jwilger
Date: 2006-02-22 15:40:13 +0000 (Wed, 22 Feb 2006)
Log Message:
-----------
Made some modifications to migration 001. Mostly the changes were formatting, but I also removed explicit ":null => false" and ":default" options on several columns. (My preference is to enforce these constraints in the Ruby code.) Doing so also revealed a defect on Iteration#stop_date which I added a unit test for and repaired.
I also removed migration 002. The changes made to migration 001 obviate the changes that were being made in 002. (I'm not worried about removing 002 since it hasn't been included in a release yet. Developers may have to drop and recreate their development dbs to get things worked out, though.)
Modified Paths:
--------------
trunk/app/models/iteration.rb
trunk/db/migrate/001_create_initial_database.rb
trunk/db/schema.rb
trunk/test/unit/iteration_test.rb
Removed Paths:
-------------
trunk/db/migrate/002_add_length255_to_story_title.rb
Modified: trunk/app/models/iteration.rb
===================================================================
--- trunk/app/models/iteration.rb 2006-02-20 05:14:13 UTC (rev 183)
+++ trunk/app/models/iteration.rb 2006-02-22 15:40:13 UTC (rev 184)
@@ -65,7 +65,7 @@
# The last date of the iteration
def stop_date
- start_date + length - 1
+ start_date + length.to_i - 1
end
# The number of unallocated budget points
Modified: trunk/db/migrate/001_create_initial_database.rb
===================================================================
--- trunk/db/migrate/001_create_initial_database.rb 2006-02-20 05:14:13 UTC (rev 183)
+++ trunk/db/migrate/001_create_initial_database.rb 2006-02-22 15:40:13 UTC (rev 184)
@@ -1,68 +1,68 @@
class CreateInitialDatabase < ActiveRecord::Migration
def self.up
- create_table "iterations", :force => true do |t|
- t.column "project_id", :integer, :default => 0, :null => false
- t.column "start_date", :date
- t.column "length", :integer, :default => 14
- t.column "budget", :integer
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
+ create_table :iterations do |t|
+ t.column :project_id, :integer
+ t.column :start_date, :date
+ t.column :length, :integer
+ t.column :budget, :integer
+ t.column :created_at, :datetime
+ t.column :updated_at, :datetime
end
- create_table "milestones", :force => true do |t|
- t.column "project_id", :integer, :default => 0, :null => false
- t.column "date", :date
- t.column "name", :string
- t.column "description", :text
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
+ create_table :milestones do |t|
+ t.column :project_id, :integer
+ t.column :date, :date
+ t.column :name, :string
+ t.column :description, :text
+ t.column :created_at, :datetime
+ t.column :updated_at, :datetime
end
- create_table "projects", :force => true do |t|
- t.column "name", :string
- t.column "description", :text
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
+ create_table :projects do |t|
+ t.column :name, :string
+ t.column :description, :text
+ t.column :created_at, :datetime
+ t.column :updated_at, :datetime
end
- create_table "projects_users", :id => false, :force => true do |t|
- t.column "user_id", :integer, :default => 0, :null => false
- t.column "project_id", :integer, :default => 0, :null => false
+ create_table :projects_users, :id => false do |t|
+ t.column :user_id, :integer
+ t.column :project_id, :integer
end
- create_table "stories", :force => true do |t|
- t.column "scid", :integer, :default => 0, :null => false
- t.column "project_id", :integer, :default => 0, :null => false
- t.column "iteration_id", :integer
- t.column "user_id", :integer
- t.column "title", :string
- t.column "points", :integer
- t.column "status", :integer
- t.column "priority", :integer
- t.column "risk", :integer
- t.column "description", :text
+ create_table :stories do |t|
+ t.column :scid, :integer
+ t.column :project_id, :integer
+ t.column :iteration_id, :integer
+ t.column :user_id, :integer
+ t.column :title, :string
+ t.column :points, :integer
+ t.column :status, :integer
+ t.column :priority, :integer
+ t.column :risk, :integer
+ t.column :description, :text
end
- create_table "users", :force => true do |t|
- t.column "username", :string
- t.column "password", :string
- t.column "email", :string
- t.column "first_name", :string
- t.column "last_name", :string
- t.column "admin", :boolean, :default => false
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
+ create_table :users do |t|
+ t.column :username, :string
+ t.column :password, :string
+ t.column :email, :string
+ t.column :first_name, :string
+ t.column :last_name, :string
+ t.column :admin, :boolean
+ t.column :created_at, :datetime
+ t.column :updated_at, :datetime
end
end
def self.down
- drop_table "iterations"
- drop_table "milestones"
- drop_table "projects"
- drop_table "projects_users"
- drop_table "stories"
- drop_table "users"
+ drop_table :iterations
+ drop_table :milestones
+ drop_table :projects
+ drop_table :projects_users
+ drop_table :stories
+ drop_table :users
end
-end
+end
\ No newline at end of file
Deleted: trunk/db/migrate/002_add_length255_to_story_title.rb
===================================================================
--- trunk/db/migrate/002_add_length255_to_story_title.rb 2006-02-20 05:14:13 UTC (rev 183)
+++ trunk/db/migrate/002_add_length255_to_story_title.rb 2006-02-22 15:40:13 UTC (rev 184)
@@ -1,9 +0,0 @@
-class AddLength255ToStoryTitle < ActiveRecord::Migration
- def self.up
- change_column :stories, :title, :string, :length => 255
- end
-
- def self.down
- change_column :stories, :title, :string
- end
-end
Modified: trunk/db/schema.rb
===================================================================
--- trunk/db/schema.rb 2006-02-20 05:14:13 UTC (rev 183)
+++ trunk/db/schema.rb 2006-02-22 15:40:13 UTC (rev 184)
@@ -2,19 +2,19 @@
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
-ActiveRecord::Schema.define(:version => 2) do
+ActiveRecord::Schema.define(:version => 1) do
create_table "iterations", :force => true do |t|
- t.column "project_id", :integer, :default => 0, :null => false
+ t.column "project_id", :integer
t.column "start_date", :date
- t.column "length", :integer, :default => 14
+ t.column "length", :integer
t.column "budget", :integer
t.column "created_at", :datetime
t.column "updated_at", :datetime
end
create_table "milestones", :force => true do |t|
- t.column "project_id", :integer, :default => 0, :null => false
+ t.column "project_id", :integer
t.column "date", :date
t.column "name", :string
t.column "description", :text
@@ -30,13 +30,13 @@
end
create_table "projects_users", :id => false, :force => true do |t|
- t.column "user_id", :integer, :default => 0, :null => false
- t.column "project_id", :integer, :default => 0, :null => false
+ t.column "user_id", :integer
+ t.column "project_id", :integer
end
create_table "stories", :force => true do |t|
- t.column "scid", :integer, :default => 0, :null => false
- t.column "project_id", :integer, :default => 0, :null => false
+ t.column "scid", :integer
+ t.column "project_id", :integer
t.column "iteration_id", :integer
t.column "user_id", :integer
t.column "title", :string
@@ -53,7 +53,7 @@
t.column "email", :string
t.column "first_name", :string
t.column "last_name", :string
- t.column "admin", :boolean, :default => false
+ t.column "admin", :boolean
t.column "created_at", :datetime
t.column "updated_at", :datetime
end
Modified: trunk/test/unit/iteration_test.rb
===================================================================
--- trunk/test/unit/iteration_test.rb 2006-02-20 05:14:13 UTC (rev 183)
+++ trunk/test/unit/iteration_test.rb 2006-02-22 15:40:13 UTC (rev 184)
@@ -95,4 +95,9 @@
assert !@iteration_five.past?
assert @iteration_six.past?
end
-end
+
+ def test_no_exception_raised_when_evaluating_stop_date_of_iteration_with_nil_length
+ @iteration_one.length = nil
+ assert_nothing_raised(TypeError) { @iteration_one.stop_date }
+ end
+end
\ No newline at end of file
From svn at explainpmt.com Fri Feb 24 11:04:20 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:04:20 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [185] Edit project form now
opens in main window.
Message-ID: <20060224160420.E2C0BC969F@thurlow.textdrive.com>
Revision: 185
Author: jwilger
Date: 2006-02-24 16:04:19 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
Edit project form now opens in main window.
Modified Paths:
--------------
trunk/app/controllers/projects_controller.rb
trunk/app/views/projects/index.rhtml
trunk/test/functional/projects_controller_test.rb
Modified: trunk/app/controllers/projects_controller.rb
===================================================================
--- trunk/app/controllers/projects_controller.rb 2006-02-22 15:40:13 UTC (rev 184)
+++ trunk/app/controllers/projects_controller.rb 2006-02-24 16:04:19 UTC (rev 185)
@@ -25,7 +25,7 @@
:update_users, :edit,
:update, :remove_user,
:delete, :index ]
- popups :add_users, :update_users, :edit, :update
+ popups :add_users, :update_users
# Lists all of the projects that exist on the system.
def index
@@ -137,7 +137,7 @@
if project.valid?
project.save
flash[:status] = "Project \"#{project.name}\" has been updated."
- render 'layouts/refresh_parent_close_popup'
+ redirect_to :controller => 'projects', :action => 'index'
else
@session[:edit_project] = project
redirect_to :controller => 'projects', :action => 'edit',
Modified: trunk/app/views/projects/index.rhtml
===================================================================
--- trunk/app/views/projects/index.rhtml 2006-02-22 15:40:13 UTC (rev 184)
+++ trunk/app/views/projects/index.rhtml 2006-02-24 16:04:19 UTC (rev 185)
@@ -13,10 +13,7 @@
(<%= link_to('Team', :controller => 'users', :action => 'index',
:project_id => p.id) %>)
- (<%= popup_link('Edit', 'edit_project',
- 'width=500,height=500,scrollbars,resizable',
- :controller => 'projects', :action => 'edit',
- :id => p.id) %>)
+ (<%= link_to('Edit', :controller => 'projects', :action => 'edit', :id => p.id) %>)
(<%= link_to('Delete',
{
Modified: trunk/test/functional/projects_controller_test.rb
===================================================================
--- trunk/test/functional/projects_controller_test.rb 2006-02-22 15:40:13 UTC (rev 184)
+++ trunk/test/functional/projects_controller_test.rb 2006-02-24 16:04:19 UTC (rev 185)
@@ -5,9 +5,9 @@
class ProjectsController; def rescue_action(e) raise e end; end
class ProjectsControllerTest < Test::Unit::TestCase
- FULL_PAGES = [:index, :new]
- POPUPS = [:add_users,:update_users,:edit,:update]
- NO_RENDERS = [:remove_user,:delete, :create]
+ FULL_PAGES = [:index, :new, :edit]
+ POPUPS = [:add_users,:update_users]
+ NO_RENDERS = [:remove_user,:delete, :create, :update]
ALL_ACTIONS = FULL_PAGES + POPUPS + NO_RENDERS
fixtures ALL_FIXTURES
@@ -157,8 +157,8 @@
def test_update
post :update, 'id' => @project_one.id, 'project' => { 'name' => 'Test' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'projects', :action => 'index'
project = Project.find @project_one.id
assert_equal 'Test', project.name
end
From svn at explainpmt.com Fri Feb 24 11:22:15 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:22:15 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [186] Changed migration 001 so
that it creates a default admin user account.
Message-ID: <20060224162215.47474C9880@thurlow.textdrive.com>
Revision: 186
Author: jwilger
Date: 2006-02-24 16:22:13 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
Changed migration 001 so that it creates a default admin user account. It is no longer necessary to run script/create_admin when setting up a new installation, so that script was removed. Also updated the README to reflect these changes.
Modified Paths:
--------------
trunk/README
trunk/db/migrate/001_create_initial_database.rb
Removed Paths:
-------------
trunk/script/create_admin
Modified: trunk/README
===================================================================
--- trunk/README 2006-02-24 16:04:19 UTC (rev 185)
+++ trunk/README 2006-02-24 16:22:13 UTC (rev 186)
@@ -1,4 +1,4 @@
-= eXPlain Project Management Tool 20051231.0
+= eXPlain Project Management Tool
eXPlain Project Management Tool (or simply eXPlainPMT) is a web-based
application that supports the eXtreme Programming development methodology
@@ -14,8 +14,8 @@
to be tracked and for the stories to be planned in an ongoing iterative process.
The goal of the product is to support the methodology while staying out of the
way as much as possible, so you'll find that there are few access restrictions
-or permissions settings. Just like with notecards, restrictions on who can
-view/alter the story cards are left to the concensus of the team.
+or permissions settings. Just like with note cards, restrictions on who can
+view/alter the story cards are left to the consensus of the team.
== License
@@ -34,22 +34,25 @@
1. If you haven't done so already, unpack the application tarball and
move/rename the directory as you wish.
-2. Create a database for the application, and grant all rights (except the
- GRANT privilege) to the username that the application should use when
- accessing the database. (Skip this step if using SQLite.)
+2. Create a database for the application, and grant all rights to the username
+ that the application should use when accessing the database. (Skip this step
+ if using SQLite.)
-3. Edit config/database.yml.orig and save it as config/database.yml- only the production setting is required unless you
+3. Edit config/database.yml- only the production setting is required unless you
wish to run the test suite and/or work in the development environment. Use
the database and username from step 2.
-4. Run 'RAILS_ENV=production rake db_schema_import' to import the necessary
- database tables. (If upgrading from a previous release, run
- 'RAILS_ENV=production rake migrate'
+4. Run 'RAILS_ENV=production rake migrate' to create the necessary
+ database tables.
-5. If this is a new installation, run './script/create_admin' and follow the
- prompts to create the initial administrator account.
+5. If this is a new installation, the previous step will also create a default
+ admin account for your first login. The username and password are both
+ 'admin'. (It is highly recommended that you only use this account to log in
+ for the first time. You should then create a new admin user account for
+ yourself, log out, log in with the new account and delete the default admin
+ account.)
6. Either run the webrick server -- "./script/server -e production" -- or set up
Apache or lighttpd as directed in the documentation for the Rails framework.
-7. Load up the application in your browser, log in, and enjoy!
+7. Load up the application in your browser, log in, and enjoy!
\ No newline at end of file
Modified: trunk/db/migrate/001_create_initial_database.rb
===================================================================
--- trunk/db/migrate/001_create_initial_database.rb 2006-02-24 16:04:19 UTC (rev 185)
+++ trunk/db/migrate/001_create_initial_database.rb 2006-02-24 16:22:13 UTC (rev 186)
@@ -1,4 +1,6 @@
class CreateInitialDatabase < ActiveRecord::Migration
+ class User < ActiveRecord::Base; end
+
def self.up
create_table :iterations do |t|
t.column :project_id, :integer
@@ -54,7 +56,9 @@
t.column :updated_at, :datetime
end
-
+ # Create the initial admin user
+ User.create :username => 'admin', :password => 'admin', :email => 'admin at example.com', :first_name => 'admin',
+ :last_name => 'admin', :admin => true
end
def self.down
Deleted: trunk/script/create_admin
===================================================================
--- trunk/script/create_admin 2006-02-24 16:04:19 UTC (rev 185)
+++ trunk/script/create_admin 2006-02-24 16:22:13 UTC (rev 186)
@@ -1,51 +0,0 @@
-#!/usr/local/bin/ruby
-
-require 'optparse'
-
-OPTIONS = {
- :environment => "production",
-}
-
-ARGV.options do |opts|
- script_name = File.basename($0)
- opts.banner = "Usage: ruby #{script_name} [options]"
-
- opts.separator ""
-
- opts.on("-e", "--environment=name", String,
- "Specifies the environment to create the account under (test/development/production).",
- "Default: production") { |OPTIONS[:environment]| }
-
- opts.separator ""
-
- opts.on("-h", "--help",
- "Show this help message.") { puts opts; exit }
-
- opts.parse!
-end
-
-ENV["RAILS_ENV"] = OPTIONS[:environment]
-require File.dirname(__FILE__) + "/../config/environment"
-require 'user'
-
-admin = User.new
-admin.admin = true
-puts "Please enter the following information for the new admin user account:"
-print 'Username: '
-admin.username = gets.strip
-print 'Password: '
-admin.password = gets.strip
-print 'First Name: '
-admin.first_name = gets.strip
-print 'Last Name: '
-admin.last_name = gets.strip
-print 'Email Address: '
-admin.email = gets.strip
-
-if admin.save
- puts "User #{admin.username} was created."
-else
- puts "Unable to create new user account. The following errors occured:"
- admin.errors.each_full {|m| puts m}
-end
-
From svn at explainpmt.com Fri Feb 24 11:25:59 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:25:59 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [187] added some comments to
clear up why the "model :foo" lines appear at the top of the
application controller
Message-ID: <20060224162559.361CEC97F6@thurlow.textdrive.com>
Revision: 187
Author: jwilger
Date: 2006-02-24 16:25:58 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
added some comments to clear up why the "model :foo" lines appear at the top of the application controller
Modified Paths:
--------------
trunk/app/controllers/application.rb
Modified: trunk/app/controllers/application.rb
===================================================================
--- trunk/app/controllers/application.rb 2006-02-24 16:22:13 UTC (rev 186)
+++ trunk/app/controllers/application.rb 2006-02-24 16:25:58 UTC (rev 187)
@@ -20,6 +20,8 @@
# The filters added to this controller will be run for all controllers in the application.
# Likewise will all the methods added be available for all controllers.
class ApplicationController < ActionController::Base
+ # Any ActiveRecord object that is stored in the session should be declared
+ # here to prevent an error when the session variables are read in
model :user
model :project
model :iteration
From svn at explainpmt.com Fri Feb 24 11:36:36 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:36:36 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [188] Replaced all uses of
'@params' and '@session' with the accessor method versions.
Message-ID: <20060224163636.635C6C980F@thurlow.textdrive.com>
Revision: 188
Author: jwilger
Date: 2006-02-24 16:36:33 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
Replaced all uses of '@params' and '@session' with the accessor method versions. Direct use of the instance variables is not recommended since that removes the ability for Rails core to hide the implementation.
Modified Paths:
--------------
trunk/app/controllers/application.rb
trunk/app/controllers/dashboard_controller.rb
trunk/app/controllers/iterations_controller.rb
trunk/app/controllers/milestones_controller.rb
trunk/app/controllers/projects_controller.rb
trunk/app/controllers/session_controller.rb
trunk/app/controllers/stories_controller.rb
trunk/app/controllers/users_controller.rb
trunk/app/helpers/application_helper.rb
trunk/app/helpers/sort_helper.rb
trunk/app/views/layouts/main.rhtml
trunk/app/views/stories/index.rhtml
Modified: trunk/app/controllers/application.rb
===================================================================
--- trunk/app/controllers/application.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/application.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -43,8 +43,8 @@
# available when performing actions that should occur within the context of a
# single project.
def set_selected_project
- if @params['project_id']
- @project = Project.find(@params['project_id'])
+ if params['project_id']
+ @project = Project.find(params['project_id'])
else
@project = nil
end
@@ -56,10 +56,10 @@
# variable will contain the path to the page the user was originally trying to
# access.
def check_authentication
- unless @session[:current_user].kind_of?(User) or
+ unless session[:current_user].kind_of?(User) or
self.class == SessionController
- @session[:return_to] = @request.request_uri
+ session[:return_to] = request.request_uri
flash[:status] = "Please log in, and we'll send you right along."
redirect_to :controller => 'session', :action => 'login'
return false
@@ -72,7 +72,7 @@
# redirected to the error page with an error message saying that they must log
# in as an administrator to perform the requested action.
def require_admin_privileges
- unless @session[:current_user].admin?
+ unless session[:current_user].admin?
flash[:error] = "You must be logged in as an administrator to perform " +
"the requested action."
redirect_to :controller => 'error', :action => 'index'
@@ -84,8 +84,8 @@
# allowed to access the current project by determining whether he is an
# administrator or if he is on the project team.
def require_team_membership
- if @project and !@session[:current_user].admin?
- unless User.find(@session[:current_user].id).projects.include?(@project)
+ if @project and !session[:current_user].admin?
+ unless User.find(session[:current_user].id).projects.include?(@project)
flash[:error] = 'You do not have permission to access the project, ' +
'because you are not part of the project team.'
redirect_to :controller => 'error', :action => 'index'
Modified: trunk/app/controllers/dashboard_controller.rb
===================================================================
--- trunk/app/controllers/dashboard_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/dashboard_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -28,21 +28,21 @@
def index
if @project
@page_title = "Dashboard"
- @stories = @session[:current_user].stories.find_all([ "project_id = ?",
+ @stories = session[:current_user].stories.find_all([ "project_id = ?",
@project.id ])
@stories = @stories.select { |s| !s.status.closed? }
@stories = sort_stories(@stories)
render 'dashboard/project'
else
@page_title = 'Overview'
- @projects = @session[:current_user].projects
+ @projects = session[:current_user].projects
if @projects.size == 1
redirect_to :controller => 'dashboard', :action => 'index',
:project_id => @projects.first.id
elsif @projects.empty?
render 'dashboard/index_no_projects'
else
- @stories = @session[:current_user].stories
+ @stories = session[:current_user].stories
@stories = @stories.select { |s| !s.status.closed? }
@stories = sort_stories(@stories)
end
@@ -61,7 +61,7 @@
end
SortHelper.default_order = %w( status priority risk )
stories = stories.sort do |a,b|
- SortHelper.sort(a,b, at params)
+ SortHelper.sort(a,b,params)
end
return stories
end
Modified: trunk/app/controllers/iterations_controller.rb
===================================================================
--- trunk/app/controllers/iterations_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/iterations_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -45,8 +45,8 @@
# Displays the form for adding a new iteration.
def new
@page_title = "New Iteration"
- if @iteration = @session[:new_iteration]
- @session[:new_iteration] = nil
+ if @iteration = session[:new_iteration]
+ session[:new_iteration] = nil
else
@iteration = Iteration.new
end
@@ -55,7 +55,7 @@
# Inserts a new iteration in the database based on information posted from
# #new.
def create
- iteration = Iteration.new(@params['iteration'])
+ iteration = Iteration.new(params['iteration'])
iteration.project = @project
if iteration.valid?
iteration.save
@@ -64,7 +64,7 @@
"been created."
render 'layouts/refresh_parent_close_popup'
else
- @session[:new_iteration] = iteration
+ session[:new_iteration] = iteration
redirect_to :controller => 'iterations', :action => 'new',
:project_id => @project.id.to_s
end
@@ -73,23 +73,23 @@
# Displays a form used for editing an existing iteration.
def edit
@page_title = "Edit Iteration"
- if @iteration = @session[:edit_iteration]
- @session[:edit_iteration] = nil
+ if @iteration = session[:edit_iteration]
+ session[:edit_iteration] = nil
else
- @iteration = Iteration.find(@params['id'])
+ @iteration = Iteration.find(params['id'])
end
end
# Updates an iteration in the database based on data posted from #edit.
def update
- iteration = Iteration.find(@params['id'])
- iteration.attributes = @params['iteration']
+ iteration = Iteration.find(params['id'])
+ iteration.attributes = params['iteration']
if iteration.valid?
iteration.save
flash[:status] = 'Changes to iteration have been saved.'
render 'layouts/refresh_parent_close_popup'
else
- @session[:edit_iteration] = iteration
+ session[:edit_iteration] = iteration
redirect_to :controller => 'iterations', :action => 'edit',
:id => iteration.id.to_s, :project_id => @project.id.to_s
end
@@ -98,7 +98,7 @@
# Destroys the iteration object with the specified ID and redirects to the
# #index action.
def delete
- iteration = Iteration.find(@params['id'])
+ iteration = Iteration.find(params['id'])
iteration.destroy
flash[:status] = "The #{iteration.length}-day iteration scheduled to " +
"start on " +
@@ -113,12 +113,12 @@
# Displays a summary of the iteration and shows the list of story cards that
# are assigned to the iteration.
def show
- @iteration = Iteration.find(@params['id'])
+ @iteration = Iteration.find(params['id'])
@page_title = "Iteration: #{@iteration.start_date} - #{@iteration.stop_date}"
SortHelper.columns = %w(scid title points priority risk status)
SortHelper.default_order = %w(status priority risk)
@stories = @iteration.stories.sort do |a,b|
- SortHelper.sort(a,b, at params)
+ SortHelper.sort(a,b,params)
end
end
@@ -129,9 +129,9 @@
# moved to the backlog.
def move_stories
change_story_assignment
- if @params['id']
+ if params['id']
redirect_to :controller => 'iterations', :action => 'show',
- :id => @params['id'], :project_id => @project.id.to_s
+ :id => params['id'], :project_id => @project.id.to_s
else
redirect_to :controller => 'stories', :action => 'index',
:project_id => @project.id.to_s
@@ -150,9 +150,9 @@
s.status != Story::Status::Cancelled
}
@stories = @stories.sort do |a,b|
- SortHelper.sort(a,b, at params)
+ SortHelper.sort(a,b,params)
end
- @iteration = Iteration.find(@params['id'])
+ @iteration = Iteration.find(params['id'])
end
# Essentially the same as #move_stories, but intended to render in a popup
@@ -167,16 +167,16 @@
# Does the actual work of changing the iteration assignment for #move_stories
# and #assign_stories
def change_story_assignment
- stories = ( @params['selected_stories'] || [] ).map do |sid|
+ stories = ( params['selected_stories'] || [] ).map do |sid|
Story.find(sid)
end
successes = []
failures = []
stories.each do |s|
- if @params['move_to'].to_i == 0
+ if params['move_to'].to_i == 0
s.iteration = nil
else
- s.iteration = Iteration.find(@params['move_to'].to_i)
+ s.iteration = Iteration.find(params['move_to'].to_i)
end
if s.save
successes << "SC#{s.scid} has been moved."
Modified: trunk/app/controllers/milestones_controller.rb
===================================================================
--- trunk/app/controllers/milestones_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/milestones_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -24,7 +24,7 @@
# Lists the milestones for the project.
def index
@page_title = "Milestones"
- if @params['show_all'] == '1'
+ if params['show_all'] == '1'
@past_milestones = 'all_past'
@past_link_opts = [ 'show only recent', { :controller => 'milestones',
:action => 'index',
@@ -42,8 +42,8 @@
# Displays the form to add a new milestone.
def new
- if @milestone = @session[:new_milestone]
- @session[:new_milestone] = nil
+ if @milestone = session[:new_milestone]
+ session[:new_milestone] = nil
else
@milestone = Milestone.new
end
@@ -53,7 +53,7 @@
# Creates a new milestone based on the information submitted from the #new
# action.
def create
- milestone = Milestone.new(@params['milestone'])
+ milestone = Milestone.new(params['milestone'])
milestone.project = @project
if milestone.valid?
milestone.save
@@ -61,7 +61,7 @@
"*#{milestone.date}* was created."
render :template => 'layouts/refresh_parent_close_popup'
else
- @session[:new_milestone] = milestone
+ session[:new_milestone] = milestone
redirect_to :controller => 'milestones', :action => 'new',
:project_id => @project.id
end
@@ -70,25 +70,25 @@
# Displays the form to edit milestone information. The milestone to edit is
# identified by the 'id' request parameter.
def edit
- if @milestone = @session[:edit_milestone]
- @session[:edit_milestone] = nil
+ if @milestone = session[:edit_milestone]
+ session[:edit_milestone] = nil
else
- @milestone = Milestone.find(@params['id'])
+ @milestone = Milestone.find(params['id'])
end
end
# Updates the milestone identified by the 'id' request parameter with the
# information submitted from the #edit action.
def update
- milestone = Milestone.find(@params['id'])
- milestone.attributes = @params['milestone']
+ milestone = Milestone.find(params['id'])
+ milestone.attributes = params['milestone']
if milestone.valid?
milestone.save
flash[:status] = "Changes to milestone \"#{milestone.name}\" have " +
"been saved."
render 'layouts/refresh_parent_close_popup'
else
- @session[:edit_milestone] = milestone
+ session[:edit_milestone] = milestone
redirect_to :controller => 'milestones', :action => 'edit',
:id => milestone.id,
:project_id => milestone.project.id
@@ -97,7 +97,7 @@
# Deletes the milestone identified by the 'id' request parameter.
def delete
- milestone = Milestone.find(@params['id'])
+ milestone = Milestone.find(params['id'])
milestone.destroy
flash[:status] = "Milestone *#{milestone.name}* on *#{milestone.date}*" +
" has been deleted."
@@ -108,7 +108,7 @@
# Displays the details for the milestone identified by the 'id' request
# parameter.
def show
- @milestone = Milestone.find(@params['id'])
+ @milestone = Milestone.find(params['id'])
end
# Renders the partial template for the milestones calendar component.
@@ -117,7 +117,7 @@
if @project
milestones = @project.milestones
else
- milestones = @session[:current_user].projects.collect{|p| p.milestones}
+ milestones = session[:current_user].projects.collect{|p| p.milestones}
@calendar_title.gsub!(':', ' (all projects):')
end
milestones = milestones.flatten.select { |m|
@@ -139,7 +139,7 @@
# Renders the partial template for the list component. Requires the parameter
# 'include' to be set to one of 'future', 'recent', or 'all_past'
def list
- case @params['include']
+ case params['include']
when 'future'
@milestones = @project.milestones.future
when 'recent'
Modified: trunk/app/controllers/projects_controller.rb
===================================================================
--- trunk/app/controllers/projects_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/projects_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -36,8 +36,8 @@
# Displays a form for creating a new project.
def new
@page_title = "New Project"
- if @new_project = @session[:new_project]
- @session[:new_project] = nil
+ if @new_project = session[:new_project]
+ session[:new_project] = nil
else
@new_project = Project.new
end
@@ -46,16 +46,16 @@
# Creates a new project based on the information submitted from the #new
# action.
def create
- project = Project.new(@params['new_project'])
+ project = Project.new(params['new_project'])
if project.valid?
project.save
- if @params['add_me'] == '1'
- @session[:current_user].projects << project
+ if params['add_me'] == '1'
+ session[:current_user].projects << project
end
flash[:status] = "New project \"#{project.name}\" has been created."
redirect_to :controller => 'projects', :action => 'index'
else
- @session[:new_project] = project
+ session[:new_project] = project
redirect_to :controller => 'projects', :action => 'new'
end
end
@@ -74,10 +74,10 @@
# Adds the users identified by their id's in the 'selected_users' request
# parameter to the project.
def update_users
- @params['selected_users'] ||= []
+ params['selected_users'] ||= []
users_added = []
users_not_added = []
- @params['selected_users'].each do |uid|
+ params['selected_users'].each do |uid|
uid = uid.to_i
user = User.find(uid)
if user.valid?
@@ -102,7 +102,7 @@
# Removes the user identified by the 'id' request parameter from the project.
def remove_user
- user = User.find(@params['id'])
+ user = User.find(params['id'])
@project.users.delete(user)
flash[:status] = "#{user.full_name} has been removed from the project."
redirect_to :controller => 'users', :action => 'index',
@@ -112,7 +112,7 @@
# Deletes the project identified by the 'id' request parameter form the
# system.
def delete
- project = Project.find(@params['id'])
+ project = Project.find(params['id'])
project.destroy
flash[:status] = "#{project.name} has been deleted."
redirect_to :controller => 'projects', :action => 'index'
@@ -121,10 +121,10 @@
# Displays a form to edit the information for the project identified by the
# 'id' request parameter.
def edit
- if @project = @session[:edit_project]
- @session[:edit_project] = nil
+ if @project = session[:edit_project]
+ session[:edit_project] = nil
else
- @project = Project.find(@params['id'])
+ @project = Project.find(params['id'])
end
@page_title = "Edit Project"
end
@@ -132,14 +132,14 @@
# Updates the project identified by the 'id' request parameter with the
# information submitted from the #edit action.
def update
- project = Project.find(@params['id'])
- project.attributes = @params['project']
+ project = Project.find(params['id'])
+ project.attributes = params['project']
if project.valid?
project.save
flash[:status] = "Project \"#{project.name}\" has been updated."
redirect_to :controller => 'projects', :action => 'index'
else
- @session[:edit_project] = project
+ session[:edit_project] = project
redirect_to :controller => 'projects', :action => 'edit',
:id => project.id
end
@@ -148,7 +148,7 @@
# Renders an ordered list of projects (with links) to which the current user
# belongs
def my_projects_list
- @projects = @session[:current_user].projects
+ @projects = session[:current_user].projects
render_partial 'my_projects_list'
end
end
Modified: trunk/app/controllers/session_controller.rb
===================================================================
--- trunk/app/controllers/session_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/session_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -31,11 +31,11 @@
# If authentication is not successful, the user is directed back to the login
# page, and an error message is displayed.
def authenticate
- if @session[:current_user] = User.authenticate(@params['username'],
- @params['password'])
- if @session[:return_to]
- redirect_to_path @session[:return_to]
- @session[:return_to] = nil
+ if session[:current_user] = User.authenticate(params['username'],
+ params['password'])
+ if session[:return_to]
+ redirect_to_path session[:return_to]
+ session[:return_to] = nil
else
redirect_to :controller => 'dashboard', :action => 'index'
end
Modified: trunk/app/controllers/stories_controller.rb
===================================================================
--- trunk/app/controllers/stories_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/stories_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -30,7 +30,7 @@
@page_title = "Backlog"
SortHelper.columns = %w( scid title points priority risk status )
SortHelper.default_order = %w( status priority risk )
- if @params['show_cancelled']
+ if params['show_cancelled']
@stories = @project.stories.backlog
else
@stories = @project.stories.backlog.select { |s|
@@ -38,7 +38,7 @@
}
end
@stories.sort! do |a,b|
- SortHelper.sort(a,b, at params)
+ SortHelper.sort(a,b,params)
end
end
@@ -46,8 +46,8 @@
def new
@page_title = "Create new story card"
@selected_main_menu_link = :none
- if @story = @session[:new_story]
- @session[:new_story] = nil
+ if @story = session[:new_story]
+ session[:new_story] = nil
else
@story = Story.new
end
@@ -60,7 +60,7 @@
@page_title = "Create new story card"
@selected_main_menu_link = :none
modify_risk_status_and_priority_params
- story = Story.new(@params['story'])
+ story = Story.new(params['story'])
story.project = @project
if story.valid?
story.save
@@ -68,7 +68,7 @@
redirect_to :controller => 'stories', :action => 'index',
:project_id => @project.id
else
- @session[:new_story] = story
+ session[:new_story] = story
redirect_to :controller => 'stories', :action => 'new',
:project_id => @project.id
end
@@ -80,10 +80,10 @@
@selected_main_menu_link = :none
register_referer
- if @story = @session[:edit_story]
- @session[:edit_story] = nil
+ if @story = session[:edit_story]
+ session[:edit_story] = nil
else
- @story = Story.find(@params['id'])
+ @story = Story.find(params['id'])
end
@story.return_ids_for_aggregations
end
@@ -93,8 +93,8 @@
@page_title = "Edit story card"
@selected_main_menu_link = :none
modify_risk_status_and_priority_params
- story = Story.find(@params['id'])
- story.attributes = @params['story']
+ story = Story.find(params['id'])
+ story.attributes = params['story']
if story.valid?
story.save
flash[:status] = 'The changes to the story card have been saved.'
@@ -104,7 +104,7 @@
:project_id => @project.id.to_s
end
else
- @session[:edit_story] = story
+ session[:edit_story] = story
redirect_to :controller => 'stories', :action => 'edit',
:id => story.id.to_s, :project_id => @project.id.to_s
end
@@ -112,11 +112,11 @@
# Destroys the story card identified by the 'id' request parameter.
def delete
- Story.destroy(@params['id'])
+ Story.destroy(params['id'])
flash[:status] = 'The story card was deleted.'
- if @params['iteration_id']
+ if params['iteration_id']
redirect_to :controller => 'iterations', :action => 'show',
- :id => @params['iteration_id'],
+ :id => params['iteration_id'],
:project_id => @project.id.to_s
else
redirect_to :controller => 'stories', :action => 'index',
@@ -127,15 +127,15 @@
# Displays the details for the story card identified by the 'id' request
# parameter.
def show
- @story = Story.find(@params['id'])
+ @story = Story.find(params['id'])
@selected_main_menu_link = :none
@page_title = @story.title
end
# Sets the storycard's Story#owner attribute to the currently logged in user.
def take_ownership
- story = Story.find(@params['id'])
- story.owner = @session[:current_user]
+ story = Story.find(params['id'])
+ story.owner = session[:current_user]
story.save
flash[:status] = "SC#{story.scid} has been updated."
redirect_to :controller => 'iterations', :action => 'show',
@@ -144,7 +144,7 @@
# Sets the story's owner to nil
def release_ownership
- story = Story.find(@params['id'])
+ story = Story.find(params['id'])
story.owner = nil
story.save
flash[:status] = "SC#{story.scid} has been updated."
@@ -158,18 +158,18 @@
# actual objects that need to be assigned based on the integer value
# originally passed in that parameter.
def modify_risk_status_and_priority_params
- if @params['story']
- if @params['story']['status']
- @params['story']['status'] =
- Story::Status.new(@params['story']['status'].to_i)
+ if params['story']
+ if params['story']['status']
+ params['story']['status'] =
+ Story::Status.new(params['story']['status'].to_i)
end
- if @params['story']['priority']
- @params['story']['priority'] =
- Story::Priority.new(@params['story']['priority'].to_i)
+ if params['story']['priority']
+ params['story']['priority'] =
+ Story::Priority.new(params['story']['priority'].to_i)
end
- if @params['story']['risk']
- @params['story']['risk'] =
- Story::Risk.new(@params['story']['risk'].to_i)
+ if params['story']['risk']
+ params['story']['risk'] =
+ Story::Risk.new(params['story']['risk'].to_i)
end
end
end
Modified: trunk/app/controllers/users_controller.rb
===================================================================
--- trunk/app/controllers/users_controller.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/controllers/users_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -36,9 +36,9 @@
# Displays the form to create a new user account.
def new
@page_title = "New User"
- if @session[:new_user]
- @user = @session[:new_user]
- @session[:new_user] = nil
+ if session[:new_user]
+ @user = session[:new_user]
+ session[:new_user] = nil
else
register_referer
@user = User.new
@@ -47,11 +47,11 @@
# Displays the form to edit a user account.
def edit
- @user = User.find(@params['id'])
+ @user = User.find(params['id'])
@page_title = @user.full_name
- if @session[:edit_user]
- @user = @session[:edit_user]
- @session[:edit_user] = nil
+ if session[:edit_user]
+ @user = session[:edit_user]
+ session[:edit_user] = nil
else
register_referer
end
@@ -60,7 +60,7 @@
# Creates a new user account based o information submitted from the #new
# action.
def create
- user = User.new(@params['user'])
+ user = User.new(params['user'])
if user.valid?
user.save
flash[:status] = "User account for #{user.full_name} has been created."
@@ -75,7 +75,7 @@
redirect_to :controller => 'dashboard'
end
else
- @session[:new_user] = user
+ session[:new_user] = user
if @project
redirect_to(:controller => 'users', :action => 'new',
:project_id => @project.id)
@@ -87,14 +87,14 @@
# Updates a user account with the information submitted from the #edit action.
def update
- user = User.find(@params['id'])
+ user = User.find(params['id'])
original_password = user.password
- user.attributes = @params['user']
- if @params['user']['password'] == ''
+ user.attributes = params['user']
+ if params['user']['password'] == ''
user.password = user.password_confirmation = original_password
end
- if user == @session[:current_user] and !user.admin? and
- @session[:current_user].admin?
+ if user == session[:current_user] and !user.admin? and
+ session[:current_user].admin?
user.admin = 1
flash[:error] = "You can not remove admin privileges from yourself."
@@ -106,15 +106,15 @@
redirect_to :controller => 'dashboard'
end
else
- @session[:edit_user] = user
+ session[:edit_user] = user
redirect_to(:controller => 'users', :action => 'edit', :id => user.id)
end
end
# Deletes the user account identified by the 'id' request parameter.
def delete
- user = User.find(@params['id'])
- if user == @session[:current_user]
+ user = User.find(params['id'])
+ if user == session[:current_user]
flash[:error] = "You can not delete your own account."
else
user.destroy
@@ -130,7 +130,7 @@
def require_admin_privileges
case action_name
when 'edit','update'
- super if @params['id'].to_i != @session[:current_user].id
+ super if params['id'].to_i != session[:current_user].id
else
super
end
Modified: trunk/app/helpers/application_helper.rb
===================================================================
--- trunk/app/helpers/application_helper.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/helpers/application_helper.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -24,14 +24,14 @@
# Used to determine if the currently logged in user has administrative
# privileges
def is_admin?
- @session[:current_user].admin?
+ session[:current_user].admin?
end
# Returns an array of projects other than the currently active project which
# the curren tuser has access to
def other_projects
unless @other_projects_cache
- can_access = @session[:current_user].projects
+ can_access = session[:current_user].projects
@other_projects_cache = can_access.select { |p| p != @project }
end
@other_projects_cache
Modified: trunk/app/helpers/sort_helper.rb
===================================================================
--- trunk/app/helpers/sort_helper.rb 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/helpers/sort_helper.rb 2006-02-24 16:36:33 UTC (rev 188)
@@ -48,7 +48,7 @@
# ]
# SortHelper.default_order = %w[family.name name]
# @people = Person.find_all.sort do |a, b|
-# SortHelper.sort(a, b, @params)
+# SortHelper.sort(a, b, params)
# end
# end
#
@@ -80,7 +80,7 @@
sort_key = @@sort_keys[sort_column]
- sort = (@params['sort'] || '').split.map {|param| param.to_i }
+ sort = (params['sort'] || '').split.map {|param| param.to_i }
if sort[0] && sort[0].abs == sort_key
sort[0] = -sort[0]
@@ -118,7 +118,7 @@
#
# Use it like this:
# @people = Person.find_all.sort do |a, b|
- # SortHelper.sort(a, b, @params)
+ # SortHelper.sort(a, b, params)
# end
#
def self.sort(a, b, params)
Modified: trunk/app/views/layouts/main.rhtml
===================================================================
--- trunk/app/views/layouts/main.rhtml 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/views/layouts/main.rhtml 2006-02-24 16:36:33 UTC (rev 188)
@@ -31,13 +31,13 @@
<% end%>
- <% if @session[:current_user] %>
+ <% if session[:current_user] %>
<% end %>
Modified: trunk/app/views/stories/index.rhtml
===================================================================
--- trunk/app/views/stories/index.rhtml 2006-02-24 16:25:58 UTC (rev 187)
+++ trunk/app/views/stories/index.rhtml 2006-02-24 16:36:33 UTC (rev 188)
@@ -1,12 +1,12 @@
Story Cards in Project Backlog
<%= link_to('New Story Card', :controller => 'stories', :action => 'new', :project_id => @project.id) %>
-<% if @params['show_cancelled'] %>
+<% if params['show_cancelled'] %>
<%= link_to('Hide Cancelled Stories', :controller => 'stories', :action => 'index', :project_id => @project.id,
- :sort => @params['sort']) %>
+ :sort => params['sort']) %>
<% else %>
<%= link_to('Show Cancelled Stories', :controller => 'stories', :action => 'index', :project_id => @project.id,
- :show_cancelled => 1, :sort => @params['sort']) %>
+ :show_cancelled => 1, :sort => params['sort']) %>
<% end %>
<% unless @stories.empty? %>
From svn at explainpmt.com Fri Feb 24 11:40:10 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:40:10 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [189] Removed unnecessary
declarations of 'helper :collection_table' in the controllers
since it is already declared in
Message-ID: <20060224164010.28DE3C9855@thurlow.textdrive.com>
Revision: 189
Author: jwilger
Date: 2006-02-24 16:40:09 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
Removed unnecessary declarations of 'helper :collection_table' in the controllers since it is already declared in ApplicationController
Modified Paths:
--------------
trunk/app/controllers/dashboard_controller.rb
trunk/app/controllers/iterations_controller.rb
trunk/app/controllers/stories_controller.rb
Modified: trunk/app/controllers/dashboard_controller.rb
===================================================================
--- trunk/app/controllers/dashboard_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
+++ trunk/app/controllers/dashboard_controller.rb 2006-02-24 16:40:09 UTC (rev 189)
@@ -18,8 +18,6 @@
=end LICENSE
class DashboardController < ApplicationController
- helper :collection_table
-
# If called without a project_id parameter, displays summary information for
# all projects for which the user is a team member. If a project_id parameter
# is passed, summary information will be displayed for that project. Also, if
Modified: trunk/app/controllers/iterations_controller.rb
===================================================================
--- trunk/app/controllers/iterations_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
+++ trunk/app/controllers/iterations_controller.rb 2006-02-24 16:40:09 UTC (rev 189)
@@ -18,8 +18,6 @@
=end LICENSE
class IterationsController < ApplicationController
- helper :collection_table
-
before_filter :require_current_project
popups :new, :create, :edit, :update, :select_stories, :assign_stories
Modified: trunk/app/controllers/stories_controller.rb
===================================================================
--- trunk/app/controllers/stories_controller.rb 2006-02-24 16:36:33 UTC (rev 188)
+++ trunk/app/controllers/stories_controller.rb 2006-02-24 16:40:09 UTC (rev 189)
@@ -20,8 +20,6 @@
class StoriesController < ApplicationController
before_filter :require_current_project
- helper :collection_table
-
# Lists all of the stories in the project 'Backlog' (stories that have no
# iteration). Stories with a "cancelled" status are hidden by default. They
# can be displayed by passing the request parameter 'show_cancelled' (with any
From svn at explainpmt.com Fri Feb 24 11:42:04 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:42:04 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [190] Removed unnecessary call
to 'model :project' in ProjectController
Message-ID: <20060224164204.0B042C97B8@thurlow.textdrive.com>
Revision: 190
Author: jwilger
Date: 2006-02-24 16:42:03 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
Removed unnecessary call to 'model :project' in ProjectController
Modified Paths:
--------------
trunk/app/controllers/projects_controller.rb
Modified: trunk/app/controllers/projects_controller.rb
===================================================================
--- trunk/app/controllers/projects_controller.rb 2006-02-24 16:40:09 UTC (rev 189)
+++ trunk/app/controllers/projects_controller.rb 2006-02-24 16:42:03 UTC (rev 190)
@@ -20,7 +20,6 @@
# All actions on this controller require the user to have administrative
# privileges.
class ProjectsController < ApplicationController
- model :project
before_filter :require_admin_privileges, :only => [ :new, :create, :add_users,
:update_users, :edit,
:update, :remove_user,
From svn at explainpmt.com Fri Feb 24 11:46:11 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Fri, 24 Feb 2006 16:46:11 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [191] Removed schema.rb file
from repository,
since new installations should now use the migrations to set up the
full database anyway.
Message-ID: <20060224164611.1895EC972E@thurlow.textdrive.com>
Revision: 191
Author: jwilger
Date: 2006-02-24 16:46:10 +0000 (Fri, 24 Feb 2006)
Log Message:
-----------
Removed schema.rb file from repository, since new installations should now use the migrations to set up the full database anyway.
Removed Paths:
-------------
trunk/db/schema.rb
Property Changed:
----------------
trunk/db/
Property changes on: trunk/db
___________________________________________________________________
Name: svn:ignore
- development_structure.sql
+ development_structure.sql
schema.rb
Deleted: trunk/db/schema.rb
===================================================================
--- trunk/db/schema.rb 2006-02-24 16:42:03 UTC (rev 190)
+++ trunk/db/schema.rb 2006-02-24 16:46:10 UTC (rev 191)
@@ -1,61 +0,0 @@
-# This file is autogenerated. Instead of editing this file, please use the
-# migrations feature of ActiveRecord to incrementally modify your database, and
-# then regenerate this schema definition.
-
-ActiveRecord::Schema.define(:version => 1) do
-
- create_table "iterations", :force => true do |t|
- t.column "project_id", :integer
- t.column "start_date", :date
- t.column "length", :integer
- t.column "budget", :integer
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
- end
-
- create_table "milestones", :force => true do |t|
- t.column "project_id", :integer
- t.column "date", :date
- t.column "name", :string
- t.column "description", :text
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
- end
-
- create_table "projects", :force => true do |t|
- t.column "name", :string
- t.column "description", :text
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
- end
-
- create_table "projects_users", :id => false, :force => true do |t|
- t.column "user_id", :integer
- t.column "project_id", :integer
- end
-
- create_table "stories", :force => true do |t|
- t.column "scid", :integer
- t.column "project_id", :integer
- t.column "iteration_id", :integer
- t.column "user_id", :integer
- t.column "title", :string
- t.column "points", :integer
- t.column "status", :integer
- t.column "priority", :integer
- t.column "risk", :integer
- t.column "description", :text
- end
-
- create_table "users", :force => true do |t|
- t.column "username", :string
- t.column "password", :string
- t.column "email", :string
- t.column "first_name", :string
- t.column "last_name", :string
- t.column "admin", :boolean
- t.column "created_at", :datetime
- t.column "updated_at", :datetime
- end
-
-end
From svn at explainpmt.com Sat Feb 25 00:00:48 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Sat, 25 Feb 2006 05:00:48 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [192] Tagging release
20060225.0
Message-ID: <20060225050048.47DCAC9898@thurlow.textdrive.com>
Revision: 192
Author: jwilger
Date: 2006-02-25 05:00:45 +0000 (Sat, 25 Feb 2006)
Log Message:
-----------
Tagging release 20060225.0
Added Paths:
-----------
tags/release_20060225.0/
Copied: tags/release_20060225.0 (from rev 191, trunk)
From svn at explainpmt.com Sat Feb 25 00:02:37 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Sat, 25 Feb 2006 05:02:37 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [193] Updated version string
for release
Message-ID: <20060225050237.111B0C9898@thurlow.textdrive.com>
Revision: 193
Author: jwilger
Date: 2006-02-25 05:02:36 +0000 (Sat, 25 Feb 2006)
Log Message:
-----------
Updated version string for release
Modified Paths:
--------------
tags/release_20060225.0/app/helpers/application_helper.rb
Modified: tags/release_20060225.0/app/helpers/application_helper.rb
===================================================================
--- tags/release_20060225.0/app/helpers/application_helper.rb 2006-02-25 05:00:45 UTC (rev 192)
+++ tags/release_20060225.0/app/helpers/application_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
@@ -19,7 +19,7 @@
# The methods added to this helper will be available to all templates in the application.
module ApplicationHelper
- VERSION = 'dev trunk'
+ VERSION = '20060225.0'
# Used to determine if the currently logged in user has administrative
# privileges
From svn at explainpmt.com Sat Feb 25 18:04:19 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Sat, 25 Feb 2006 23:04:19 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [194] Updated the file headers
Message-ID: <20060225230419.DA5E7C9879@thurlow.textdrive.com>
Revision: 194
Author: jwilger
Date: 2006-02-25 23:04:10 +0000 (Sat, 25 Feb 2006)
Log Message:
-----------
Updated the file headers
Modified Paths:
--------------
trunk/app/controllers/application.rb
trunk/app/controllers/dashboard_controller.rb
trunk/app/controllers/error_controller.rb
trunk/app/controllers/iterations_controller.rb
trunk/app/controllers/milestones_controller.rb
trunk/app/controllers/projects_controller.rb
trunk/app/controllers/session_controller.rb
trunk/app/controllers/stories_controller.rb
trunk/app/controllers/users_controller.rb
trunk/app/helpers/application_helper.rb
trunk/app/helpers/collection_table_helper.rb
trunk/app/helpers/dashboard_helper.rb
trunk/app/helpers/error_helper.rb
trunk/app/helpers/iterations_helper.rb
trunk/app/helpers/milestones_helper.rb
trunk/app/helpers/projects_helper.rb
trunk/app/helpers/session_helper.rb
trunk/app/helpers/sort_helper.rb
trunk/app/helpers/stories_helper.rb
trunk/app/helpers/users_helper.rb
trunk/app/models/iteration.rb
trunk/app/models/milestone.rb
trunk/app/models/project.rb
trunk/app/models/story.rb
trunk/app/models/user.rb
trunk/db/migrate/001_create_initial_database.rb
trunk/lib/array_each_slice.rb
trunk/lib/tasks/test.rake
trunk/test/functional/dashboard_controller_test.rb
trunk/test/functional/error_controller_test.rb
trunk/test/functional/iterations_controller_test.rb
trunk/test/functional/milestones_controller_test.rb
trunk/test/functional/projects_controller_test.rb
trunk/test/functional/session_controller_test.rb
trunk/test/functional/stories_controller_test.rb
trunk/test/functional/users_controller_test.rb
trunk/test/unit/array_each_slice_test.rb
trunk/test/unit/collection_table_helper_test.rb
trunk/test/unit/iteration_test.rb
trunk/test/unit/milestone_test.rb
trunk/test/unit/project_test.rb
trunk/test/unit/story_test.rb
trunk/test/unit/user_test.rb
Modified: trunk/app/controllers/application.rb
===================================================================
--- trunk/app/controllers/application.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/application.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# The filters added to this controller will be run for all controllers in the application.
# Likewise will all the methods added be available for all controllers.
class ApplicationController < ActionController::Base
Modified: trunk/app/controllers/dashboard_controller.rb
===================================================================
--- trunk/app/controllers/dashboard_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/dashboard_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class DashboardController < ApplicationController
# If called without a project_id parameter, displays summary information for
# all projects for which the user is a team member. If a project_id parameter
Modified: trunk/app/controllers/error_controller.rb
===================================================================
--- trunk/app/controllers/error_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/error_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class ErrorController < ApplicationController
popups :popup
Modified: trunk/app/controllers/iterations_controller.rb
===================================================================
--- trunk/app/controllers/iterations_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/iterations_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class IterationsController < ApplicationController
before_filter :require_current_project
popups :new, :create, :edit, :update, :select_stories, :assign_stories
Modified: trunk/app/controllers/milestones_controller.rb
===================================================================
--- trunk/app/controllers/milestones_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/milestones_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class MilestonesController < ApplicationController
before_filter :require_current_project, :except => [:milestones_calendar]
popups :new, :create, :show, :edit, :update
Modified: trunk/app/controllers/projects_controller.rb
===================================================================
--- trunk/app/controllers/projects_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/projects_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# All actions on this controller require the user to have administrative
# privileges.
class ProjectsController < ApplicationController
Modified: trunk/app/controllers/session_controller.rb
===================================================================
--- trunk/app/controllers/session_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/session_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class SessionController < ApplicationController
layout nil
Modified: trunk/app/controllers/stories_controller.rb
===================================================================
--- trunk/app/controllers/stories_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/stories_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class StoriesController < ApplicationController
before_filter :require_current_project
Modified: trunk/app/controllers/users_controller.rb
===================================================================
--- trunk/app/controllers/users_controller.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/controllers/users_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
class UsersController < ApplicationController
before_filter :require_admin_privileges, :except => [:index, :project]
Modified: trunk/app/helpers/application_helper.rb
===================================================================
--- trunk/app/helpers/application_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/application_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# The methods added to this helper will be available to all templates in the application.
module ApplicationHelper
VERSION = 'dev trunk'
Modified: trunk/app/helpers/collection_table_helper.rb
===================================================================
--- trunk/app/helpers/collection_table_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/collection_table_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module CollectionTableHelper
# Creates an HTML table based on any collection (Enumerable) of objects.
#
Modified: trunk/app/helpers/dashboard_helper.rb
===================================================================
--- trunk/app/helpers/dashboard_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/dashboard_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module DashboardHelper
end
Modified: trunk/app/helpers/error_helper.rb
===================================================================
--- trunk/app/helpers/error_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/error_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,21 +1,22 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module ErrorHelper
end
Modified: trunk/app/helpers/iterations_helper.rb
===================================================================
--- trunk/app/helpers/iterations_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/iterations_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,21 +1,22 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module IterationsHelper
end
Modified: trunk/app/helpers/milestones_helper.rb
===================================================================
--- trunk/app/helpers/milestones_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/milestones_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module MilestonesHelper
end
Modified: trunk/app/helpers/projects_helper.rb
===================================================================
--- trunk/app/helpers/projects_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/projects_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,21 +1,22 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module ProjectsHelper
end
Modified: trunk/app/helpers/session_helper.rb
===================================================================
--- trunk/app/helpers/session_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/session_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,21 +1,22 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module SessionHelper
end
Modified: trunk/app/helpers/sort_helper.rb
===================================================================
--- trunk/app/helpers/sort_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/sort_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,24 +1,23 @@
-=begin License
- (License covers modifications to Dave Burt's original code.)
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# = sort_helper.rb - SortHelper for Ruby on Rails
#
# Author: Dave Burt mailto:dave at burt.id.au
Modified: trunk/app/helpers/stories_helper.rb
===================================================================
--- trunk/app/helpers/stories_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/stories_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,21 +1,22 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module StoriesHelper
end
Modified: trunk/app/helpers/users_helper.rb
===================================================================
--- trunk/app/helpers/users_helper.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/helpers/users_helper.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,21 +1,22 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
module UsersHelper
end
Modified: trunk/app/models/iteration.rb
===================================================================
--- trunk/app/models/iteration.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/models/iteration.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# An Iteration is a planning unit that identifies a period of time with a
# starting date, a length (in days) and a budget of story points. An iteration
# can have 0 or more Story objects associated with it, and this is how the user
Modified: trunk/app/models/milestone.rb
===================================================================
--- trunk/app/models/milestone.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/models/milestone.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# A Milestone represents a particular event or date that the project team should
# be aware of but is not a work item or attached to any specific Iteration.
# Examples might include: the planned date for a release, an important meeting,
Modified: trunk/app/models/project.rb
===================================================================
--- trunk/app/models/project.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/models/project.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# A Project is the hub which connects User, Milestone, Iteration, and Story
# objects (and any other information in the system). With the exception of User
# objects, everything else _must_ be associated with a project; and when a
Modified: trunk/app/models/story.rb
===================================================================
--- trunk/app/models/story.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/models/story.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# Story is the basic planning unit of the eXPlainPMT system (as in the eXtreme
# Programming methodology). Story cards are defined and estimated and then
# assigned to an Iteration to schedule them for completion.
Modified: trunk/app/models/user.rb
===================================================================
--- trunk/app/models/user.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/app/models/user.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,22 +1,23 @@
-=begin License
- eXPlain Project Management Tool
- Copyright (C) 2005 John Wilger
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-=end LICENSE
-
# A User represents an account on the system. Each person that can log into the
# system has an associated User object.
#
Modified: trunk/db/migrate/001_create_initial_database.rb
===================================================================
--- trunk/db/migrate/001_create_initial_database.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/db/migrate/001_create_initial_database.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,22 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
class CreateInitialDatabase < ActiveRecord::Migration
class User < ActiveRecord::Base; end
Modified: trunk/lib/array_each_slice.rb
===================================================================
--- trunk/lib/array_each_slice.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/lib/array_each_slice.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
class Array
def each_slice(size, &block)
array = self.dup
Modified: trunk/lib/tasks/test.rake
===================================================================
--- trunk/lib/tasks/test.rake 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/lib/tasks/test.rake 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,2 +1,22 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
task :tu => :test_units
task :tf => :test_functional
Modified: trunk/test/functional/dashboard_controller_test.rb
===================================================================
--- trunk/test/functional/dashboard_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/dashboard_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,22 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
require File.dirname(__FILE__) + '/../test_helper'
require 'dashboard_controller'
Modified: trunk/test/functional/error_controller_test.rb
===================================================================
--- trunk/test/functional/error_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/error_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,22 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
require File.dirname(__FILE__) + '/../test_helper'
require 'error_controller'
Modified: trunk/test/functional/iterations_controller_test.rb
===================================================================
--- trunk/test/functional/iterations_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/iterations_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'iterations_controller'
Modified: trunk/test/functional/milestones_controller_test.rb
===================================================================
--- trunk/test/functional/milestones_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/milestones_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,234 +1,254 @@
-require File.dirname(__FILE__) + '/../test_helper'
-require 'milestones_controller'
-
-# Re-raise errors caught by the controller.
-class MilestonesController; def rescue_action(e) raise e end; end
-
-class MilestonesControllerTest < Test::Unit::TestCase
- FULL_PAGES = [:index]
- POPUPS = [ :new,:create,:show,:edit,:update ]
- NO_RENDERS = [:delete]
- ALL_ACTIONS = FULL_PAGES + POPUPS + NO_RENDERS + [:milestones_calendar]
-
- fixtures ALL_FIXTURES
-
- def setup
- @project_one = Project.find 1
- @project_two = Project.find 2
- @past_milestone1 = Milestone.find 1
- @past_milestone2 = Milestone.find 2
- @recent_milestone1 = Milestone.find 3
- @recent_milestone2 = Milestone.find 4
- @future_milestone1 = Milestone.find 5
- @future_milestone2 = Milestone.find 6
- @future_milestone3 = Milestone.find 7
- @future_milestone4 = Milestone.find 8
-
- @controller = MilestonesController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- @request.session[:current_user] = User.find 2
- end
-
- def test_authentication_required
- @request.session[:current_user] = nil
- ALL_ACTIONS.each do |a|
- process a
- assert_redirected_to :controller => 'session', :action => 'login'
- assert session[:return_to]
- end
- end
-
- def test_index
- get :index, :project_id => @project_one.id
- assert_response :success
- assert_equal 'recent', assigns(:past_milestones)
- end
-
- def test_index_all_past
- get :index, :project_id => @project_one.id, :show_all => '1'
- assert_response :success
- assert_equal 'all_past', assigns(:past_milestones)
- end
-
- def test_no_project_id
- (FULL_PAGES + NO_RENDERS).each do |a|
- process a
- assert_redirected_to :controller => 'error', :action => 'index'
- assert_equal "You attempted to access a view that requires a project to " +
- "be selected, but no project id was set in your request.",
- flash[:error]
- end
- POPUPS.each do |a|
- process a
- assert_redirected_to :controller => 'error', :action => 'popup'
- assert_equal "You attempted to access a view that requires a project to " +
- "be selected, but no project id was set in your request.",
- flash[:error]
- end
- end
-
- def test_new
- get :new, 'project_id' => @project_one.id
- assert_response :success
- assert_template 'new'
- assert_equal @project_one, assigns(:project)
- assert_kind_of Milestone, assigns(:milestone)
- assert assigns(:milestone).new_record?
- end
-
- def test_create
- before_count = Milestone.count
- post :create, 'project_id' => @project_one.id,
- 'milestone' => { 'name' => 'Test Create', 'date' => '2005-12-31' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
- assert_equal before_count + 1, Milestone.count
- end
-
- def test_create_invalid
- before_count = Milestone.count
- post :create, 'project_id' => @project_one.id,
- 'milestone' => { 'name' => 'test_create_invalid', 'date' => '' }
- assert_redirected_to :controller => 'milestones', :action => 'new'
- assert_kind_of Milestone, session[:new_milestone]
- assert_equal 'test_create_invalid', session[:new_milestone].name
- end
-
- def test_edit
- get :edit, 'id' => @future_milestone1.id,
- 'project_id' => @future_milestone1.project.id
- assert_response :success
- assert_template 'edit'
- assert_equal @future_milestone1, assigns(:milestone)
- end
-
- def test_edit_from_invalid
- @request.session[:edit_milestone] = @future_milestone1
- get :edit, 'id' => @future_milestone1.id,
- 'project_id' => @future_milestone1.project.id
- assert_response :success
- assert_template 'edit'
- assert_kind_of Milestone, assigns(:milestone)
- assert_equal @future_milestone1.id, assigns(:milestone).id
- assert_nil session[:edit_milestone]
- end
-
- def test_update
- post :update, 'id' => @future_milestone1.id,
- 'project_id' => @future_milestone1.project.id,
- 'milestone' => { 'name' => 'Fooooo!' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
- m = Milestone.find(@future_milestone1.id)
- assert_equal 'Fooooo!', m.name
- assert flash[:status]
- end
-
- def test_update_invalid
- post :update, 'id' => @future_milestone1.id,
- 'project_id' => @future_milestone1.project.id,
- 'milestone' => { 'name' => '' }
- assert_redirected_to :controller => 'milestones', :action => 'edit',
- :id => @future_milestone1.id,
- :project_id => @future_milestone1.project.id
- m = Milestone.find(@future_milestone1.id)
- m.name = ''
- assert_equal m, session[:edit_milestone]
- end
-
- def test_delete
- get :delete, 'project_id' => @project_one.id, 'id' => @future_milestone1.id
- assert_redirected_to :controller => 'milestones', :action => 'index'
- assert flash[:status]
- assert_raise(ActiveRecord::RecordNotFound) {
- Milestone.find(@future_milestone1.id)
- }
- end
-
- def test_show
- get :show, :id => @future_milestone1.id,
- :project_id => @future_milestone1.project.id
- assert_response :success
- assert_template 'show'
- assert_equal @future_milestone1, assigns(:milestone)
- end
-
- def test_milestones_calendar_all_projects
- get :milestones_calendar
- assert_response :success
- assert_template '_milestones_calendar'
- days = empty_milestones_days_array
- days[0][:milestones] << @future_milestone1
- days[12][:milestones] << @future_milestone3
- days[13][:milestones] << @future_milestone4
- assert_equal days, assigns(:days)
- assert_equal 'Upcoming Milestones (all projects):',
- assigns(:calendar_title)
- assert_tag :tag => "li", :content =>"Project One: Milestone Seven"
- assert_tag :tag => "li", :content =>"Project Two: Milestone Eight"
- end
-
- def test_milestones_calendar_one_project
- get :milestones_calendar, 'project_id' => 1
- assert_response :success
- assert_template '_milestones_calendar'
- days = empty_milestones_days_array
- days[0][:milestones] << @future_milestone1
- days[12][:milestones] << @future_milestone3
- assert_equal days, assigns(:days)
- assert_equal 'Upcoming Milestones:', assigns(:calendar_title)
- assert_no_tag :tag => "li", :content =>"Project One: Milestone Seven"
- assert_tag :tag => "li", :content =>"Milestone Seven"
- end
-
- def test_list_future
- process :list, :project_id => @project_one.id, :include => 'future'
- assert_response :success
- assert_template '_list'
- assert_equal [ @future_milestone1, @future_milestone3, @future_milestone2 ],
- assigns(:milestones)
- end
-
- def test_list_recent
- process :list, :project_id => @project_one.id, :include => 'recent'
- assert_response :success
- assert_template '_list'
- assert_equal [ @recent_milestone2, @recent_milestone1 ],
- assigns(:milestones)
- end
-
- def test_list_all_past
- process :list, :project_id => @project_one.id, :include => 'all_past'
- assert_response :success
- assert_template '_list'
- assert_equal [ @recent_milestone2, @recent_milestone1, @past_milestone2,
- @past_milestone1 ], assigns(:milestones)
- end
-
- def test_list_nothing_to_show
- @project_one.milestones.clear
- [ 'future', 'recent', 'all_past' ].each do |type|
- process :list, :project_id => @project_one.id, :include => type
- assert_response :success
- assert_equal '
Nothing to show.
', @response.body
- end
- end
-
- private
-
- def empty_milestones_days_array
- days = []
- 14.times do |i|
- current_day = Date.today + i
- days << {
- :date => current_day,
- :name => Date::DAYNAMES[current_day.wday],
- :milestones => []
- }
- end
- return days
- end
-end
-
-
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
+require File.dirname(__FILE__) + '/../test_helper'
+require 'milestones_controller'
+
+# Re-raise errors caught by the controller.
+class MilestonesController; def rescue_action(e) raise e end; end
+
+class MilestonesControllerTest < Test::Unit::TestCase
+ FULL_PAGES = [:index]
+ POPUPS = [ :new,:create,:show,:edit,:update ]
+ NO_RENDERS = [:delete]
+ ALL_ACTIONS = FULL_PAGES + POPUPS + NO_RENDERS + [:milestones_calendar]
+
+ fixtures ALL_FIXTURES
+
+ def setup
+ @project_one = Project.find 1
+ @project_two = Project.find 2
+ @past_milestone1 = Milestone.find 1
+ @past_milestone2 = Milestone.find 2
+ @recent_milestone1 = Milestone.find 3
+ @recent_milestone2 = Milestone.find 4
+ @future_milestone1 = Milestone.find 5
+ @future_milestone2 = Milestone.find 6
+ @future_milestone3 = Milestone.find 7
+ @future_milestone4 = Milestone.find 8
+
+ @controller = MilestonesController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ @request.session[:current_user] = User.find 2
+ end
+
+ def test_authentication_required
+ @request.session[:current_user] = nil
+ ALL_ACTIONS.each do |a|
+ process a
+ assert_redirected_to :controller => 'session', :action => 'login'
+ assert session[:return_to]
+ end
+ end
+
+ def test_index
+ get :index, :project_id => @project_one.id
+ assert_response :success
+ assert_equal 'recent', assigns(:past_milestones)
+ end
+
+ def test_index_all_past
+ get :index, :project_id => @project_one.id, :show_all => '1'
+ assert_response :success
+ assert_equal 'all_past', assigns(:past_milestones)
+ end
+
+ def test_no_project_id
+ (FULL_PAGES + NO_RENDERS).each do |a|
+ process a
+ assert_redirected_to :controller => 'error', :action => 'index'
+ assert_equal "You attempted to access a view that requires a project to " +
+ "be selected, but no project id was set in your request.",
+ flash[:error]
+ end
+ POPUPS.each do |a|
+ process a
+ assert_redirected_to :controller => 'error', :action => 'popup'
+ assert_equal "You attempted to access a view that requires a project to " +
+ "be selected, but no project id was set in your request.",
+ flash[:error]
+ end
+ end
+
+ def test_new
+ get :new, 'project_id' => @project_one.id
+ assert_response :success
+ assert_template 'new'
+ assert_equal @project_one, assigns(:project)
+ assert_kind_of Milestone, assigns(:milestone)
+ assert assigns(:milestone).new_record?
+ end
+
+ def test_create
+ before_count = Milestone.count
+ post :create, 'project_id' => @project_one.id,
+ 'milestone' => { 'name' => 'Test Create', 'date' => '2005-12-31' }
+ assert_response :success
+ assert_template 'layouts/refresh_parent_close_popup'
+ assert_equal before_count + 1, Milestone.count
+ end
+
+ def test_create_invalid
+ before_count = Milestone.count
+ post :create, 'project_id' => @project_one.id,
+ 'milestone' => { 'name' => 'test_create_invalid', 'date' => '' }
+ assert_redirected_to :controller => 'milestones', :action => 'new'
+ assert_kind_of Milestone, session[:new_milestone]
+ assert_equal 'test_create_invalid', session[:new_milestone].name
+ end
+
+ def test_edit
+ get :edit, 'id' => @future_milestone1.id,
+ 'project_id' => @future_milestone1.project.id
+ assert_response :success
+ assert_template 'edit'
+ assert_equal @future_milestone1, assigns(:milestone)
+ end
+
+ def test_edit_from_invalid
+ @request.session[:edit_milestone] = @future_milestone1
+ get :edit, 'id' => @future_milestone1.id,
+ 'project_id' => @future_milestone1.project.id
+ assert_response :success
+ assert_template 'edit'
+ assert_kind_of Milestone, assigns(:milestone)
+ assert_equal @future_milestone1.id, assigns(:milestone).id
+ assert_nil session[:edit_milestone]
+ end
+
+ def test_update
+ post :update, 'id' => @future_milestone1.id,
+ 'project_id' => @future_milestone1.project.id,
+ 'milestone' => { 'name' => 'Fooooo!' }
+ assert_response :success
+ assert_template 'layouts/refresh_parent_close_popup'
+ m = Milestone.find(@future_milestone1.id)
+ assert_equal 'Fooooo!', m.name
+ assert flash[:status]
+ end
+
+ def test_update_invalid
+ post :update, 'id' => @future_milestone1.id,
+ 'project_id' => @future_milestone1.project.id,
+ 'milestone' => { 'name' => '' }
+ assert_redirected_to :controller => 'milestones', :action => 'edit',
+ :id => @future_milestone1.id,
+ :project_id => @future_milestone1.project.id
+ m = Milestone.find(@future_milestone1.id)
+ m.name = ''
+ assert_equal m, session[:edit_milestone]
+ end
+
+ def test_delete
+ get :delete, 'project_id' => @project_one.id, 'id' => @future_milestone1.id
+ assert_redirected_to :controller => 'milestones', :action => 'index'
+ assert flash[:status]
+ assert_raise(ActiveRecord::RecordNotFound) {
+ Milestone.find(@future_milestone1.id)
+ }
+ end
+
+ def test_show
+ get :show, :id => @future_milestone1.id,
+ :project_id => @future_milestone1.project.id
+ assert_response :success
+ assert_template 'show'
+ assert_equal @future_milestone1, assigns(:milestone)
+ end
+
+ def test_milestones_calendar_all_projects
+ get :milestones_calendar
+ assert_response :success
+ assert_template '_milestones_calendar'
+ days = empty_milestones_days_array
+ days[0][:milestones] << @future_milestone1
+ days[12][:milestones] << @future_milestone3
+ days[13][:milestones] << @future_milestone4
+ assert_equal days, assigns(:days)
+ assert_equal 'Upcoming Milestones (all projects):',
+ assigns(:calendar_title)
+ assert_tag :tag => "li", :content =>"Project One: Milestone Seven"
+ assert_tag :tag => "li", :content =>"Project Two: Milestone Eight"
+ end
+
+ def test_milestones_calendar_one_project
+ get :milestones_calendar, 'project_id' => 1
+ assert_response :success
+ assert_template '_milestones_calendar'
+ days = empty_milestones_days_array
+ days[0][:milestones] << @future_milestone1
+ days[12][:milestones] << @future_milestone3
+ assert_equal days, assigns(:days)
+ assert_equal 'Upcoming Milestones:', assigns(:calendar_title)
+ assert_no_tag :tag => "li", :content =>"Project One: Milestone Seven"
+ assert_tag :tag => "li", :content =>"Milestone Seven"
+ end
+
+ def test_list_future
+ process :list, :project_id => @project_one.id, :include => 'future'
+ assert_response :success
+ assert_template '_list'
+ assert_equal [ @future_milestone1, @future_milestone3, @future_milestone2 ],
+ assigns(:milestones)
+ end
+
+ def test_list_recent
+ process :list, :project_id => @project_one.id, :include => 'recent'
+ assert_response :success
+ assert_template '_list'
+ assert_equal [ @recent_milestone2, @recent_milestone1 ],
+ assigns(:milestones)
+ end
+
+ def test_list_all_past
+ process :list, :project_id => @project_one.id, :include => 'all_past'
+ assert_response :success
+ assert_template '_list'
+ assert_equal [ @recent_milestone2, @recent_milestone1, @past_milestone2,
+ @past_milestone1 ], assigns(:milestones)
+ end
+
+ def test_list_nothing_to_show
+ @project_one.milestones.clear
+ [ 'future', 'recent', 'all_past' ].each do |type|
+ process :list, :project_id => @project_one.id, :include => type
+ assert_response :success
+ assert_equal '
Nothing to show.
', @response.body
+ end
+ end
+
+ private
+
+ def empty_milestones_days_array
+ days = []
+ 14.times do |i|
+ current_day = Date.today + i
+ days << {
+ :date => current_day,
+ :name => Date::DAYNAMES[current_day.wday],
+ :milestones => []
+ }
+ end
+ return days
+ end
+end
+
+
Modified: trunk/test/functional/projects_controller_test.rb
===================================================================
--- trunk/test/functional/projects_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/projects_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'projects_controller'
Modified: trunk/test/functional/session_controller_test.rb
===================================================================
--- trunk/test/functional/session_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/session_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'session_controller'
Modified: trunk/test/functional/stories_controller_test.rb
===================================================================
--- trunk/test/functional/stories_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/stories_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'stories_controller'
Modified: trunk/test/functional/users_controller_test.rb
===================================================================
--- trunk/test/functional/users_controller_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/functional/users_controller_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'users_controller'
Modified: trunk/test/unit/array_each_slice_test.rb
===================================================================
--- trunk/test/unit/array_each_slice_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/array_each_slice_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'array_each_slice'
class ArrayEachSliceTest < Test::Unit::TestCase
Modified: trunk/test/unit/collection_table_helper_test.rb
===================================================================
--- trunk/test/unit/collection_table_helper_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/collection_table_helper_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
require 'collection_table_helper'
Modified: trunk/test/unit/iteration_test.rb
===================================================================
--- trunk/test/unit/iteration_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/iteration_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
class IterationTest < Test::Unit::TestCase
Modified: trunk/test/unit/milestone_test.rb
===================================================================
--- trunk/test/unit/milestone_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/milestone_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
class MilestoneTest < Test::Unit::TestCase
Modified: trunk/test/unit/project_test.rb
===================================================================
--- trunk/test/unit/project_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/project_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
class ProjectTest < Test::Unit::TestCase
Modified: trunk/test/unit/story_test.rb
===================================================================
--- trunk/test/unit/story_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/story_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
class StoryTest < Test::Unit::TestCase
Modified: trunk/test/unit/user_test.rb
===================================================================
--- trunk/test/unit/user_test.rb 2006-02-25 05:02:36 UTC (rev 193)
+++ trunk/test/unit/user_test.rb 2006-02-25 23:04:10 UTC (rev 194)
@@ -1,3 +1,23 @@
+##############################################################################
+# eXPlain Project Management Tool
+# Copyright (C) 2005 John Wilger
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+
require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
From svn at explainpmt.com Mon Feb 27 11:25:29 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Mon, 27 Feb 2006 16:25:29 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [195] New iteration form now
opens in main window.
Message-ID: <20060227162529.71DC9C98F5@thurlow.textdrive.com>
Revision: 195
Author: jwilger
Date: 2006-02-27 16:25:26 +0000 (Mon, 27 Feb 2006)
Log Message:
-----------
New iteration form now opens in main window. SC11
Modified Paths:
--------------
trunk/app/controllers/iterations_controller.rb
trunk/app/views/iterations/_iteration_form.rhtml
trunk/app/views/iterations/index.rhtml
trunk/app/views/iterations/show.rhtml
trunk/test/functional/iterations_controller_test.rb
Modified: trunk/app/controllers/iterations_controller.rb
===================================================================
--- trunk/app/controllers/iterations_controller.rb 2006-02-25 23:04:10 UTC (rev 194)
+++ trunk/app/controllers/iterations_controller.rb 2006-02-27 16:25:26 UTC (rev 195)
@@ -20,7 +20,7 @@
class IterationsController < ApplicationController
before_filter :require_current_project
- popups :new, :create, :edit, :update, :select_stories, :assign_stories
+ popups :edit, :update, :select_stories, :assign_stories
# If the project has no iterations, displays a page with a message to that
# effect. Otherwise, tries to find either (in order of preference) a current
@@ -61,7 +61,8 @@
flash[:status] = "A new, #{iteration.length}-day iteration starting " +
"on #{iteration.start_date.strftime('%m/%d/%Y')} has " +
"been created."
- render 'layouts/refresh_parent_close_popup'
+ redirect_to :controller => 'iterations', :action => 'show',
+ :project_id => @project.id, :id => iteration.id
else
session[:new_iteration] = iteration
redirect_to :controller => 'iterations', :action => 'new',
Modified: trunk/app/views/iterations/_iteration_form.rhtml
===================================================================
--- trunk/app/views/iterations/_iteration_form.rhtml 2006-02-25 23:04:10 UTC (rev 194)
+++ trunk/app/views/iterations/_iteration_form.rhtml 2006-02-27 16:25:26 UTC (rev 195)
@@ -24,7 +24,7 @@
-Cancel
+<%= link_to 'Cancel', :controller => 'iterations', :action => 'index', :project_id => @project.id %>
Modified: trunk/app/views/iterations/index.rhtml
===================================================================
--- trunk/app/views/iterations/index.rhtml 2006-02-25 23:04:10 UTC (rev 194)
+++ trunk/app/views/iterations/index.rhtml 2006-02-27 16:25:26 UTC (rev 195)
@@ -1,8 +1,5 @@
+
\ No newline at end of file
Modified: trunk/app/views/iterations/show.rhtml
===================================================================
--- trunk/app/views/iterations/show.rhtml 2006-02-25 23:04:10 UTC (rev 194)
+++ trunk/app/views/iterations/show.rhtml 2006-02-27 16:25:26 UTC (rev 195)
@@ -4,10 +4,8 @@
(
-<%= popup_link('Edit', 'edit_iteration',
- 'width=400,height=200,scrollbars,resizable',
- :controller => 'iterations', :action => 'edit',
- :id => @iteration.id, :project_id => @project.id) %>
+<%= link_to 'Edit', :controller => 'iterations', :action => 'edit',
+ :id => @iteration, :project_id => @project %>
)
(
<%= link_to('Delete',
Modified: trunk/test/functional/iterations_controller_test.rb
===================================================================
--- trunk/test/functional/iterations_controller_test.rb 2006-02-27 16:25:26 UTC (rev 195)
+++ trunk/test/functional/iterations_controller_test.rb 2006-02-28 15:33:18 UTC (rev 196)
@@ -161,8 +161,9 @@
def test_update
post :update, 'id' => 1, 'project_id' => 1,
'iteration' => { 'length' => '10' }
- assert_response :success
- assert_template 'layouts/refresh_parent_close_popup'
+ assert_response :redirect
+ assert_redirected_to :controller => 'iterations', :action => 'show',
+ :project_id => 1, :id => 1
assert flash[ :status ]
end
From svn at explainpmt.com Tue Feb 28 11:30:24 2006
From: svn at explainpmt.com (svn@explainpmt.com)
Date: Tue, 28 Feb 2006 16:30:24 +0000 (GMT)
Subject: [eXPlainPMT Developers] [SVN commit] [197] Changed the
StoriesController#new form to accept a list of new story card
titles that will each be created as a story on
Message-ID: <20060228163024.64D3DC9907@thurlow.textdrive.com>
Revision: 197
Author: jwilger
Date: 2006-02-28 16:30:22 +0000 (Tue, 28 Feb 2006)
Log Message:
-----------
Changed the StoriesController#new form to accept a list of new story card titles that will each be created as a story on submission. The StoriesController#create action now creates a new story card for each of the titles entered and redirects to the #list_new action (#list_new does not exist yet). Partially completes SC7.
Modified Paths:
--------------
trunk/app/controllers/stories_controller.rb
trunk/app/views/stories/index.rhtml
trunk/app/views/stories/new.rhtml
trunk/test/functional/stories_controller_test.rb
Modified: trunk/app/controllers/stories_controller.rb
===================================================================
--- trunk/app/controllers/stories_controller.rb 2006-02-28 15:33:18 UTC (rev 196)
+++ trunk/app/controllers/stories_controller.rb 2006-02-28 16:30:22 UTC (rev 197)
@@ -41,35 +41,24 @@
end
end
- # Displays a form for creating a new story card.
+ # Displays a form for creating new story cards.
def new
- @page_title = "Create new story card"
+ @page_title = "Create new story cards"
@selected_main_menu_link = :none
- if @story = session[:new_story]
- session[:new_story] = nil
- else
- @story = Story.new
- end
- @story.return_ids_for_aggregations
end
- # Creates a new story card based on the information posted form the #new
+ # Creates new story cards based on the story titles posted form the #new
# action.
def create
- @page_title = "Create new story card"
- @selected_main_menu_link = :none
- modify_risk_status_and_priority_params
- story = Story.new(params['story'])
- story.project = @project
- if story.valid?
- story.save
- flash[:status] = 'The new story card has been saved.'
- redirect_to :controller => 'stories', :action => 'index',
- :project_id => @project.id
+ if params[:story_card_titles].empty?
+ flash[:error] = 'Please enter at least one story card title.'
+ redirect_to :controller => 'stories', :action => 'new', :project_id => @project
else
- session[:new_story] = story
- redirect_to :controller => 'stories', :action => 'new',
- :project_id => @project.id
+ session[:new_story_ids] = []
+ params[:story_card_titles].each_line do |title|
+ session[:new_story_ids] << @project.stories.create(:title => title).id
+ end
+ redirect_to :controller => 'stories', :action => 'list_new', :project_id => @project
end
end
Modified: trunk/app/views/stories/index.rhtml
===================================================================
--- trunk/app/views/stories/index.rhtml 2006-02-28 15:33:18 UTC (rev 196)
+++ trunk/app/views/stories/index.rhtml 2006-02-28 16:30:22 UTC (rev 197)
@@ -1,5 +1,5 @@