taskjuggler 3.6.0 → 3.7.2

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.
Files changed (434) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG +69 -0
  3. data/Rakefile +4 -1
  4. data/data/css/tjreport.css +4 -0
  5. data/data/tjp.vim +9 -3
  6. data/examples/ProjectTemplate/template.tjp +10 -10
  7. data/examples/Tutorial/tutorial.tjp +4 -4
  8. data/lib/taskjuggler/Allocation.rb +1 -1
  9. data/lib/taskjuggler/AppConfig.rb +1 -1
  10. data/lib/taskjuggler/AttributeBase.rb +10 -4
  11. data/lib/taskjuggler/Attributes.rb +2 -2
  12. data/lib/taskjuggler/BatchProcessor.rb +69 -58
  13. data/lib/taskjuggler/FileList.rb +1 -1
  14. data/lib/taskjuggler/Interval.rb +10 -12
  15. data/lib/taskjuggler/Journal.rb +2 -2
  16. data/lib/taskjuggler/LogicalFunction.rb +1 -1
  17. data/lib/taskjuggler/LogicalOperation.rb +7 -4
  18. data/lib/taskjuggler/MessageHandler.rb +1 -2
  19. data/lib/taskjuggler/PTNProxy.rb +1 -1
  20. data/lib/taskjuggler/Project.rb +27 -22
  21. data/lib/taskjuggler/PropertyList.rb +7 -1
  22. data/lib/taskjuggler/PropertySet.rb +1 -1
  23. data/lib/taskjuggler/PropertyTreeNode.rb +5 -3
  24. data/lib/taskjuggler/Query.rb +3 -3
  25. data/lib/taskjuggler/RealFormat.rb +1 -1
  26. data/lib/taskjuggler/Resource.rb +2 -2
  27. data/lib/taskjuggler/ResourceScenario.rb +66 -6
  28. data/lib/taskjuggler/RichText/Snip.rb +1 -1
  29. data/lib/taskjuggler/RuntimeConfig.rb +2 -2
  30. data/lib/taskjuggler/Scoreboard.rb +5 -2
  31. data/lib/taskjuggler/SheetHandlerBase.rb +5 -4
  32. data/lib/taskjuggler/Shift.rb +2 -2
  33. data/lib/taskjuggler/ShiftAssignments.rb +1 -1
  34. data/lib/taskjuggler/StatusSheetReceiver.rb +2 -2
  35. data/lib/taskjuggler/StatusSheetSender.rb +1 -1
  36. data/lib/taskjuggler/TaskJuggler.rb +4 -4
  37. data/lib/taskjuggler/TaskScenario.rb +7 -2
  38. data/lib/taskjuggler/TextParser/Scanner.rb +4 -4
  39. data/lib/taskjuggler/TextParser.rb +1 -1
  40. data/lib/taskjuggler/TimeSheetReceiver.rb +2 -2
  41. data/lib/taskjuggler/TimeSheetSender.rb +1 -1
  42. data/lib/taskjuggler/TimeSheets.rb +5 -4
  43. data/lib/taskjuggler/Tj3AppBase.rb +23 -9
  44. data/lib/taskjuggler/Tj3Config.rb +5 -3
  45. data/lib/taskjuggler/TjpExample.rb +3 -1
  46. data/lib/taskjuggler/TjpSyntaxRules.rb +166 -133
  47. data/lib/taskjuggler/UTF8String.rb +3 -3
  48. data/lib/taskjuggler/WorkingHours.rb +3 -3
  49. data/lib/taskjuggler/XMLDocument.rb +1 -1
  50. data/lib/taskjuggler/XMLElement.rb +12 -1
  51. data/lib/taskjuggler/apps/Tj3.rb +3 -1
  52. data/lib/taskjuggler/apps/Tj3Client.rb +3 -2
  53. data/lib/taskjuggler/apps/Tj3Daemon.rb +5 -3
  54. data/lib/taskjuggler/apps/Tj3Man.rb +4 -2
  55. data/lib/taskjuggler/apps/Tj3SsReceiver.rb +3 -1
  56. data/lib/taskjuggler/apps/Tj3SsSender.rb +3 -1
  57. data/lib/taskjuggler/apps/Tj3TsReceiver.rb +3 -1
  58. data/lib/taskjuggler/apps/Tj3TsSender.rb +3 -1
  59. data/lib/taskjuggler/apps/Tj3TsSummary.rb +3 -1
  60. data/lib/taskjuggler/apps/Tj3WebD.rb +4 -2
  61. data/lib/taskjuggler/daemon/ProjectServer.rb +2 -2
  62. data/lib/taskjuggler/deep_copy.rb +1 -1
  63. data/lib/taskjuggler/reports/CSVFile.rb +4 -4
  64. data/lib/taskjuggler/reports/ChartPlotter.rb +1 -1
  65. data/lib/taskjuggler/reports/GanttChart.rb +8 -2
  66. data/lib/taskjuggler/reports/GanttHeader.rb +11 -1
  67. data/lib/taskjuggler/reports/GanttLine.rb +6 -0
  68. data/lib/taskjuggler/reports/ICalReport.rb +1 -1
  69. data/lib/taskjuggler/reports/MspXmlRE.rb +5 -3
  70. data/lib/taskjuggler/reports/Report.rb +6 -6
  71. data/lib/taskjuggler/reports/ReportTableCell.rb +1 -1
  72. data/lib/taskjuggler/reports/TableReport.rb +7 -12
  73. data/lib/taskjuggler/reports/TjpExportRE.rb +1 -5
  74. data/lib/taskjuggler/reports/TraceReport.rb +2 -2
  75. data/lib/taskjuggler/version.rb +1 -0
  76. data/man/tj3.1 +130 -0
  77. data/man/tj3client.1 +145 -0
  78. data/man/tj3d.1 +93 -0
  79. data/man/tj3man.1 +76 -0
  80. data/man/tj3ss_receiver.1 +86 -0
  81. data/man/tj3ss_sender.1 +100 -0
  82. data/man/tj3ts_receiver.1 +86 -0
  83. data/man/tj3ts_sender.1 +92 -0
  84. data/man/tj3ts_summary.1 +104 -0
  85. data/man/tj3webd.1 +86 -0
  86. data/manual/Day_To_Day_Juggling +8 -8
  87. data/manual/Installation +6 -6
  88. data/manual/List_Attributes +1 -1
  89. data/manual/Rich_Text_Attributes +6 -5
  90. data/manual/Software +6 -6
  91. data/manual/TaskJuggler_Internals +4 -4
  92. data/manual/The_TaskJuggler_Syntax +5 -5
  93. data/manual/Tutorial +13 -11
  94. data/manual/html/Day_To_Day_Juggling.html +9 -9
  95. data/manual/html/Getting_Started.html +2 -2
  96. data/manual/html/How_To_Contribute.html +2 -2
  97. data/manual/html/Installation.html +8 -8
  98. data/manual/html/Intro.html +2 -2
  99. data/manual/html/List_Attributes.html +3 -3
  100. data/manual/html/Reporting_Bugs.html +2 -2
  101. data/manual/html/Rich_Text_Attributes.html +5 -5
  102. data/manual/html/Software.html +7 -7
  103. data/manual/html/TaskJuggler_2x_Migration.html +2 -2
  104. data/manual/html/TaskJuggler_Internals.html +6 -6
  105. data/manual/html/The_TaskJuggler_Syntax.html +6 -6
  106. data/manual/html/Tutorial.html +17 -14
  107. data/manual/html/account.html +3 -3
  108. data/manual/html/account.task.html +2 -2
  109. data/manual/html/accountprefix.html +2 -2
  110. data/manual/html/accountreport.html +3 -3
  111. data/manual/html/accountroot.html +2 -2
  112. data/manual/html/active.html +3 -3
  113. data/manual/html/adopt.task.html +2 -2
  114. data/manual/html/aggregate.html +2 -2
  115. data/manual/html/alert.html +3 -3
  116. data/manual/html/alertlevels.html +2 -2
  117. data/manual/html/allocate.html +3 -3
  118. data/manual/html/alphabet.html +1 -1
  119. data/manual/html/alternative.html +2 -2
  120. data/manual/html/author.html +2 -2
  121. data/manual/html/auxdir.html +2 -2
  122. data/manual/html/auxdir.report.html +2 -2
  123. data/manual/html/balance.html +2 -2
  124. data/manual/html/booking.resource.html +4 -4
  125. data/manual/html/booking.task.html +4 -4
  126. data/manual/html/caption.html +2 -2
  127. data/manual/html/cellcolor.column.html +3 -3
  128. data/manual/html/celltext.column.html +3 -3
  129. data/manual/html/center.html +2 -2
  130. data/manual/html/charge.html +2 -2
  131. data/manual/html/chargeset.html +2 -2
  132. data/manual/html/columnid.html +21 -14
  133. data/manual/html/columns.html +2 -2
  134. data/manual/html/complete.html +2 -2
  135. data/manual/html/copyright.html +2 -2
  136. data/manual/html/credits.html +2 -2
  137. data/manual/html/css/tjreport.css +4 -0
  138. data/manual/html/currency.html +2 -2
  139. data/manual/html/currencyformat.html +3 -3
  140. data/manual/html/dailymax.html +2 -2
  141. data/manual/html/dailymin.html +3 -3
  142. data/manual/html/dailyworkinghours.html +2 -2
  143. data/manual/html/date.extend.html +2 -2
  144. data/manual/html/date.html +5 -5
  145. data/manual/html/definitions.html +4 -4
  146. data/manual/html/depends.html +4 -4
  147. data/manual/html/details.html +2 -2
  148. data/manual/html/disabled.html +2 -2
  149. data/manual/html/duration.html +2 -2
  150. data/manual/html/efficiency.html +3 -3
  151. data/manual/html/effort.html +2 -2
  152. data/manual/html/effortdone.html +2 -2
  153. data/manual/html/effortleft.html +2 -2
  154. data/manual/html/email.html +2 -2
  155. data/manual/html/enabled.html +2 -2
  156. data/manual/html/end.column.html +3 -3
  157. data/manual/html/end.html +4 -4
  158. data/manual/html/end.limit.html +2 -2
  159. data/manual/html/end.report.html +2 -2
  160. data/manual/html/end.timesheet.html +3 -3
  161. data/manual/html/endcredit.html +3 -3
  162. data/manual/html/epilog.html +2 -2
  163. data/manual/html/export.html +3 -3
  164. data/manual/html/extend.html +3 -3
  165. data/manual/html/fail.html +3 -3
  166. data/manual/html/fdl.html +2 -2
  167. data/manual/html/flags.account.html +2 -2
  168. data/manual/html/flags.html +2 -2
  169. data/manual/html/flags.journalentry.html +2 -2
  170. data/manual/html/flags.report.html +2 -2
  171. data/manual/html/flags.resource.html +2 -2
  172. data/manual/html/flags.statussheet.html +2 -2
  173. data/manual/html/flags.task.html +2 -2
  174. data/manual/html/flags.timesheet.html +2 -2
  175. data/manual/html/fontcolor.column.html +3 -3
  176. data/manual/html/footer.html +2 -2
  177. data/manual/html/formats.export.html +3 -3
  178. data/manual/html/formats.html +3 -3
  179. data/manual/html/functions.html +5 -5
  180. data/manual/html/gapduration.html +2 -2
  181. data/manual/html/gaplength.html +2 -2
  182. data/manual/html/halign.center.html +2 -2
  183. data/manual/html/halign.column.html +3 -3
  184. data/manual/html/halign.left.html +2 -2
  185. data/manual/html/halign.right.html +2 -2
  186. data/manual/html/hasalert.html +2 -2
  187. data/manual/html/header.html +2 -2
  188. data/manual/html/headline.html +2 -2
  189. data/manual/html/height.html +3 -3
  190. data/manual/html/hideaccount.html +3 -3
  191. data/manual/html/hidejournalentry.html +2 -2
  192. data/manual/html/hidereport.html +3 -3
  193. data/manual/html/hideresource.html +3 -3
  194. data/manual/html/hidetask.html +3 -3
  195. data/manual/html/icalreport.html +9 -3
  196. data/manual/html/include.macro.html +3 -3
  197. data/manual/html/include.project.html +3 -3
  198. data/manual/html/include.properties.html +3 -3
  199. data/manual/html/index.html +1 -1
  200. data/manual/html/inherit.extend.html +3 -3
  201. data/manual/html/interval1.html +3 -3
  202. data/manual/html/interval2.html +3 -3
  203. data/manual/html/interval3.html +2 -2
  204. data/manual/html/interval4.html +2 -2
  205. data/manual/html/isactive.html +2 -2
  206. data/manual/html/ischildof.html +2 -2
  207. data/manual/html/isdependencyof.html +2 -2
  208. data/manual/html/isdutyof.html +2 -2
  209. data/manual/html/isfeatureof.html +2 -2
  210. data/manual/html/isleaf.html +2 -2
  211. data/manual/html/ismilestone.html +2 -2
  212. data/manual/html/isongoing.html +3 -3
  213. data/manual/html/isresource.html +2 -2
  214. data/manual/html/isresponsibilityof.html +2 -2
  215. data/manual/html/istask.html +2 -2
  216. data/manual/html/isvalid.html +2 -2
  217. data/manual/html/journalattributes.html +2 -2
  218. data/manual/html/journalentry.html +3 -3
  219. data/manual/html/journalmode.html +3 -3
  220. data/manual/html/leaveallowance.html +3 -3
  221. data/manual/html/leaves.html +3 -3
  222. data/manual/html/left.html +2 -2
  223. data/manual/html/length.html +3 -3
  224. data/manual/html/limits.allocate.html +2 -2
  225. data/manual/html/limits.html +2 -2
  226. data/manual/html/limits.resource.html +2 -2
  227. data/manual/html/limits.task.html +2 -2
  228. data/manual/html/listitem.column.html +3 -3
  229. data/manual/html/listtype.column.html +2 -2
  230. data/manual/html/loadunit.html +2 -2
  231. data/manual/html/logicalexpression.html +4 -4
  232. data/manual/html/logicalflagexpression.html +4 -4
  233. data/manual/html/macro.html +4 -4
  234. data/manual/html/managers.html +2 -2
  235. data/manual/html/mandatory.html +4 -4
  236. data/manual/html/markdate.html +69 -0
  237. data/manual/html/maxend.html +4 -4
  238. data/manual/html/maximum.html +2 -2
  239. data/manual/html/maxstart.html +2 -2
  240. data/manual/html/milestone.html +3 -3
  241. data/manual/html/minend.html +2 -2
  242. data/manual/html/minimum.html +2 -2
  243. data/manual/html/minstart.html +2 -2
  244. data/manual/html/monthlymax.html +2 -2
  245. data/manual/html/monthlymin.html +3 -3
  246. data/manual/html/navbar.html +5 -1
  247. data/manual/html/navigator.html +2 -2
  248. data/manual/html/newtask.html +3 -3
  249. data/manual/html/nikureport.html +2 -2
  250. data/manual/html/note.task.html +4 -4
  251. data/manual/html/novevents.html +68 -0
  252. data/manual/html/now.html +4 -4
  253. data/manual/html/number.extend.html +2 -2
  254. data/manual/html/numberformat.html +2 -2
  255. data/manual/html/onend.html +2 -2
  256. data/manual/html/onstart.html +2 -2
  257. data/manual/html/opennodes.html +2 -2
  258. data/manual/html/outputdir.html +3 -3
  259. data/manual/html/overtime.booking.html +2 -2
  260. data/manual/html/period.column.html +2 -2
  261. data/manual/html/period.limit.html +2 -2
  262. data/manual/html/period.report.html +2 -2
  263. data/manual/html/period.task.html +2 -2
  264. data/manual/html/persistent.html +3 -3
  265. data/manual/html/precedes.html +5 -5
  266. data/manual/html/priority.html +4 -4
  267. data/manual/html/priority.timesheet.html +3 -3
  268. data/manual/html/project.html +4 -4
  269. data/manual/html/projectid.html +2 -2
  270. data/manual/html/projectid.task.html +3 -3
  271. data/manual/html/projectids.html +2 -2
  272. data/manual/html/projection.html +2 -2
  273. data/manual/html/prolog.html +2 -2
  274. data/manual/html/properties.html +3 -3
  275. data/manual/html/purge.html +2 -2
  276. data/manual/html/rate.html +2 -2
  277. data/manual/html/rate.resource.html +2 -2
  278. data/manual/html/rawhtmlhead.html +3 -3
  279. data/manual/html/reference.extend.html +2 -2
  280. data/manual/html/remaining.html +3 -3
  281. data/manual/html/replace.html +2 -2
  282. data/manual/html/reportprefix.html +2 -2
  283. data/manual/html/resource.html +3 -3
  284. data/manual/html/resourceattributes.html +2 -2
  285. data/manual/html/resourceprefix.html +2 -2
  286. data/manual/html/resourcereport.html +4 -4
  287. data/manual/html/resourceroot.html +3 -3
  288. data/manual/html/resources.limit.html +2 -2
  289. data/manual/html/responsible.html +2 -2
  290. data/manual/html/richtext.extend.html +2 -2
  291. data/manual/html/right.html +2 -2
  292. data/manual/html/rollupaccount.html +3 -3
  293. data/manual/html/rollupresource.html +3 -3
  294. data/manual/html/rolluptask.html +3 -3
  295. data/manual/html/scale.column.html +2 -2
  296. data/manual/html/scenario.html +3 -3
  297. data/manual/html/scenario.ical.html +3 -3
  298. data/manual/html/scenarios.export.html +2 -2
  299. data/manual/html/scenarios.html +2 -2
  300. data/manual/html/scenariospecific.extend.html +2 -2
  301. data/manual/html/scheduled.html +2 -2
  302. data/manual/html/scheduling.html +6 -6
  303. data/manual/html/schedulingmode.html +2 -2
  304. data/manual/html/select.html +4 -4
  305. data/manual/html/selfcontained.html +2 -2
  306. data/manual/html/shift.allocate.html +2 -2
  307. data/manual/html/shift.html +3 -3
  308. data/manual/html/shift.resource.html +4 -4
  309. data/manual/html/shift.task.html +2 -2
  310. data/manual/html/shift.timesheet.html +2 -2
  311. data/manual/html/shifts.allocate.html +2 -2
  312. data/manual/html/shifts.resource.html +2 -2
  313. data/manual/html/shifts.task.html +3 -3
  314. data/manual/html/shorttimeformat.html +3 -3
  315. data/manual/html/sloppy.booking.html +2 -2
  316. data/manual/html/sloppy.projection.html +2 -2
  317. data/manual/html/sortaccounts.html +2 -2
  318. data/manual/html/sortjournalentries.html +2 -2
  319. data/manual/html/sortresources.html +2 -2
  320. data/manual/html/sorttasks.html +2 -2
  321. data/manual/html/start.column.html +3 -3
  322. data/manual/html/start.html +4 -4
  323. data/manual/html/start.limit.html +2 -2
  324. data/manual/html/start.report.html +2 -2
  325. data/manual/html/startcredit.html +3 -3
  326. data/manual/html/status.statussheet.html +2 -2
  327. data/manual/html/status.timesheet.html +2 -2
  328. data/manual/html/statussheet.html +2 -2
  329. data/manual/html/statussheetreport.html +3 -3
  330. data/manual/html/strict.projection.html +2 -2
  331. data/manual/html/summary.html +2 -2
  332. data/manual/html/supplement.html +2 -2
  333. data/manual/html/supplement.resource.html +2 -2
  334. data/manual/html/supplement.task.html +2 -2
  335. data/manual/html/tagfile.html +3 -3
  336. data/manual/html/task.html +3 -3
  337. data/manual/html/task.statussheet.html +3 -3
  338. data/manual/html/task.timesheet.html +2 -2
  339. data/manual/html/taskattributes.html +2 -2
  340. data/manual/html/taskprefix.html +2 -2
  341. data/manual/html/taskreport.html +4 -4
  342. data/manual/html/taskroot.export.html +2 -2
  343. data/manual/html/taskroot.html +2 -2
  344. data/manual/html/text.extend.html +2 -2
  345. data/manual/html/textreport.html +4 -4
  346. data/manual/html/timeformat.html +3 -3
  347. data/manual/html/timeformat1.html +2 -2
  348. data/manual/html/timeformat2.html +2 -2
  349. data/manual/html/timeoff.nikureport.html +2 -2
  350. data/manual/html/timesheet.html +3 -3
  351. data/manual/html/timesheetreport.html +3 -3
  352. data/manual/html/timezone.export.html +2 -2
  353. data/manual/html/timezone.html +2 -2
  354. data/manual/html/timezone.report.html +2 -2
  355. data/manual/html/timezone.shift.html +2 -2
  356. data/manual/html/timingresolution.html +2 -2
  357. data/manual/html/title.column.html +2 -2
  358. data/manual/html/title.html +2 -2
  359. data/manual/html/toc.html +157 -143
  360. data/manual/html/tooltip.column.html +3 -3
  361. data/manual/html/tracereport.html +7 -7
  362. data/manual/html/trackingscenario.html +3 -3
  363. data/manual/html/treelevel.html +2 -2
  364. data/manual/html/vacation.html +2 -2
  365. data/manual/html/vacation.resource.html +2 -2
  366. data/manual/html/vacation.shift.html +2 -2
  367. data/manual/html/warn.html +4 -4
  368. data/manual/html/weeklymax.html +2 -2
  369. data/manual/html/weeklymin.html +3 -3
  370. data/manual/html/weekstartsmonday.html +2 -2
  371. data/manual/html/weekstartssunday.html +2 -2
  372. data/manual/html/width.column.html +2 -2
  373. data/manual/html/width.html +3 -3
  374. data/manual/html/work.html +3 -3
  375. data/manual/html/workinghours.project.html +3 -3
  376. data/manual/html/workinghours.resource.html +2 -2
  377. data/manual/html/workinghours.shift.html +2 -2
  378. data/manual/html/yearlyworkingdays.html +2 -2
  379. data/spec/ProjectBroker_spec.rb +6 -6
  380. data/spec/StatusSheets_spec.rb +1 -1
  381. data/spec/TimeSheets_spec.rb +1 -1
  382. data/spec/TraceReport_spec.rb +1 -1
  383. data/spec/support/DaemonControl.rb +2 -3
  384. data/taskjuggler.gemspec +7 -10
  385. data/tasks/changelog.rake +2 -0
  386. data/tasks/gem.rake +3 -1
  387. data/tasks/help2man.rake +18 -0
  388. data/tasks/kate.rake +2 -0
  389. data/tasks/manual.rake +3 -1
  390. data/tasks/test.rake +5 -0
  391. data/tasks/vim.rake +2 -0
  392. data/test/TestSuite/CSV-Reports/quotes.tjp +20 -0
  393. data/test/TestSuite/CSV-Reports/refs/quotes.csv +5 -0
  394. data/test/TestSuite/Export-Reports/refs/AccountReport.tjp +0 -1
  395. data/test/TestSuite/Export-Reports/refs/AdoptedTasks.tjp +0 -2
  396. data/test/TestSuite/Export-Reports/refs/AlertLevels.tjp +0 -1
  397. data/test/TestSuite/Export-Reports/refs/Allocate-1.tjp +0 -1
  398. data/test/TestSuite/Export-Reports/refs/AutoID.tjp +0 -1
  399. data/test/TestSuite/Export-Reports/refs/AutoMacros.tjp +0 -1
  400. data/test/TestSuite/Export-Reports/refs/Currencyformat.tjp +0 -1
  401. data/test/TestSuite/Export-Reports/refs/CustomAttributes.tjp +0 -2
  402. data/test/TestSuite/Export-Reports/refs/Depends1.tjp +0 -1
  403. data/test/TestSuite/Export-Reports/refs/Durations.tjp +0 -1
  404. data/test/TestSuite/Export-Reports/refs/Efficiency.tjp +0 -1
  405. data/test/TestSuite/Export-Reports/refs/Gap.tjp +0 -3
  406. data/test/TestSuite/Export-Reports/refs/Include.tjp +0 -1
  407. data/test/TestSuite/Export-Reports/refs/Journal.tjp +0 -1
  408. data/test/TestSuite/Export-Reports/refs/Macro-1.tjp +0 -1
  409. data/test/TestSuite/Export-Reports/refs/Macro-2.tjp +0 -2
  410. data/test/TestSuite/Export-Reports/refs/Macro-3.tjp +0 -1
  411. data/test/TestSuite/Export-Reports/refs/Manager.tjp +0 -1
  412. data/test/TestSuite/Export-Reports/refs/Milestone.tjp +0 -2
  413. data/test/TestSuite/Export-Reports/refs/Numberformat.tjp +0 -1
  414. data/test/TestSuite/Export-Reports/refs/Precedes1.tjp +0 -1
  415. data/test/TestSuite/Export-Reports/refs/Project.tjp +0 -1
  416. data/test/TestSuite/Export-Reports/refs/ProjectIDs.tjp +0 -3
  417. data/test/TestSuite/Export-Reports/refs/Reports.tjp +0 -1
  418. data/test/TestSuite/Export-Reports/refs/Resource.tjp +0 -1
  419. data/test/TestSuite/Export-Reports/refs/ResourceRoot.tjp +0 -1
  420. data/test/TestSuite/Export-Reports/refs/RollupResource.tjp +0 -1
  421. data/test/TestSuite/Export-Reports/refs/Scenario.tjp +0 -2
  422. data/test/TestSuite/Export-Reports/refs/Timezone.tjp +0 -1
  423. data/test/TestSuite/Export-Reports/refs/Vacation.tjp +0 -1
  424. data/test/TestSuite/Export-Reports/refs/navigator.tjp +0 -4
  425. data/test/TestSuite/Export-Reports/refs/template.tjp +0 -6
  426. data/test/TestSuite/Export-Reports/refs/textreport.tjp +0 -1
  427. data/test/TestSuite/Export-Reports/refs/tutorial.tjp +0 -8
  428. data/test/TestSuite/Syntax/Correct/Booking.tjp +1 -1
  429. data/test/TestSuite/Syntax/Correct/Currencyformat.tjp +1 -1
  430. data/test/TestSuite/Syntax/Correct/template.tjp +3 -3
  431. data/test/TestSuite/Syntax/Correct/tutorial.tjp +8 -3
  432. data/test/test_BatchProcessor.rb +6 -3
  433. data/test/test_ProjectFileScanner.rb +8 -8
  434. metadata +47 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4626796ad19e4552b12b7a08991a6e1382a035bf
