backlog 0.10.8 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +14 -0
- data/app/controllers/backlogs_controller.rb +2 -0
- data/app/controllers/work_accounts_controller.rb +51 -0
- data/app/controllers/works_controller.rb +72 -29
- data/app/helpers/application_helper.rb +1 -2
- data/app/helpers/work_accounts_helper.rb +2 -0
- data/app/models/backlog.rb +10 -3
- data/app/models/configuration.rb +2 -0
- data/app/models/customer.rb +2 -0
- data/app/models/task.rb +26 -5
- data/app/models/work.rb +18 -13
- data/app/models/work_account.rb +12 -0
- data/app/views/backlogs/_form.rhtml +5 -4
- data/app/views/layouts/_left_top.rhtml +1 -8
- data/app/views/layouts/_notice.rhtml +15 -0
- data/app/views/layouts/wide.rhtml +4 -10
- data/app/views/tasks/_fields_header.rhtml +1 -1
- data/app/views/work_accounts/_form.rhtml +10 -0
- data/app/views/work_accounts/_name_list.rhtml +5 -0
- data/app/views/work_accounts/edit.rhtml +9 -0
- data/app/views/work_accounts/list.rhtml +27 -0
- data/app/views/work_accounts/new.rhtml +8 -0
- data/app/views/work_accounts/show.rhtml +8 -0
- data/app/views/works/_description_list.rhtml +5 -0
- data/app/views/works/_form.rhtml +8 -2
- data/app/views/works/_row.rhtml +32 -0
- data/app/views/works/_row_field.rhtml +3 -0
- data/app/views/works/daily_work_sheet.rhtml +35 -59
- data/app/views/works/edit.rhtml +1 -1
- data/app/views/works/list.rhtml +1 -1
- data/app/views/works/timeliste.rhtml +3 -3
- data/app/views/works/update_row.rjs +6 -0
- data/app/views/works/weekly_work_sheet.rhtml +5 -5
- data/bin/backlog +4 -1
- data/bin/backlog_init.d +13 -0
- data/config/database.yml +0 -4
- data/config/environment.rb +1 -1
- data/db/backup/backlogs.yml +118 -0
- data/db/backup/estimates.yml +7371 -0
- data/db/backup/groups.yml +37 -0
- data/db/backup/parties.yml +2 -0
- data/db/backup/periods.yml +386 -0
- data/db/backup/task_files.yml +2 -0
- data/db/backup/tasks.yml +15770 -0
- data/db/backup/users.yml +209 -0
- data/db/backup/works.yml +6203 -0
- data/db/migrate/018_create_groups.rb +0 -1
- data/db/migrate/021_create_work_accounts.rb +113 -0
- data/db/schema.rb +35 -10
- data/lang/en.yaml +3 -0
- data/lang/no.yaml +3 -0
- data/lib/change_column_null_migration_fix.rb +13 -0
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +1 -0
- data/nbproject/private/private.xml +4 -0
- data/nbproject/private/rake-t.txt +95 -0
- data/nbproject/project.properties +4 -0
- data/nbproject/project.xml +9 -0
- data/public/Frav/303/246rsskjema.xls +0 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/test/fixtures/backlogs.yml +2 -0
- data/test/fixtures/configurations.yml +5 -0
- data/test/fixtures/customers.yml +7 -0
- data/test/fixtures/tasks.yml +1 -0
- data/test/fixtures/users.yml +3 -5
- data/test/fixtures/work_accounts.yml +7 -0
- data/test/fixtures/works.yml +11 -0
- data/test/functional/backlogs_controller_test.rb +1 -1
- data/test/functional/work_accounts_controller_test.rb +93 -0
- data/test/functional/works_controller_test.rb +6 -2
- data/test/integration/user_system_test.rb +1 -1
- data/test/performance/test.rb +4 -1
- data/test/unit/configuration_test.rb +10 -0
- data/test/unit/customer_test.rb +10 -0
- data/test/unit/estimate_test.rb +1 -1
- data/test/unit/group_test.rb +1 -1
- data/test/unit/period_test.rb +1 -1
- data/test/unit/task_file_test.rb +1 -1
- data/test/unit/task_test.rb +1 -1
- data/test/unit/work_account_test.rb +10 -0
- data/test/unit/work_test.rb +1 -1
- data/vendor/plugins/goldspike/lib/java_library.rb +5 -11
- data/vendor/plugins/goldspike/lib/run.rb +1 -2
- data/vendor/plugins/goldspike/lib/war_config.rb +7 -10
- metadata +50 -3
- data/app/views/tasks/_description_list.rhtml +0 -5
data/test/fixtures/backlogs.yml
CHANGED
data/test/fixtures/tasks.yml
CHANGED
data/test/fixtures/users.yml
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
-
|
3
1
|
tesla:
|
4
2
|
party_id: 1000001
|
5
3
|
login: tesla
|
@@ -8,7 +6,7 @@ tesla:
|
|
8
6
|
email: tesla@example.com
|
9
7
|
verified: true
|
10
8
|
security_token: random_token_string
|
11
|
-
token_expiry: <%= (Clock.now - 1.day) %> # expired
|
9
|
+
token_expiry: <%= (Clock.now - 1.day).strftime("%Y-%m-%d %H:%M:%S") %> # expired
|
12
10
|
deleted: false
|
13
11
|
|
14
12
|
long_user:
|
@@ -46,7 +44,7 @@ unverified_user:
|
|
46
44
|
email: unverified_user@example.com
|
47
45
|
verified: false
|
48
46
|
security_token: random_token_string
|
49
|
-
token_expiry: <%= (Clock.now + User.token_lifetime) %> # for mysql, add .strftime("%y-%m-%d %H:%M:%S")
|
47
|
+
token_expiry: <%= (Clock.now + User.token_lifetime).strftime("%Y-%m-%d %H:%M:%S") %> # for mysql, add .strftime("%y-%m-%d %H:%M:%S")
|
50
48
|
deleted: false
|
51
49
|
|
52
50
|
no_password_user:
|
@@ -57,5 +55,5 @@ no_password_user:
|
|
57
55
|
email: no_password_user@example.com
|
58
56
|
verified: true
|
59
57
|
security_token: random_token_string
|
60
|
-
token_expiry: <%= (Clock.now + 1.day) %> # for mysql, add .strftime("%y-%m-%d %H:%M:%S")
|
58
|
+
token_expiry: <%= (Clock.now + 1.day).strftime("%Y-%m-%d %H:%M:%S") %> # for mysql, add .strftime("%y-%m-%d %H:%M:%S")
|
61
59
|
deleted: false
|
data/test/fixtures/works.yml
CHANGED
@@ -5,10 +5,12 @@ first:
|
|
5
5
|
started_at: 2007-06-12T13:35:00
|
6
6
|
completed_at: 2007-06-12T14:35:00
|
7
7
|
hours: 40.0
|
8
|
+
work_account_id: 1
|
8
9
|
started:
|
9
10
|
id: 2
|
10
11
|
task_id: 4
|
11
12
|
started_at: 2007-06-12T13:35:00
|
13
|
+
work_account_id: 1
|
12
14
|
personal:
|
13
15
|
id: 3
|
14
16
|
task_id: 1
|
@@ -16,8 +18,17 @@ personal:
|
|
16
18
|
completed_at: 2007-06-12T14:35:00
|
17
19
|
user_id: 1000001
|
18
20
|
hours: 40.0
|
21
|
+
work_account_id: 1
|
19
22
|
brother_of_started:
|
20
23
|
id: 5
|
21
24
|
task_id: 4
|
22
25
|
started_at: 2007-06-12T13:35:00
|
23
26
|
completed_at: 2007-06-12T14:35:00
|
27
|
+
work_account_id: 1
|
28
|
+
without_task:
|
29
|
+
id: 6
|
30
|
+
work_account_id: 1
|
31
|
+
started_at: 2007-06-13T13:35:00
|
32
|
+
completed_at: 2007-06-13T14:35:00
|
33
|
+
hours: 8.0
|
34
|
+
user_id: 1000001
|
@@ -5,7 +5,7 @@ require 'backlogs_controller'
|
|
5
5
|
class BacklogsController; def rescue_action(e) raise e end; end
|
6
6
|
|
7
7
|
class BacklogsControllerTest < Test::Unit::TestCase
|
8
|
-
fixtures :parties, :users, :groups, :groups_users, :backlogs, :periods, :tasks, :task_files, :works, :estimates
|
8
|
+
fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :task_files, :works, :estimates
|
9
9
|
|
10
10
|
def setup
|
11
11
|
@user_controller = UserController.new
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'work_accounts_controller'
|
3
|
+
|
4
|
+
# Re-raise errors caught by the controller.
|
5
|
+
class WorkAccountsController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class WorkAccountsControllerTest < Test::Unit::TestCase
|
8
|
+
fixtures :work_accounts, :backlogs, :tasks, :estimates, :works, :task_files
|
9
|
+
|
10
|
+
def setup
|
11
|
+
@controller = WorkAccountsController.new
|
12
|
+
@request = ActionController::TestRequest.new
|
13
|
+
@response = ActionController::TestResponse.new
|
14
|
+
@request.session[:user_id] = 1000001
|
15
|
+
|
16
|
+
@first_id = work_accounts(:one).id
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_index
|
20
|
+
get :index
|
21
|
+
assert_response :success
|
22
|
+
assert_template 'list'
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_list
|
26
|
+
get :list
|
27
|
+
|
28
|
+
assert_response :success
|
29
|
+
assert_template 'list'
|
30
|
+
|
31
|
+
assert_not_nil assigns(:work_accounts)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_show
|
35
|
+
get :show, :id => @first_id
|
36
|
+
|
37
|
+
assert_response :success
|
38
|
+
assert_template 'show'
|
39
|
+
|
40
|
+
assert_not_nil assigns(:work_account)
|
41
|
+
assert assigns(:work_account).valid?
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_new
|
45
|
+
get :new
|
46
|
+
|
47
|
+
assert_response :success
|
48
|
+
assert_template 'new'
|
49
|
+
|
50
|
+
assert_not_nil assigns(:work_account)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_create
|
54
|
+
num_work_accounts = WorkAccount.count
|
55
|
+
|
56
|
+
post :create, :work_account => {:name => 'TimeKeeper'}
|
57
|
+
|
58
|
+
assert_response :redirect
|
59
|
+
assert_redirected_to :action => 'list'
|
60
|
+
|
61
|
+
assert_equal num_work_accounts + 1, WorkAccount.count
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_edit
|
65
|
+
get :edit, :id => @first_id
|
66
|
+
|
67
|
+
assert_response :success
|
68
|
+
assert_template 'edit'
|
69
|
+
|
70
|
+
assert_not_nil assigns(:work_account)
|
71
|
+
assert assigns(:work_account).valid?
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_update
|
75
|
+
post :update, :id => @first_id
|
76
|
+
assert_response :redirect
|
77
|
+
assert_redirected_to :action => 'show', :id => @first_id
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_destroy
|
81
|
+
assert_nothing_raised {
|
82
|
+
WorkAccount.find(@first_id)
|
83
|
+
}
|
84
|
+
|
85
|
+
post :destroy, :id => @first_id
|
86
|
+
assert_response :redirect
|
87
|
+
assert_redirected_to :action => 'list'
|
88
|
+
|
89
|
+
assert_raise(ActiveRecord::RecordNotFound) {
|
90
|
+
WorkAccount.find(@first_id)
|
91
|
+
}
|
92
|
+
end
|
93
|
+
end
|
@@ -5,7 +5,7 @@ require 'works_controller'
|
|
5
5
|
class WorksController; def rescue_action(e) raise e end; end
|
6
6
|
|
7
7
|
class WorksControllerTest < Test::Unit::TestCase
|
8
|
-
fixtures :parties, :users, :groups, :groups_users, :backlogs, :periods, :tasks, :task_files, :works, :estimates
|
8
|
+
fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :task_files, :works, :estimates
|
9
9
|
|
10
10
|
def setup
|
11
11
|
@controller = WorksController.new
|
@@ -56,7 +56,7 @@ class WorksControllerTest < Test::Unit::TestCase
|
|
56
56
|
def test_create
|
57
57
|
num_works = Work.count
|
58
58
|
|
59
|
-
post :create, :work => {:task_id => 1, :started_at => Time.now.iso8601}
|
59
|
+
post :create, :work => {:task_id => 1, :started_at => Time.now.iso8601, :work_account_id => '1'}
|
60
60
|
|
61
61
|
assert_response :redirect
|
62
62
|
assert_redirected_to :controller => 'periods', :action => 'show', :id => periods(:past).id, :task_id => 1
|
@@ -106,5 +106,9 @@ class WorksControllerTest < Test::Unit::TestCase
|
|
106
106
|
assert_equal num_tasks, Task.count
|
107
107
|
assert_equal num_open_tasks - 1, Task.find_open.size
|
108
108
|
end
|
109
|
+
|
110
|
+
def test_weekly_work_sheet
|
111
|
+
get :weekly_work_sheet, :id => 24
|
112
|
+
end
|
109
113
|
|
110
114
|
end
|
@@ -4,7 +4,7 @@ require 'user_notify'
|
|
4
4
|
|
5
5
|
class UserSystemTest < ActionController::IntegrationTest
|
6
6
|
self.use_transactional_fixtures = false
|
7
|
-
fixtures :users, :groups_users, :works
|
7
|
+
fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :estimates, :works, :task_files
|
8
8
|
|
9
9
|
def setup
|
10
10
|
ActionMailer::Base.inject_one_error = false
|
data/test/performance/test.rb
CHANGED
data/test/unit/estimate_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../test_helper'
|
2
2
|
|
3
3
|
class EstimateTest < Test::Unit::TestCase
|
4
|
-
fixtures :parties, :users, :groups, :groups_users, :backlogs, :periods, :tasks, :task_files, :works, :estimates
|
4
|
+
fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :task_files, :works, :estimates
|
5
5
|
|
6
6
|
# Replace this with your real tests.
|
7
7
|
def test_truth
|
data/test/unit/group_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../test_helper'
|
2
2
|
|
3
3
|
class GroupTest < Test::Unit::TestCase
|
4
|
-
fixtures :groups, :groups_users
|
4
|
+
fixtures :parties, :users, :groups, :groups_users, :periods, :tasks, :works, :periods, :estimates, :task_files
|
5
5
|
|
6
6
|
# Replace this with your real tests.
|
7
7
|
def test_truth
|
data/test/unit/period_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../test_helper'
|
2
2
|
|
3
3
|
class PeriodTest < Test::Unit::TestCase
|
4
|
-
fixtures :periods, :tasks, :task_files, :estimates, :works
|
4
|
+
fixtures :parties, :users, :groups, :groups_users, :periods, :tasks, :task_files, :estimates, :works
|
5
5
|
|
6
6
|
def test_burn_down_graph
|
7
7
|
image = periods(:past).burn_down_graph(Chart::THUMBNAIL)
|
data/test/unit/task_file_test.rb
CHANGED
data/test/unit/task_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../test_helper'
|
2
2
|
|
3
3
|
class TaskTest < Test::Unit::TestCase
|
4
|
-
fixtures :parties, :users, :groups, :groups_users, :backlogs, :periods, :tasks, :task_files, :estimates, :works
|
4
|
+
fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :task_files, :estimates, :works
|
5
5
|
|
6
6
|
# Replace this with your real tests.
|
7
7
|
def test_truth
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class WorkAccountTest < Test::Unit::TestCase
|
4
|
+
fixtures :work_accounts, :backlogs, :tasks, :estimates, :works, :task_files
|
5
|
+
|
6
|
+
# Replace this with your real tests.
|
7
|
+
def test_truth
|
8
|
+
assert true
|
9
|
+
end
|
10
|
+
end
|
data/test/unit/work_test.rb
CHANGED
@@ -4,7 +4,7 @@ require 'user_system'
|
|
4
4
|
class WorkTest < Test::Unit::TestCase
|
5
5
|
include UserSystem
|
6
6
|
|
7
|
-
fixtures :users, :groups_users, :works
|
7
|
+
fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :estimates, :works, :task_files
|
8
8
|
|
9
9
|
def test_work_totals_for_week
|
10
10
|
work_totals = Work.work_totals_for_week(24, 1000001)
|
@@ -15,13 +15,7 @@ module War
|
|
15
15
|
@config = config
|
16
16
|
@name = name
|
17
17
|
@version = version
|
18
|
-
|
19
|
-
|
20
|
-
if locations.is_a?(String)
|
21
|
-
locations = [ locations ]
|
22
|
-
end
|
23
|
-
check_locations += locations
|
24
|
-
@locations = check_locations
|
18
|
+
@locations = local_locations(name, version)
|
25
19
|
end
|
26
20
|
|
27
21
|
def file
|
@@ -91,12 +85,12 @@ module War
|
|
91
85
|
WLog.debug("locations for " + name + " " + version);
|
92
86
|
paths = []
|
93
87
|
if config.local_java_lib
|
94
|
-
paths << File.join(local_java_lib, "#{name}-#{version}.#{type}")
|
95
|
-
paths << File.join(local_java_lib, "#{name}.#{type}")
|
88
|
+
paths << File.join(config.local_java_lib, "#{name}-#{version}.#{type}")
|
89
|
+
paths << File.join(config.local_java_lib, "#{name}.#{type}")
|
96
90
|
end
|
97
91
|
if config.jruby_home
|
98
|
-
paths << File.join(jruby_home, 'lib', "#{name}-#{version}.#{type}")
|
99
|
-
paths << File.join(jruby_home, 'lib', "#{name}.#{type}")
|
92
|
+
paths << File.join(config.jruby_home, 'lib', "#{name}-#{version}.#{type}")
|
93
|
+
paths << File.join(config.jruby_home, 'lib', "#{name}.#{type}")
|
100
94
|
end
|
101
95
|
WLog.debug("paths: " + paths.join("\n"))
|
102
96
|
return paths
|
@@ -12,7 +12,6 @@ module War
|
|
12
12
|
attr_accessor :classpath
|
13
13
|
|
14
14
|
def initialize(config = Configuration.instance)
|
15
|
-
puts config.jetty_java_opts
|
16
15
|
@config = config
|
17
16
|
@jetty_main = 'org.mortbay.start.Main'
|
18
17
|
@jetty_tmp = File.join('tmp', 'jetty')
|
@@ -158,4 +157,4 @@ END_OF_JETTY_XML
|
|
158
157
|
end
|
159
158
|
|
160
159
|
end #class
|
161
|
-
end #module
|
160
|
+
end #module
|
@@ -96,7 +96,7 @@ module War
|
|
96
96
|
add_library(maven_library('org.jruby.extras', 'goldspike', '1.3'))
|
97
97
|
add_library(maven_library('javax.activation', 'activation', '1.1'))
|
98
98
|
add_library(maven_library('commons-pool', 'commons-pool', '1.3'))
|
99
|
-
|
99
|
+
add_library(maven_library('bouncycastle', 'bcprov-jdk14', '124'))
|
100
100
|
|
101
101
|
# default gems
|
102
102
|
@gem_libraries = {}
|
@@ -115,8 +115,7 @@ module War
|
|
115
115
|
# default jetty settings
|
116
116
|
@jetty_port = 8080
|
117
117
|
@jetty_java_opts = ENV['JAVA_OPTS'] || ''
|
118
|
-
|
119
|
-
puts @jetty_java_opts
|
118
|
+
|
120
119
|
# separators
|
121
120
|
if RUBY_PLATFORM =~ /(mswin)|(cygwin)/i # watch out for darwin
|
122
121
|
@os_separator = '\\'
|
@@ -280,15 +279,12 @@ puts @jetty_java_opts
|
|
280
279
|
end
|
281
280
|
|
282
281
|
# method hook for library property
|
283
|
-
def include_library(name,
|
284
|
-
if properties == nil or properties[:version] == nil or properties[:locations] == nil
|
285
|
-
WLog.warn "in include_library #{name}, 'version' and 'locations' specifications are mandatory"
|
286
|
-
return
|
287
|
-
end
|
282
|
+
def include_library(name, version)
|
288
283
|
begin
|
289
|
-
@result.
|
284
|
+
@result.add_library(@result.java_library(name, version))
|
290
285
|
rescue
|
291
|
-
WLog.warn "couldn't load library #{name}, check library definition in the config file"
|
286
|
+
WLog.warn "couldn't load library #{name}-#{version}.jar, check library definition in the config file"
|
287
|
+
WLog.debug $!
|
292
288
|
end
|
293
289
|
end
|
294
290
|
|
@@ -298,6 +294,7 @@ puts @jetty_java_opts
|
|
298
294
|
@result.add_library(@result.maven_library(group, name, version))
|
299
295
|
rescue
|
300
296
|
WLog.warn "couldn't load maven library #{name}, check library definition in the config file"
|
297
|
+
WLog.debug $!
|
301
298
|
end
|
302
299
|
end
|
303
300
|
|