4
- data.tar.gz: 331d901aba229c875bba6b22af9f7f390d390fe9
2
+ SHA256:
3
+ metadata.gz: ac8d1b5b2a3a8a3de01a39de2ef9533e1c86ade627b4a27ccf83427dac988093
4
+ data.tar.gz: 7dea4a421b72b1a6645b0699bfb4076eaa4fc46fcd1274066503dc2c36d7a343
5
5
  SHA512:
6
- metadata.gz: 51807219195d0c5fc94a5499d86223f2bb85ace75974b0aec3a7abda5d90d55a0c7234acfdf9e27ea00589e9343754bd54fa7d32d2cf566c9e061a9f7b10f692
7
- data.tar.gz: ce602aa3883b46e5903c2456a473f0881df1c3ee2c65eddebe0c531836973a1983ae11f9d25b4ebe4fce1e818979e3ea66d16dc3966bfd227e4c04cfc30081c0
6
+ metadata.gz: a07a210795fb27f09a3a8cc09fcef2ceb21c0f08d47cedb8655b3cc1df8201b7f309278dd1464961a5c9e06164d12ae85f979435a3007701428fe852801ffccc
7
+ data.tar.gz: dd87f1321f59cbd9399a2b25ab7d5f3d16a01952579f3b54abfb7e2794a0f322c047e4bfb93434569eaea9cf1fd98a7ca6737ed20bea9e5c00816c6ab0f64bc4
data/CHANGELOG CHANGED
@@ -1,3 +1,72 @@
1
+ = Release 3.7.2 (2023-02-25)
2
+
3
+ == New Features
4
+
5
+ * The 'duties' column now supports the 'listitem' attribute.
6
+
7
+ == Bug Fixes
8
+
9
+ * File.exists? is no longer supported in Ruby 3.2.x
10
+ * Attempt to fix MS Project XML export for newer MSP versions.
11
+ * Eliminate use of useless variable
12
+ * Fix race condition that surfaces when using Ruby 3.x.
13
+ * Don't crash on division by zero for timesheets shorter than 1 week
14
+ * Properly escape double quotes in CSV file strings.
15
+ * Don't crash if task is overspeficied.
16
+ * Queries in listitems for some columns now respect scope property
17
+
18
+
19
+ = Release 3.7.1 (2020-03-14)
20
+
21
+ * Bumping version to 3.7.1
22
+ * Storing the version in version.rb
23
+ * add novevents keyword to icalreport context
24
+ * Revert "Revert "Revert "
25
+ This reverts commit d3c9d87a4fd58c9af15a44eb6c2b6c131f939912.
26
+ * Revert "Revert "
27
+ This reverts commit 3ca91860374adefb5821ab70d1a3030883459231.
28
+ * Revert "
29
+ This reverts commit 163fabe4f21b92a9828f65ccd186526af6c3b401.
30
+ * Revert "Revert "
31
+ This reverts commit 3ca91860374adefb5821ab70d1a3030883459231.
32
+ * Revert "
33
+ This reverts commit 163fabe4f21b92a9828f65ccd186526af6c3b401.
34
+ * Corrected some words.
35
+ * fix: In Windows and Cygwin generate file path for the booking file is
36
+ wrong
37
+ Reported-by: Yury Rumega
38
+
39
+ When running the freeze command in Windows and Cygwin file path for the booking file is
40
+ generated wrongly.
41
+
42
+ = Release 3.7.0 (2020-03-14)
43
+
44
+ == New Features
45
+
46
+ * Adding a column that lists all annual leave days.
47
+ * Include man pages in gem
48
+ * man pages: Code modifications
49
+ * h2m files to enhance the generated man page
50
+ * rake task to build man pages using help2man
51
+ * Add reference line via 'markdate' parameter
52
+
53
+ == Bug Fixes
54
+
55
+ * Don't use 'milestone' keyword in export reports.
56
+ * Fix a few warnings in the Gemfile
57
+ * Eliminate warnings seen with Ruby 2.5
58
+ * Fix endless loop when using sorting criteria in some reports.
59
+ * Don't crash in account definition.
60
+ * Correcting Typos undo: plural for pixel in German (pixel) different from English (pixels)
61
+ * Correcting Typos in manual pages and source file comments
62
+ * Correct spelling mistake in lib/taskjuggler/apps/Tj3Man.rb
63
+ * Clean the source tree using rake
64
+ * Fix crash when taskjuggler.rc is not valid YAML.
65
+ * syntax of xml comments to not have -- in the body
66
+ * Spec tests failed on some Ubuntu/Debian versions.
67
+ * Prioritize resource leave time over free time in resource reports
68
+
69
+
1
70
  = Release 3.6.0 (2016-03-12)
2
71
 
3
72
  == New Features
data/Rakefile CHANGED
@@ -4,10 +4,13 @@ $:.unshift File.join(File.dirname(__FILE__))
4
4
  lib = File.expand_path('../lib', __FILE__)
5
5
  $:.unshift lib unless $:.include?(lib)
6
6
 
7
+ require 'rake'
8
+ require 'rspec'
7
9
  require 'rake/clean'
10
+ require 'bundler/gem_tasks'
8
11
 
9
12
  Dir.glob( 'tasks/*.rake').each do |fn|
10
- begin
13
+ begin
11
14
  load fn;
12
15
  rescue LoadError
13
16
  puts "#{fn.split('/')[1]} tasks unavailable: #{$!}"
@@ -433,6 +433,10 @@ p.tj_journal {
433
433
  background-color:#EE0000;
434
434
  position:absolute;
435
435
  }
436
+ .markdateline {
437
+ background-color:#000000;
438
+ position:absolute;
439
+ }
436
440
  .white {
437
441
  background-color:#FFFFFF;
438
442
  position:absolute;
data/data/tjp.vim CHANGED
@@ -1,7 +1,7 @@
1
1
  " Vim syntax file
2
2
  " Language: TaskJuggler
3
3
  " Maintainer: TaskJuggler Developers <taskjuggler-devel@googlegroups.com>
4
- " Last Change: 2016-03-12 21:14:02 +0100
4
+ " Last Change: 2023-02-25 11:11:12 +0100
5
5
  " This file was automatically generated by VimSyntax.rb
6
6
 
7
7
  if exists("b:current_syntax")
@@ -86,6 +86,8 @@ syn keyword tjp_columnid_annualleave annualleave
86
86
  hi def link tjp_columnid_annualleave Type
87
87
  syn keyword tjp_columnid_annualleavebalance annualleavebalance
88
88
  hi def link tjp_columnid_annualleavebalance Type
89
+ syn keyword tjp_columnid_annualleavelist annualleavelist
90
+ hi def link tjp_columnid_annualleavelist Type
89
91
  syn keyword tjp_columnid_alert alert
90
92
  hi def link tjp_columnid_alert Type
91
93
  syn keyword tjp_columnid_alertmessages alertmessages
@@ -346,6 +348,8 @@ syn keyword tjp_hidetask hidetask contained
346
348
  hi def link tjp_hidetask Type
347
349
  syn keyword tjp_icalreport icalreport contained
348
350
  hi def link tjp_icalreport Type
351
+ syn keyword tjp_novevents novevents contained
352
+ hi def link tjp_novevents Type
349
353
  syn keyword tjp_scenario_ical scenario contained
350
354
  hi def link tjp_scenario_ical Type
351
355
  syn keyword tjp_accountprefix accountprefix contained
@@ -414,6 +418,8 @@ syn keyword tjp_extend extend contained
414
418
  hi def link tjp_extend Type
415
419
  syn keyword tjp_now now contained
416
420
  hi def link tjp_now Type
421
+ syn keyword tjp_markdate markdate contained
422
+ hi def link tjp_markdate Type
417
423
  syn keyword tjp_outputdir outputdir contained
418
424
  hi def link tjp_outputdir Type
419
425
  syn keyword tjp_shorttimeformat shorttimeformat contained
@@ -665,7 +671,7 @@ syn region tjpblk_number_extend start=/^\s*number\s.*{\s*$/ end=/^\s*}\s*$/ tran
665
671
  syn region tjpblk_reference_extend start=/^\s*reference\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_reference_extend,tjp_inherit_extend,tjp_scenariospecific_extend contained
666
672
  syn region tjpblk_richtext_extend start=/^\s*richtext\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_richtext_extend,tjp_inherit_extend,tjp_scenariospecific_extend contained
667
673
  syn region tjpblk_text_extend start=/^\s*text\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_text_extend,tjp_inherit_extend,tjp_scenariospecific_extend contained
668
- syn region tjpblk_icalreport start=/^\s*icalreport\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_icalreport,tjp_hideresource,tjp_hidejournalentry,tjp_hidetask,tjp_end_report,tjp_period_report,tjp_start_report,tjp_rollupresource,tjp_rolluptask,tjp_scenario_ical
674
+ syn region tjpblk_icalreport start=/^\s*icalreport\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_icalreport,tjp_hideresource,tjp_hidejournalentry,tjp_hidetask,tjp_end_report,tjp_period_report,tjp_start_report,tjp_rollupresource,tjp_rolluptask,tjp_novevents,tjp_scenario_ical
669
675
  syn region tjpblk_journalentry start=/^\s*journalentry\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_journalentry,tjp_alert,tjp_author,tjp_flags_journalentry,tjp_summary,tjp_details contained
670
676
  syn region tjpblk_dailymax start=/^\s*dailymax\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_dailymax,tjp_end_limit,tjp_period_limit,tjp_resources_limit,tjp_start_limit contained
671
677
  syn region tjpblk_dailymin start=/^\s*dailymin\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_dailymin,tjp_end_limit,tjp_period_limit,tjp_resources_limit,tjp_start_limit contained
@@ -678,7 +684,7 @@ syn region tjpblk_weeklymin start=/^\s*weeklymin\s.*{\s*$/ end=/^\s*}\s*$/ trans
678
684
  syn region tjpblk_navigator start=/^\s*navigator\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_navigator,tjp_hidereport
679
685
  syn region tjpblk_nikureport start=/^\s*nikureport\s.*{\s*$/ end=/^\s*}\s*$/ transparent fold contains=@tjpcommon,tjp_nikureport,tjp_formats,tjp_headline,tjp_hideresource,tjp_hidetask,tjp_numberformat,tjp_end_report,tjp_period_report,tjp_start_report,tjp_title,tjp_timeoff_nikureport
680
686
  syn region tjpblk_extend start=/^\s*extend\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_extend,tjp_date_extend,tjpblk_date_extend,tjp_number_extend,tjpblk_number_extend,tjp_reference_extend,tjpblk_reference_extend,tjp_richtext_extend,tjpblk_richtext_extend,tjp_text_extend,tjpblk_text_extend contained
681
- syn region tjpblk_project start=/^\s*project\s.*{\s*$/ end=/^\s*}\s*$/ transparent fold contains=@tjpcommon,tjp_project,tjp_alertlevels,tjp_currencyformat,tjp_currency,tjp_dailyworkinghours,tjp_extend,tjpblk_extend,tjp_include_project,tjp_journalentry,tjpblk_journalentry,tjp_now,tjp_numberformat,tjp_outputdir,tjp_scenario,tjpblk_scenario,tjp_shorttimeformat,tjp_timeformat,tjp_timezone,tjp_timingresolution,tjp_trackingscenario,tjp_weekstartsmonday,tjp_weekstartssunday,tjp_workinghours_project,tjp_yearlyworkingdays
687
+ syn region tjpblk_project start=/^\s*project\s.*{\s*$/ end=/^\s*}\s*$/ transparent fold contains=@tjpcommon,tjp_project,tjp_alertlevels,tjp_currencyformat,tjp_currency,tjp_dailyworkinghours,tjp_extend,tjpblk_extend,tjp_include_project,tjp_journalentry,tjpblk_journalentry,tjp_now,tjp_markdate,tjp_numberformat,tjp_outputdir,tjp_scenario,tjpblk_scenario,tjp_shorttimeformat,tjp_timeformat,tjp_timezone,tjp_timingresolution,tjp_trackingscenario,tjp_weekstartsmonday,tjp_weekstartssunday,tjp_workinghours_project,tjp_yearlyworkingdays
682
688
  syn region tjpblk_limits start=/^\s*limits\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_limits,tjp_dailymax,tjpblk_dailymax,tjp_dailymin,tjpblk_dailymin,tjp_maximum,tjpblk_maximum,tjp_minimum,tjpblk_minimum,tjp_monthlymax,tjpblk_monthlymax,tjp_monthlymin,tjpblk_monthlymin,tjp_weeklymax,tjpblk_weeklymax,tjp_weeklymin,tjpblk_weeklymin
683
689
  syn region tjpblk_include_properties start=/^\s*include\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_include_properties,tjp_accountprefix,tjp_reportprefix,tjp_resourceprefix,tjp_taskprefix
684
690
  syn region tjpblk_columns start=/^\s*columns\s.*{\s*$/ end=/^\s*}\s*$/ transparent contains=@tjpcommon,tjp_columns,tjp_celltext_column,tjp_cellcolor_column,tjp_end_column,tjp_fontcolor_column,tjp_halign_column,tjp_listitem_column,tjp_listtype_column,tjp_period_column,tjp_scale_column,tjp_start_column,tjp_timeformat1,tjp_timeformat2,tjp_title_column,tjp_tooltip_column,tjp_width_column contained
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * This file contains a project skeleton. It is part of the
3
3
  * TaskJuggler project management tool. You can use this as a basis to
4
- * start you own project file.
4
+ * start your own project file.
5
5
  */
6
6
  project your_project_id "Your Project Title" 2011-11-11-0:00--0500 +4m {
7
7
  # Set the default time zone for the project. If not specified, UTC
@@ -28,7 +28,7 @@ project your_project_id "Your Project Title" 2011-11-11-0:00--0500 +4m {
28
28
 
29
29
  # You can define your own attributes for tasks and resources. This
30
30
  # is handy to capture additional information about the project that
31
- # is not directly impacting the project schedule but you like to
31
+ # is not directly impacting the project schedule, but which you like to
32
32
  # keep in one place.
33
33
  #extend task {
34
34
  # reference spec "Link to Wiki page"
@@ -59,7 +59,7 @@ copyright "Claim your rights here"
59
59
  # used to filter out subsets of them during reporting.
60
60
  flags important, hidden
61
61
 
62
- # If you want to do budget planning for you project, you need to
62
+ # If you want to do budget planning for your project, you need to
63
63
  # define some accounts.
64
64
  account cost "Project Cost" {
65
65
  account dev "Development"
@@ -67,10 +67,10 @@ account cost "Project Cost" {
67
67
  }
68
68
  account rev "Customer Payments"
69
69
 
70
- # The Profit&Loss analysis should be rev - cost accounts.
70
+ # The Profit & Loss analysis should be rev - cost accounts.
71
71
  balance cost rev
72
72
 
73
- # Define you public holidays here.
73
+ # Define your public holidays here.
74
74
  vacation "New Year's Day" 2012-01-02
75
75
  vacation "Birthday of Martin Luther King, Jr." 2012-01-16
76
76
  vacation "Washington's Birthday" 2012-02-20
@@ -83,7 +83,7 @@ vacation "Thanksgiving Day" 2012-11-22
83
83
  vacation "Christmas Day" 2012-12-25
84
84
 
85
85
  # The daily default rate of all resources. This can be overridden for each
86
- # resource. We specify this, so that we can do a good calculation of
86
+ # resource. We specify this so we can do a good calculation of
87
87
  # the costs of the project.
88
88
  rate 400.0
89
89
 
@@ -123,7 +123,7 @@ task project "Project" {
123
123
 
124
124
  # Now the project has been specified completely. Stopping here would
125
125
  # result in a valid TaskJuggler file that could be processed and
126
- # scheduled. But no reports would be generated to visualize the
126
+ # scheduled. Here reports will be generated to visualize the
127
127
  # results.
128
128
 
129
129
  navigator navbar {
@@ -242,9 +242,9 @@ taskreport overview "" {
242
242
  # Macro to set the background color of a cell according to the alert
243
243
  # level of the task.
244
244
  macro AlertColor [
245
- cellcolor plan.alert = 0 "#00D000" # green
246
- cellcolor plan.alert = 1 "#D0D000" # yellow
247
- cellcolor plan.alert = 2 "#D00000" # red
245
+ cellcolor plan.alert = 0 "#90FF90" # green
246
+ cellcolor plan.alert = 1 "#FFFF90" # yellow
247
+ cellcolor plan.alert = 2 "#FF9090" # red
248
248
  ]
249
249
 
250
250
  taskreport status "" {
@@ -20,7 +20,7 @@ project acso "Accounting Software" 2002-01-16 +4m {
20
20
  # used, but this will likely be outside of the project range, so it
21
21
  # can't be seen in the reports.
22
22
  now 2002-03-05-13:00
23
- # The currency for all money values is the Euro.
23
+ # The currency for all money values is the US Dollar.
24
24
  currency "USD"
25
25
 
26
26
  # We want to compare the baseline scenario to one with a slightly
@@ -405,9 +405,9 @@ taskreport overview "" {
405
405
  # Macro to set the background color of a cell according to the alert
406
406
  # level of the task.
407
407
  macro AlertColor [
408
- cellcolor plan.alert = 0 "#00D000" # green
409
- cellcolor plan.alert = 1 "#D0D000" # yellow
410
- cellcolor plan.alert = 2 "#D00000" # red
408
+ cellcolor plan.alert = 0 "#90FF90" # green
409
+ cellcolor plan.alert = 1 "#FFFF90" # yellow
410
+ cellcolor plan.alert = 2 "#FF9090" # red
411
411
  ]
412
412
 
413
413
  taskreport status "" {
@@ -50,7 +50,7 @@ class TaskJuggler
50
50
  end
51
51
 
52
52
  # Set the selection mode identified by name specified in _str_. For
53
- # efficiency reasons, we turn the name into a Fixnum value.
53
+ # efficiency reasons, we turn the name into an Integer value.
54
54
  def setSelectionMode(str)
55
55
  modes = %w( order minallocated minloaded maxloaded random )
56
56
  @selectionMode = modes.index(str)
@@ -109,7 +109,7 @@ class AppConfig
109
109
  dirs = dataSearchDirs(baseDir)
110
110
  # Remove non-existing directories from the list again
111
111
  dirs.delete_if do |dir|
112
- !File.exist?(dir.untaint)
112
+ !File.exist?(dir)
113
113
  end
114
114
  dirs
115
115
  end
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # = AttributeBase.rb -- The TaskJuggler III Project Management Software
5
5
  #
6
- # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
6
+ # Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2019
7
7
  # by Chris Schlaeger <cs@taskjuggler.org>
8
8
  #
9
9
  # This program is free software; you can redistribute it and/or modify
@@ -136,7 +136,7 @@ class TaskJuggler
136
136
 
137
137
  def to_num
138
138
  v = get
139
- if v.is_a?(Fixnum) || v.is_a?(Bignum) || v.is_a?(Float)
139
+ if v.is_a?(Integer) || v.is_a?(Float)
140
140
  v
141
141
  else
142
142
  nil
@@ -145,10 +145,16 @@ class TaskJuggler
145
145
 
146
146
  def to_sort
147
147
  v = get
148
- if v.is_a?(Fixnum) || v.is_a?(Bignum) || v.is_a?(Float)
148
+ if v.is_a?(Integer) || v.is_a?(Float)
149
149
  v
150
150
  elsif v.respond_to?('to_s')
151
- v.to_s
151
+ if v.respond_to?('join')
152
+ # If the attribute is an Array we convert it to a comma separated
153
+ # list.
154
+ v.join(', ')
155
+ else
156
+ v.to_s
157
+ end
152
158
  else
153
159
  nil
154
160
  end
@@ -264,12 +264,12 @@ class TaskJuggler
264
264
 
265
265
  end
266
266
 
267
- class FixnumAttribute < AttributeBase
267
+ class IntegerAttribute < AttributeBase
268
268
  def initialize(property, type, container)
269
269
  super
270
270
  end
271
271
 
272
- def FixnumAttribute::tjpId
272
+ def IntegerAttribute::tjpId
273
273
  'integer'
274
274
  end
275
275
  end
@@ -16,7 +16,7 @@ require 'monitor'
16
16
 
17
17
  class TaskJuggler
18
18
 
19
- # The JobInfo class is just a storage container for some batch job realted
19
+ # The JobInfo class is just a storage container for some batch job related
20
20
  # pieces of information. It contains things like a job id, the process id,
21
21
  # the stdout data and the like.
22
22
  class JobInfo
@@ -69,16 +69,16 @@ class TaskJuggler
69
69
  def initialize(maxCpuCores)
70
70
  @maxCpuCores = maxCpuCores
71
71
  # Jobs submitted by calling queue() are put in the @toRunQueue. The
72
- # pusher Thread will pick them up and fork them off into another
72
+ # launcher Thread will pick them up and fork them off into another
73
73
  # process.
74
- @toRunQueue = Queue.new
74
+ @toRunQueue = [ ]
75
75
  # A hash that maps the JobInfo objects of running jobs by their PID.
76
76
  @runningJobs = { }
77
77
  # A list of jobs that wait to complete their writing.
78
78
  @spoolingJobs = [ ]
79
79
  # The wait() method will then clean the @toDropQueue, executes the post
80
80
  # processing block and removes all JobInfo related objects.
81
- @toDropQueue = Queue.new
81
+ @toDropQueue = []
82
82
 
83
83
  # A semaphore to guard accesses to @runningJobs, @spoolingJobs and
84
84
  # following shared data structures.
@@ -106,28 +106,34 @@ class TaskJuggler
106
106
  # to identify the job upon completion. +block+ is a Ruby code block to be
107
107
  # executed in a separate process.
108
108
  def queue(tag = nil, &block)
109
- raise 'You cannot call queue() while wait() is running!' if @jobsOut > 0
110
-
111
- # If this is the first queued job for this run, we have to start the
112
- # helper threads.
113
- if @jobsIn == 0
114
- # The JobInfo objects in the @toRunQueue are processed by the pusher
115
- # thread. It forkes off processes to execute the code block associated
116
- # with the JobInfo.
117
- @pusher = Thread.new { pusher }
118
- # The popper thread waits for terminated childs and picks up the
119
- # results.
120
- @popper = Thread.new { popper }
121
- # The grabber thread collects $stdout and $stderr data from each child
122
- # process and stores them in the corresponding JobInfo.
123
- @grabber = Thread.new { grabber }
124
- end
125
109
 
126
110
  # Create a new JobInfo object for the job and push it to the @toRunQueue.
127
- job = JobInfo.new(@jobsIn, block, tag)
128
- # Increase job counter
129
- @lock.synchronize { @jobsIn += 1 }
130
- @toRunQueue.push(job)
111
+ @lock.synchronize do
112
+ raise 'You cannot call queue() while wait() is running!' if @jobsOut > 0
113
+
114
+ # If this is the first queued job for this run, we have to start the
115
+ # helper threads.
116
+ if @jobsIn == 0
117
+ # The JobInfo objects in the @toRunQueue are processed by the
118
+ # launcher thread. It forkes off processes to execute the code
119
+ # block associated with the JobInfo.
120
+ @launcher = Thread.new { launcher }
121
+ # The receiver thread waits for terminated child processes and picks
122
+ # up the results.
123
+ @receiver = Thread.new { receiver }
124
+ # The grabber thread collects $stdout and $stderr data from each
125
+ # child process and stores them in the corresponding JobInfo.
126
+ @grabber = Thread.new { grabber }
127
+ end
128
+
129
+ # To track a job through the queues, we use a JobInfo object to hold
130
+ # all data associated with a job.
131
+ job = JobInfo.new(@jobsIn, block, tag)
132
+ # Increase job counter
133
+ @jobsIn += 1
134
+ # Push the job to the toRunQueue.
135
+ @toRunQueue.push(job)
136
+ end
131
137
  end
132
138
 
133
139
  # Wait for all jobs to complete. The code block will get the JobInfo
@@ -138,29 +144,27 @@ class TaskJuggler
138
144
 
139
145
  # When we have received as many jobs in the @toDropQueue than we have
140
146
  # started then we're done.
141
- while !@lock.synchronize { @jobsIn == @jobsOut }
142
- if @toDropQueue.empty?
143
- sleep(@timeout)
144
- else
145
- # We have completed jobs.
146
- while !@toDropQueue.empty?
147
- # Pop a job from the @toDropQueue and call the block with it.
148
- job = @toDropQueue.pop
149
- # Remove the job related entries from the housekeeping tables.
150
- @lock.synchronize { @jobsOut += 1 }
151
-
147
+ while @lock.synchronize { @jobsOut < @jobsIn }
148
+ job = nil
149
+ @lock.synchronize do
150
+ if !@toDropQueue.empty? && (job = @toDropQueue.pop)
152
151
  # Call the post-processing block that was passed to wait() with
153
152
  # the JobInfo object as argument.
153
+ @jobsOut += 1
154
154
  yield(job)
155
155
  end
156
156
  end
157
+
158
+ unless job
159
+ sleep(@timeout)
160
+ end
157
161
  end
158
162
 
159
163
  # Signal threads to stop
160
164
  @terminate = true
161
165
  # Wait for treads to finish
162
- @pusher.join
163
- @popper.join
166
+ @launcher.join
167
+ @receiver.join
164
168
  @grabber.join
165
169
 
166
170
  # Reset some variables so we can reuse the object for further job runs.
@@ -175,25 +179,22 @@ class TaskJuggler
175
179
 
176
180
  # This function runs in a separate thread to pop JobInfo items from the
177
181
  # @toRunQueue and create child processes for them.
178
- def pusher
182
+ def launcher
179
183
  # Run until the terminate flag is set.
180
184
  until @terminate
181
- if @toRunQueue.empty? ||
182
- @lock.synchronize{ @runningJobs.length >= @maxCpuCores }
185
+ job = nil
186
+ unless @lock.synchronize { @runningJobs.length < @maxCpuCores &&
187
+ (job = @toRunQueue.pop) }
183
188
  # We have no jobs in the @toRunQueue or all CPU cores in use already.
184
189
  sleep(@timeout)
185
190
  else
186
191
  @lock.synchronize do
187
- # Get a new job from the @toRunQueue
188
- job = @toRunQueue.pop
189
-
190
192
  job.openPipes
191
- # Add the receiver end of the pipe to the @pipes Array.
193
+ # Add the receiver end of the pipe to the pipes Arrays.
192
194
  @pipes << job.stdoutP
195
+ @pipes << job.stderrP
193
196
  # Map the pipe end to this JobInfo object.
194
197
  @pipeToJob[job.stdoutP] = job
195
- # Same for $stderr.
196
- @pipes << job.stderrP
197
198
  @pipeToJob[job.stderrP] = job
198
199
 
199
200
  pid = fork do
@@ -224,15 +225,20 @@ class TaskJuggler
224
225
 
225
226
  # This function runs in a separate thread to wait for completed jobs. It
226
227
  # waits for the process completion and stores the result in the
227
- # corresponding JobInfo object.
228
- def popper
228
+ # corresponding JobInfo object. Aborted jobs are pushed to the
229
+ # @toDropQueue while completed jobs are pushed to the @spoolingJobs queue.
230
+ def receiver
229
231
  until @terminate
230
- if @runningJobs.empty?
231
- # No pending jobs, wait a bit.
232
- sleep(@timeout)
233
- else
232
+ pid = retVal = nil
233
+ begin
234
234
  # Wait for the next job to complete.
235
235
  pid, retVal = Process.wait2
236
+ rescue Errno::ECHILD
237
+ # No running jobs. Wait a bit.
238
+ sleep(@timeout)
239
+ end
240
+
241
+ if pid && retVal
236
242
  job = nil
237
243
  @lock.synchronize do
238
244
  # Get the JobInfo object that corresponds to the process ID. The
@@ -242,7 +248,7 @@ class TaskJuggler
242
248
  # Remove the job from the @runningJobs Hash.
243
249
  @runningJobs.delete(pid)
244
250
  # Save the return value.
245
- job.retVal = retVal.dup
251
+ job.retVal = retVal.exitstatus
246
252
  if retVal.signaled?
247
253
  cleanPipes(job)
248
254
  # Aborted jobs will probably not send an EOT. So we fastrack
@@ -269,22 +275,27 @@ class TaskJuggler
269
275
  res = nil
270
276
  begin
271
277
  @lock.synchronize do
272
- if (res = select(@pipes, nil, @pipes, @timeout))
278
+ if (res = IO.select(@pipes, nil, nil, @timeout))
273
279
  # We have output data from at least one child. Check which pipe
274
280
  # actually triggered the select.
275
281
  res[0].each do |pipe|
276
282
  # Find the corresponding JobInfo object.
277
283
  job = @pipeToJob[pipe]
278
- # Store the output.
284
+
285
+ # Store the standard output.
279
286
  if pipe == job.stdoutP
280
287
  # Look for the EOT character to signal the end of the text.
281
- if (c = pipe.getc) == ?\004
288
+ if pipe.closed? || (c = pipe.read_nonblock(1)) == ?\004
282
289
  job.stdoutEOT = true
283
290
  else
284
291
  job.stdout << c
285
292
  end
286
- else
287
- if (c = pipe.getc) == ?\004
293
+ end
294
+
295
+ # Store the error output.
296
+ if pipe == job.stderrP
297
+ # Look for the EOT character to signal the end of the text.
298
+ if pipe.closed? || (c = pipe.read_nonblock(1)) == ?\004
288
299
  job.stderrEOT = true
289
300
  else
290
301
  job.stderr << c
@@ -17,7 +17,7 @@ class TaskJuggler
17
17
  class FileRecord
18
18
 
19
19
  def initialize(fileName)
20
- @name = fileName.dup.untaint
20
+ @name = fileName.dup
21
21
  @mtime = File.mtime(@name)
22
22
  end
23
23
 
@@ -166,7 +166,7 @@ class TaskJuggler
166
166
  #
167
167
  # sbStart must be a TjTime of the scoreboard start
168
168
  # slotDuration must be the duration of the scoreboard slots in seconds
169
- # a and b should be TjTime or Fixnum objects that describe the start and
169
+ # a and b should be TjTime or Integer objects that describe the start and
170
170
  # end time or index of the interval.
171
171
  #
172
172
  # TimeInterval.new(iv)
@@ -191,7 +191,7 @@ class TaskJuggler
191
191
  # If the third argument is a date we convert it to a scoreboard index.
192
192
  args[2] = dateToIndex(args[2]) if args[2].is_a?(TjTime)
193
193
 
194
- if args[2].is_a?(Fixnum) || args[2].is_a?(Bignum)
194
+ if args[2].is_a?(Integer)
195
195
  super(args[2], args[2])
196
196
  else
197
197
  raise ArgumentError, "Illegal argument 3: #{args[0].class}"
@@ -204,11 +204,11 @@ class TaskJuggler
204
204
  args[2] = dateToIndex(args[2]) if args[2].is_a?(TjTime)
205
205
  args[3] = dateToIndex(args[3]) if args[3].is_a?(TjTime)
206
206
 
207
- if !(args[2].is_a?(Fixnum) || args[2].is_a?(Bignum))
207
+ if !(args[2].is_a?(Integer))
208
208
  raise ArgumentError, "Interval start must be an index or TjTime, " +
209
209
  "not a #{args[2].class}"
210
210
  end
211
- if !(args[3].is_a?(Fixnum) || args[3].is_a?(Bignum))
211
+ if !(args[3].is_a?(Integer))
212
212
  raise ArgumentError, "Interval end must be an index or TjTime, " +
213
213
  "not a #{args[3].class}"
214
214
  end
@@ -221,19 +221,18 @@ class TaskJuggler
221
221
  raise ArgumentError, "sbStart must be a TjTime object, not a" +
222
222
  "#{@sbStart.class}"
223
223
  end
224
- unless @slotDuration.is_a?(Fixnum)
225
- raise ArgumentError, "slotDuration must be a Fixnum, not a " +
224
+ unless @slotDuration.is_a?(Integer)
225
+ raise ArgumentError, "slotDuration must be an Integer, not a " +
226
226
  "#{@slotDuration.class}"
227
227
  end
228
228
 
229
229
  end
230
230
 
231
- # Assign the start of the interval. +arg+ can be a Fixnum, Bignum or
231
+ # Assign the start of the interval. +arg+ can be an Integer or
232
232
  # TjTime object.
233
233
  def start=(arg)
234
234
  case arg
235
- when Fixnum
236
- when Bignum
235
+ when Integer
237
236
  @start = arg
238
237
  when TjTime
239
238
  @start = dateToIndex(arg)
@@ -242,12 +241,11 @@ class TaskJuggler
242
241
  end
243
242
  end
244
243
 
245
- # Assign the start of the interval. +arg+ can be a Fixnum, Bignum or
244
+ # Assign the start of the interval. +arg+ can be an Integer or
246
245
  # TjTime object.
247
246
  def end=(arg)
248
247
  case arg
249
- when Fixnum
250
- when Bignum
248
+ when Integer
251
249
  @end = arg
252
250
  when TjTime
253
251
  @end = dateToIndex(arg)
@@ -613,7 +613,7 @@ class TaskJuggler
613
613
  # This function returns a list of entries that have all the exact same
614
614
  # date and are the last entries before the deadline _date_. Only messages
615
615
  # with at least the required alert level _minLevel_ are returned. Messages
616
- # with alert level _minLevel_ must be newer than _minDate_.
616
+ # with alert level _minLevel_ or higher must be newer than _minDate_.
617
617
  def currentEntries(date, property, minLevel, minDate, logExp)
618
618
  pEntries = getEntries(property) ? getEntries(property).last(date) :
619
619
  JournalEntryList.new
@@ -621,7 +621,7 @@ class TaskJuggler
621
621
  # date.
622
622
  pEntries.delete_if do |e|
623
623
  e.headline.empty? || e.alertLevel < minLevel ||
624
- (e.alertLevel == minLevel && minDate && e.date < minDate)
624
+ (e.alertLevel >= minLevel && minDate && e.date < minDate)
625
625
  end
626
626
 
627
627
  unless pEntries.empty?