rwdschedule 0.6 → 0.07

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. data/Readme.txt +435 -17
  2. data/bin/rwdschedule +0 -0
  3. data/code/01rwdcore/01rwdcore.rb +29 -0
  4. data/code/01rwdcore/02helptexthashbegin.rb +16 -0
  5. data/code/01rwdcore/03helptexthash.rb +21 -0
  6. data/code/01rwdcore/jumplinkcommand.rb +36 -0
  7. data/code/01rwdcore/openhelpwindow.rb +38 -0
  8. data/code/01rwdcore/returntomain.rb +10 -0
  9. data/code/01rwdcore/rundocuments.rb +10 -0
  10. data/code/01rwdcore/runeditconfiguration.rb +10 -0
  11. data/code/01rwdcore/runhelpabout.rb +15 -0
  12. data/code/01rwdcore/runopentinkerdocument.rb +7 -0
  13. data/code/01rwdcore/runtab.rb +15 -0
  14. data/code/01rwdcore/rwdtinkerversion.rb +22 -0
  15. data/code/01rwdcore/rwdwindowreturn.rb +9 -0
  16. data/code/01rwdcore/selectiontab.rb +11 -0
  17. data/code/01rwdcore/setuphelpaboutoptions.rb +15 -0
  18. data/code/01rwdcore/setuptinkerdocuments.rb +7 -0
  19. data/code/01rwdcore/test_cases.rb +158 -0
  20. data/code/01rwdcore/test_harness.rb +20 -0
  21. data/code/01rwdcore/uploadreturns.rb +65 -0
  22. data/code/dd0viewphoto/dd0viewphoto.rb +5 -0
  23. data/code/superant.com.rwdcalendar/gh9calendar.rb +40 -0
  24. data/code/superant.com.rwdcalendar/helptexthashrwdschedule.rb +14 -0
  25. data/code/superant.com.rwdcalendar/openhelpwindowrwdschedule.rb +17 -0
  26. data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
  27. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
  28. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +169 -0
  29. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +38 -0
  30. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
  31. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  32. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +55 -0
  33. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +14 -0
  34. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +37 -0
  35. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +24 -0
  36. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
  37. data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
  38. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
  39. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +40 -0
  40. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  41. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
  42. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
  43. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
  44. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
  45. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
  46. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
  47. data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
  48. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +23 -0
  49. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
  50. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +16 -0
  51. data/code/superant.com.schedule/0uninstallapplet.rb +24 -0
  52. data/code/superant.com.schedule/archiveevent.rb +14 -0
  53. data/code/superant.com.schedule/archiveicsevent.rb +14 -0
  54. data/code/superant.com.schedule/cleareventscreendisplay.rb +19 -0
  55. data/code/{gg0schedules → superant.com.schedule}/deleteeventrecord.rb +18 -18
  56. data/code/superant.com.schedule/deleteicseventrecord.rb +19 -0
  57. data/code/superant.com.schedule/deleterwdscheduleupdatefiles.rb +20 -0
  58. data/code/superant.com.schedule/downloadrwdschedulefiles.rb +37 -0
  59. data/code/superant.com.schedule/exporticseventrecord.rb +97 -0
  60. data/code/superant.com.schedule/helptexthashload.rb +22 -0
  61. data/code/{gg0schedules/gh5listdaterecords.rb → superant.com.schedule/listeventdates.rb} +18 -18
  62. data/code/superant.com.schedule/listicseventdates.rb +19 -0
  63. data/code/superant.com.schedule/loadconfigurationrecord.rb +22 -0
  64. data/code/superant.com.schedule/loadconfigurationvariables.rb +14 -0
  65. data/code/superant.com.schedule/loadeventrecord.rb +38 -0
  66. data/code/{gg0schedules/loadeventrecord.rb → superant.com.schedule/loadicseventrecord.rb} +29 -29
  67. data/code/superant.com.schedule/openhelpwindowrwdschedule.rb +43 -0
  68. data/code/{gg0schedules → superant.com.schedule}/renameeventdata.rb +10 -10
  69. data/code/superant.com.schedule/renameicseventdata.rb +17 -0
  70. data/code/superant.com.schedule/returntomain.rb +10 -0
  71. data/code/superant.com.schedule/runrwdscheduleicsbackwindow.rb +10 -0
  72. data/code/superant.com.schedule/runrwdschedulemenu1.rb +34 -0
  73. data/code/superant.com.schedule/runrwdschedulesyncbackwindow.rb +10 -0
  74. data/code/superant.com.schedule/rwdversion.rb +10 -0
  75. data/code/superant.com.schedule/saveconfigurationrecord.rb +19 -0
  76. data/code/{gg0schedules/gg9saveeventchanges.rb → superant.com.schedule/saveeventrecord.rb} +25 -18
  77. data/code/superant.com.schedule/saveicseventrecord.rb +98 -0
  78. data/code/superant.com.schedule/syncrwdschedule.rb +30 -0
  79. data/code/superant.com.schedule/test_cases.rb +45 -0
  80. data/code/superant.com.schedule/uploadrwdschedulefiles.rb +30 -0
  81. data/code/{gg0schedules/gg0viewevent.rb → superant.com.schedule/viewevent.rb} +20 -20
  82. data/code/superant.com.schedule/viewicsevent.rb +20 -0
  83. data/code/superant.com.schedule/viewrwdschedulesconfiguration.rb +21 -0
  84. data/code/zz0applicationend/zz0end.rb +2 -1
  85. data/configuration/rwdtinker.dist +15 -0
  86. data/configuration/rwdwschedule.dist +28 -0
  87. data/configuration/tinkerwin2variables.dist +23 -0
  88. data/gui/00coreguibegin/applicationguitop.rwd +9 -0
  89. data/gui/frontwindow0/cc0openphoto.rwd +22 -0
  90. data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
  91. data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
  92. data/gui/{lz1selectiontabend/endselectiontab.rwd → frontwindowselections/wwselectionend.rwd} +0 -0
  93. data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
  94. data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
  95. data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
  96. data/gui/{wz6finaltabs/xx0rwdfirsttab.rwd → helpaboutbegin/zzzrwdlasttab.rwd} +0 -0
  97. data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
  98. data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
  99. data/gui/{yy5helpaboutend → helpaboutzend}/helpscreenend.rwd +0 -0
  100. data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
  101. data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
  102. data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
  103. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/1appname.rwd +5 -0
  104. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/20downloadftp.rwd +45 -0
  105. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/67viewconfiguration.rwd +29 -0
  106. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/70rwddiagnostics.rwd +16 -0
  107. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m01menubegin.rwd +18 -0
  108. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/zvbackend.rwd +6 -0
  109. data/gui/tinkerbackwindows/superant.com.rwdschedules/1appname.rwd +5 -0
  110. data/gui/{gg0schedules → tinkerbackwindows/superant.com.rwdschedules}/gg0viewevent.rwd +27 -27
  111. data/gui/tinkerbackwindows/superant.com.rwdschedules/gl6editrecord.rwd +56 -0
  112. data/gui/{gg0schedules → tinkerbackwindows/superant.com.rwdschedules}/gl8contactutilities.rwd +25 -24
  113. data/gui/tinkerbackwindows/superant.com.rwdschedules/hl9calendar.rwd +27 -0
  114. data/gui/tinkerbackwindows/superant.com.rwdschedules/m01menubegin.rwd +18 -0
  115. data/gui/tinkerbackwindows/superant.com.rwdschedules/zvbackend.rwd +6 -0
  116. data/gui/tinkerbackwindows/superant.com.rwdschedulesback/1appname.rwd +5 -0
  117. data/gui/tinkerbackwindows/superant.com.rwdschedulesback/30viewevent.rwd +27 -0
  118. data/gui/tinkerbackwindows/superant.com.rwdschedulesback/40editrecord.rwd +49 -0
  119. data/gui/tinkerbackwindows/superant.com.rwdschedulesback/60eventicsutilities.rwd +25 -0
  120. data/gui/tinkerbackwindows/superant.com.rwdschedulesback/m01menubegin.rwd +18 -0
  121. data/gui/tinkerbackwindows/superant.com.rwdschedulesback/zvbackend.rwd +6 -0
  122. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
  123. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
  124. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  125. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
  126. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
  127. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
  128. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdlogfile.rwd +20 -0
  129. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
  130. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
  131. data/gui/{xb1rwdtinkerbackwindow → tinkerbackwindows/superant.com.tinkerbackwindow}/9backend.rwd +0 -0
  132. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
  133. data/gui/{xa5rwdtinkercallablewindow → tinkerbackwindows/superant.com.tinkerhelpwindow}/9end.rwd +0 -0
  134. data/gui/{xa1versionwindow → tinkerbackwindows/superant.com.versionwindow}/1appname.rwd +2 -2
  135. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
  136. data/gui/{za1applicationend → zzcoreguiend}/yy9rwdend.rwd +0 -0
  137. data/init.rb +144 -198
  138. data/installed/rwdscheduledate2.inf +6 -0
  139. data/installed/rwdwschedule.inf +20 -0
  140. data/{lib → installed}/temp.rb +0 -0
  141. data/lang/en/rwdcalendar/en.po +32 -0
  142. data/lang/en/rwdcore/en.po +197 -0
  143. data/lang/es/rwdcalendar/es.po +10 -0
  144. data/lang/es/rwdcore/es.po +184 -0
  145. data/lang/fr/rwdcalendar/fr.po +11 -0
  146. data/lang/fr/rwdcore/fr.po +169 -0
  147. data/lang/hi/rwdcalendar/hi.po +11 -0
  148. data/lang/hi/rwdcore/hi.po +173 -0
  149. data/lang/ja/rwdcalendar/ja.po +11 -0
  150. data/lang/ja/rwdcore/ja.po +171 -0
  151. data/lang/nl/rwdcalendar/nl.po +12 -0
  152. data/lang/nl/rwdcore/nl.po +169 -0
  153. data/{extras → lib}/cal.rb +158 -166
  154. data/lib/icalendar/base.rb +17 -0
  155. data/lib/icalendar/calendar.rb +44 -0
  156. data/lib/icalendar/calendar_parser.rb +237 -0
  157. data/lib/icalendar/component/alarm.rb +16 -0
  158. data/lib/icalendar/component/event.rb +25 -0
  159. data/lib/icalendar/component/freebusy.rb +12 -0
  160. data/lib/icalendar/component/journal.rb +25 -0
  161. data/lib/icalendar/component/timezone.rb +26 -0
  162. data/lib/icalendar/component/todo.rb +21 -0
  163. data/lib/icalendar/component.rb +91 -0
  164. data/lib/icalendar/helpers.rb +103 -0
  165. data/lib/icalendar/parameter.rb +25 -0
  166. data/lib/icalendar.rb +18 -0
  167. data/lib/rconftool.rb +387 -0
  168. data/{ev → lib/rwd}/browser.rb +26 -12
  169. data/{ev → lib/rwd}/ftools.rb +23 -19
  170. data/lib/rwd/mime.rb +328 -0
  171. data/{ev → lib/rwd}/net.rb +172 -45
  172. data/{ev → lib/rwd}/ruby.rb +97 -27
  173. data/{ev → lib/rwd}/rwd.rb +245 -668
  174. data/{ev → lib/rwd}/sgml.rb +2 -2
  175. data/{ev → lib/rwd}/thread.rb +1 -1
  176. data/{ev → lib/rwd}/tree.rb +35 -7
  177. data/lib/rwd/xml.rb +101 -0
  178. data/lib/rwdthemes/default.rwd +317 -0
  179. data/lib/rwdthemes/pda.rwd +72 -0
  180. data/lib/rwdthemes/windowslike.rwd +171 -0
  181. data/lib/rwdtinker/rwdcodedir.rb +56 -0
  182. data/lib/rwdtinker/rwdguidir.rb +57 -0
  183. data/lib/rwdtinker/rwdlangdir.rb +60 -0
  184. data/lib/rwdtinker/rwdtinkertools.rb +25 -0
  185. data/lib/zip/ioextras.rb +155 -0
  186. data/lib/zip/stdrubyext.rb +111 -0
  187. data/lib/zip/tempfile_bugfixed.rb +195 -0
  188. data/lib/zip/zip.rb +1847 -0
  189. data/lib/zip/zipfilesystem.rb +609 -0
  190. data/lib/zip/ziprequire.rb +90 -0
  191. data/rwd_files/HowTo_Schedule.txt +259 -82
  192. data/rwd_files/HowTo_Tinker.txt +274 -35
  193. data/rwd_files/{rwdindex.html → RubyWebDialogs.html} +0 -0
  194. data/rwd_files/Tinkerhelptexthash.txt +84 -0
  195. data/rwd_files/log/rwdtinker.log +2 -0
  196. data/rwd_files/rwdapplications.html +23 -1
  197. data/rwd_files/rwdschedulehelpfiles.txt +19 -0
  198. data/rwd_files/schedules/20050120T09.ics +9 -0
  199. data/rwd_files/schedules/200505may02a.sch +4 -0
  200. data/rwd_files/schedules/Enterprise.ics +411 -0
  201. data/rwd_files/schedules/US Holidays.ics +575 -0
  202. data/rwd_files/schedules/archive/sample.archive +1 -0
  203. data/rwd_files/schedules/testics05.ics +11 -0
  204. data/rwd_files/tinker.png +0 -0
  205. data/rwdconfig.dist +24 -0
  206. data/rwdschedule.rb +1 -0
  207. data/tests/RubyGauge.rb +179 -0
  208. data/tests/checkdepends.sh +4 -0
  209. data/tests/cleancnf.sh +6 -0
  210. data/tests/makedist-rwdwhypernote.rb +56 -0
  211. data/tests/makedist.rb +66 -0
  212. data/tests/rdep.rb +354 -0
  213. data/updates/temp.rb +1 -0
  214. data/zips/rwdwcalc-0.63.zip +0 -0
  215. data/zips/rwdwfoldeditor-0.07.zip +0 -0
  216. data/zips/rwdwhypernote-0.16.zip +0 -0
  217. data/zips/rwdwmovies-0.98.zip +0 -0
  218. data/zips/rwdwruby-1.08.zip +0 -0
  219. data/zips/rwdwschedule-1.07.zip +0 -0
  220. data/zips/temp.rb +1 -0
  221. data/zips/tinkerbellw-0.04.zip +0 -0
  222. data/zips/wrubyslippers-1.08.zip +0 -0
  223. metadata +279 -139
  224. data/code/ag1core/aa0begin.rb +0 -18
  225. data/code/ag1core/rwdtinkerversion.rb +0 -15
  226. data/code/gg0schedules/gl7clearscreendisplay.rb +0 -15
  227. data/code/gg0schedules/gm3deletecontactrecord.rb +0 -24
  228. data/code/gg0schedules/rwdaddresseshelpabout.rb +0 -14
  229. data/code/gg0schedules/rwdschedulehelpabout.rb +0 -14
  230. data/code/gh9calendar/gh9calendar.rb +0 -16
  231. data/code/xa5rwdtinkercallable/callable.rb +0 -13
  232. data/code/xb1rwdtinkerbackwindow/05listinstalledfiles.rb +0 -11
  233. data/code/xb1rwdtinkerbackwindow/diagnostictab.rb +0 -21
  234. data/code/xb1rwdtinkerbackwindow/ll1openname.rb +0 -18
  235. data/code/xb1rwdtinkerbackwindow/ll5listzips.rb +0 -14
  236. data/code/xb1rwdtinkerbackwindow/lm1installapplet.rb +0 -20
  237. data/code/xb1rwdtinkerbackwindow/mm1removeapplet.rb +0 -28
  238. data/code/xb1rwdtinkerbackwindow/rwdtinkerwin2version.rb +0 -14
  239. data/configuration/aa0rwdframework.cnf +0 -13
  240. data/configuration/ab1tinkerwin2.cnf +0 -4
  241. data/configuration/gg1rwdschedule.cnf +0 -3
  242. data/configuration/gh1rwdcalendar.cnf +0 -27
  243. data/ev/xml.rb +0 -4
  244. data/gui/aa2core/aa0rwdtop.rwd +0 -4
  245. data/gui/gg0schedules/gl6editrecord.rwd +0 -36
  246. data/gui/hl9calendar/hl9calendar.rwd +0 -20
  247. data/gui/ll1selectiontabbegin/selectiontabbegin.rwd +0 -16
  248. data/gui/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +0 -12
  249. data/gui/tt0documentsbegin/tt0documentbegin.rwd +0 -6
  250. data/gui/uu5rwddocuments/uu5documents.rwd +0 -15
  251. data/gui/uu6rwdtinkerwin2documents/uu5documents.rwd +0 -6
  252. data/gui/uu8schedule/uu8doc_rwdschedule.rwd +0 -5
  253. data/gui/ww0documentsend/ww0documentend.rwd +0 -7
  254. data/gui/xa5rwdtinkercallablewindow/1appname.rwd +0 -17
  255. data/gui/xb1rwdtinkerbackwindow/1appname.rwd +0 -5
  256. data/gui/xb1rwdtinkerbackwindow/2tab1.rwd +0 -11
  257. data/gui/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +0 -33
  258. data/gui/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +0 -44
  259. data/gui/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +0 -35
  260. data/gui/ya1helpaboutbegin/ya0helpscreenstart.rwd +0 -3
  261. data/gui/yg5rwdhelpabout/1appname.rwd +0 -4
  262. data/gui/yg5rwdhelpabout/3copyright.rwd +0 -3
  263. data/gui/yg5rwdhelpabout/5version.rwd +0 -10
  264. data/gui/yg6rwdwin2helpabout/1appname.rwd +0 -4
  265. data/gui/yg6rwdwin2helpabout/3copyright.rwd +0 -3
  266. data/gui/yg6rwdwin2helpabout/5version.rwd +0 -10
  267. data/gui/yh1helpschedule/1rwdschedule.rwd +0 -6
  268. data/gui/yh1helpschedule/5version.rwd +0 -9
  269. data/installed/rwdcalendar-0.4.inf +0 -6
  270. data/installed/rwdschedule-0.5.inf +0 -7
  271. data/installed/rwdtinkerwin2-0.5.inf +0 -8
  272. data/installed/schedulesampledata1.inf +0 -3
  273. data/lang/alanguagehashbegin.rb +0 -4
  274. data/lang/en/rwdcore/languagefile.rb +0 -7
  275. data/lang/es/rwdcore/languagefile.rb +0 -3
  276. data/lang/languagehash.rb +0 -4
  277. data/lang/nl/rwdcore/languagefile.rb +0 -4
  278. data/lang/templangfile.rb +0 -7
  279. data/lang/vlanguagehashend.rb +0 -6
  280. data/lang/wlocallangstart.rb +0 -5
  281. data/lang/xlocallangfile.rb +0 -7
  282. data/lang/zlocallangend.rb +0 -2
  283. data/rwd_files/HowTo_Shell.txt +0 -97
  284. data/schedules/200501january23CharlotteB-Day.sch +0 -8
  285. data/schedules/200501january24jazzfuller.sch +0 -8
  286. data/tests/rubyslippers-0.92.gemspec +0 -17
  287. data/tests/rwdtinker-1.2.gemspec +0 -17
  288. data/tests/rwdtinkertestEN.rb +0 -87
  289. data/tests/temptest.out +0 -18
  290. data/zips/rwdhelloworld-0.3.zip +0 -0
  291. data/zips/rwdwshell-0.91.zip +0 -0
  292. data/zips/wrubyslippers-0.93.zip +0 -0
@@ -0,0 +1,179 @@
1
+ #--------------------------------------------------------------------#
2
+ # #
3
+ # RubyGauge version 1 #
4
+ # Copyright (c) 2005, Harrison Ainsworth. #
5
+ # #
6
+ # http://hxa7241.org/ #
7
+ # #
8
+ #--------------------------------------------------------------------#
9
+
10
+
11
+
12
+
13
+ require 'find'
14
+
15
+
16
+
17
+
18
+ # Counts lines of code in ruby source files.
19
+ #
20
+ # just a simple example ruby program, produced as an exercise.
21
+ #
22
+ # * directories are looked in recursively for source files
23
+ # * source files with the following name extensions are recognized:
24
+ # .rb .rbw
25
+ # * a line is counted as code if it is not empty and not solely comment
26
+ #
27
+ # == requirements
28
+ # ruby 1.8
29
+ #
30
+ # == usage
31
+ # RubyGauge.rb [-f...] (file|directory)pathname ...
32
+ # RubyGauge.rb -help|-?
33
+ #
34
+ # switches:
35
+ # -f<[l|s][1|2]> set output format to long/short, linecount only /
36
+ # linecount and filecount (defaults to -fl2)
37
+ # -help|-? prints this message
38
+ #
39
+ # ==acknowledgements
40
+ # * ruby: http://ruby-lang.org/
41
+ # * the pragmaticprogrammers pickaxe book:
42
+ # http://phrogz.net/ProgrammingRuby/
43
+ # * rubygarden: http://rubygarden.org/ruby?CodingInRuby
44
+ #
45
+ # == license
46
+ # this software is too short and insignificant to have a license.
47
+
48
+ module RubyGauge
49
+
50
+ # Entry point if run from the command line.
51
+ #
52
+ # Reads command line args, writes output to stdout.
53
+ #
54
+ def RubyGauge.main
55
+
56
+ # check if help message needed
57
+ if $*.empty? || !(RubyGauge.getSwitchs( $*, '(help|\?)' ).empty?)
58
+
59
+ puts "\n#{@@BANNER}\n#{@@HELP}"
60
+
61
+ else
62
+
63
+ # count
64
+ pathnames = RubyGauge.getTokens( $*, '^[^-\/]', ' ' )
65
+
66
+ fileCount = []
67
+ lineCount = RubyGauge.countLinesInFileTree( pathnames, fileCount )
68
+
69
+ # output counts
70
+ format = RubyGauge.getSwitchs( $*, 'f', '-fl2' ).last[2,2]
71
+
72
+ (@@LINES_FORMAT = { 's' => "#{lineCount}" }).default = "\n #{lineCount} line#{lineCount == 1 ? '' : 's'} of code\n"
73
+ (@@FILES_FORMAT = { 's' => " #{fileCount}" }).default = " #{fileCount[0]} file#{fileCount[0] == 1 ? '' : 's'}\n"
74
+ print @@LINES_FORMAT[format[0,1]]
75
+ print @@FILES_FORMAT[format[0,1]] unless format[1,1] == '1'
76
+
77
+ end
78
+
79
+ end
80
+
81
+
82
+ def RubyGauge.getSwitchs( commandline, pattern, default=nil )
83
+
84
+ RubyGauge.getTokens( commandline, '^(-|\/)' + pattern, default )
85
+
86
+ end
87
+
88
+
89
+ def RubyGauge.getTokens( commandline, pattern, default=nil )
90
+
91
+ tokens = []
92
+
93
+ commandline.each do |token|
94
+ if token =~ /#{pattern}/
95
+ tokens.push token
96
+ end
97
+ end
98
+
99
+ if tokens.empty? && default
100
+ tokens.push default
101
+ end
102
+
103
+ tokens
104
+
105
+ end
106
+
107
+
108
+ # Counts lines of ruby code in filetree recursively.
109
+ #
110
+ # A line is counted as code if it is not empty and not solely comment.
111
+ #
112
+ # == parameters
113
+ # * pathnames: Array of String of file or directory pathname
114
+ # (relative or absolute)
115
+ # * fileCount: Array of Numeric, length 1. Just an example of a
116
+ # 'reference' parameter
117
+ # * return: Fixnum of the line count
118
+ #
119
+ def RubyGauge.countLinesInFileTree( pathnames, fileCount=[] )
120
+
121
+ fileCount[0] = 0
122
+ lineCount = 0
123
+
124
+ # scan directory tree
125
+ Find.find( *pathnames ) do |fileOrDirName|
126
+
127
+ # filter file types (to ruby)
128
+ if FileTest.file?( fileOrDirName ) &&
129
+ FileTest.readable?( fileOrDirName ) &&
130
+ fileOrDirName =~ /\.(rb|rbw)\Z/
131
+
132
+ fileCount[0] += 1
133
+
134
+ filePathname = File.expand_path( fileOrDirName )
135
+
136
+ # read file
137
+ File.open( filePathname, 'r' ) do |file|
138
+
139
+ # scan file lines
140
+ file.each_line do |line|
141
+ # select non blank, non comment-only line
142
+ unless line =~ /^\s*(#|\Z)/
143
+ lineCount += 1
144
+ end
145
+ end
146
+
147
+ end
148
+
149
+ end
150
+ end
151
+
152
+ lineCount
153
+
154
+ end
155
+
156
+
157
+ @@BANNER = "-------------------------------------------------------------\n" +
158
+ "RubyGauge 2005 (v1)\n" +
159
+ "Copyright (c) 2005, Harrison Ainsworth.\n\n" +
160
+ "http://hxa7241.org/\n" +
161
+ "-------------------------------------------------------------\n"
162
+
163
+ @@HELP = "RubyGauge counts lines of code in ruby source files.\n\n" +
164
+ "* directories are looked in recursively for source files\n" +
165
+ "* source files with the following name extensions are recognized: .rb .rbw\n" +
166
+ "* a line is counted as code if it is not empty and not solely comment\n" +
167
+ "\nusage:\n" +
168
+ " RubyGauge.rb [-f...] (file|directory)pathname ...\n" +
169
+ " RubyGauge.rb -help|-?\n" +
170
+ "\nswitches:\n" +
171
+ " -f<[l|s][1|2]> set output format to long/short, linecount only / linecount and filecount (defaults to -fl2)\n" +
172
+ " -help|-? prints this message\n"
173
+
174
+ end
175
+
176
+
177
+
178
+
179
+ RubyGauge.main
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ ruby rdep.rb ../*.rb
3
+ echo "checking installapplet.rb"
4
+ ruby rdep.rb ../code/superant.com.rwdtinkerbackwindow/installapplet.rb
data/tests/cleancnf.sh ADDED
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+ rm *.cnf
3
+ rm *.bak
4
+ rm configuration/*.cnf
5
+ rm configuration/*.bak
6
+ rm *.gem
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/ruby -w
2
+ #***********************************************************************
3
+ #* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
4
+ #* Copyright (c) 2004, 2005 by Steven Gibson. All Rights Reserved.
5
+ #* at "steven@superant.com".
6
+ #***********************************************************************/
7
+ $progdir =""
8
+ $tinkerhelpaboutarray = [""]
9
+ $tinkerdocumentsarray = [""]
10
+ $testharnessarray = [""]
11
+ $rwdjumplink = [""]
12
+ JumpLink = Hash.new("default")
13
+ require 'fileutils'
14
+ DistroName = "rwdwschedule"
15
+ DistroVersion="1.07"
16
+ load "configuration/#{DistroName}.dist"
17
+
18
+
19
+ DistroTitle="#{DistroName}-#{DistroVersion}"
20
+
21
+
22
+
23
+ $progdir = File::expand_path( File.dirname(__FILE__))
24
+ results = " "
25
+
26
+ puts "creating #{DistroName} distribution files version #{DistroVersion}"
27
+
28
+ #puts "moving up one directory"
29
+ #Dir.chdir("..")
30
+
31
+
32
+ FileUtils.rm_rf("#{DistroTitle}.zip")
33
+ zipcreatecmd = "zip -r #{DistroTitle}.zip *"
34
+ puts "#{zipcreatecmd}"
35
+ `#{zipcreatecmd}`
36
+
37
+ gemspecfilename = "rwdzip#{DistroTitle}.gemspec"
38
+ tobject = Time.now
39
+ year = tobject.year.to_s
40
+ month = tobject.mon.to_s
41
+ daydate = tobject.day.to_s
42
+
43
+ fd = File.open(gemspecfilename,"w")
44
+ fd.print("Gem::Specification.new do |s|\n")
45
+ fd.print(" s.name = %q{rwdzip#{DistroName}}\n")
46
+ fd.print(" s.version = \"#{DistroVersion}\"\n")
47
+ fd.print(" s.date = %q{#{year}-#{month}-#{daydate}}")
48
+ load "tests/gemspec-#{DistroName}"
49
+ fd.print($gemspecvar)
50
+ fd.close
51
+
52
+ ListingCommand = "ls -1 -s -h rwdzip#{DistroTitle}*"
53
+
54
+ puts `#{ListingCommand}`
55
+
56
+ print "Build finished\n"
data/tests/makedist.rb ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/ruby -w
2
+ #***********************************************************************
3
+ #* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
4
+ #* Copyright (c) 2004, 2005 by Steven Gibson. All Rights Reserved.
5
+ #* at "steven@superant.com".
6
+ #***********************************************************************/
7
+ $progdir =""
8
+ $tinkerhelpaboutarray = [""]
9
+ $tinkerdocumentsarray = [""]
10
+ $testharnessarray = [""]
11
+ $rwdjumplink = [""]
12
+ JumpLink = Hash.new("default")
13
+ require 'fileutils'
14
+
15
+ DistroName = "rwdwschedule"
16
+
17
+ DistroVersion="0.07"
18
+
19
+ DistroTitle="#{DistroName}.dist"
20
+ load "configuration/#{DistroTitle}"
21
+ DistroName = "rwdschedule"
22
+ DistroTitle = "#{DistroName}-#{DistroVersion}"
23
+
24
+
25
+ $progdir = File::expand_path( File.dirname(__FILE__))
26
+ results = " "
27
+
28
+ puts "creating #{DistroName} distribution files version #{DistroVersion}"
29
+ puts "cleaning conf files"
30
+ `tests/cleancnf.sh`
31
+ puts "moving up one directory"
32
+ Dir.chdir("..")
33
+
34
+
35
+
36
+ FileUtils.rm_rf("#{DistroTitle}.zip")
37
+ zipcreatecmd = "zip -r #{DistroTitle}.zip #{DistroName}"
38
+ puts "#{zipcreatecmd}"
39
+ `#{zipcreatecmd}`
40
+ tarcreatecmd = "tar --gzip -cf #{DistroTitle}.tar.gz #{DistroName}"
41
+ puts "#{tarcreatecmd}"
42
+ `#{tarcreatecmd}`
43
+ tarcreatecmd2 = "tar --bzip2 -cf #{DistroTitle}.tar.bz2 #{DistroName}"
44
+ puts "#{tarcreatecmd2}"
45
+ `#{tarcreatecmd2}`
46
+
47
+ gemspecfilename = "#{DistroTitle}.gemspec"
48
+ tobject = Time.now
49
+ year = tobject.year.to_s
50
+ month = tobject.mon.to_s
51
+ daydate = tobject.day.to_s
52
+
53
+ fd = File.open(gemspecfilename,"w")
54
+ fd.print("Gem::Specification.new do |s|\n")
55
+ fd.print(" s.name = %q{#{DistroName}}\n")
56
+ fd.print(" s.version = \"#{DistroVersion}\"\n")
57
+ fd.print(" s.date = %q{#{year}-#{month}-#{daydate}}")
58
+ load "#{DistroName}/tests/gemspec"
59
+ fd.print($gemspecvar)
60
+ fd.close
61
+
62
+ ListingCommand = "ls -1 -s -h #{DistroTitle}*"
63
+
64
+ puts `#{ListingCommand}`
65
+
66
+ print "Build finished\n"
data/tests/rdep.rb ADDED
@@ -0,0 +1,354 @@
1
+ =begin
2
+
3
+ rdep - The Ruby Dependency Tool
4
+ Version 1.4
5
+
6
+ Hal E. Fulton
7
+ 2 November 2002
8
+ Ruby's license
9
+
10
+ Purpose
11
+
12
+ Determine the library files on which a specified Ruby file is dependent
13
+ (and their location and availability).
14
+
15
+ Usage notes
16
+
17
+ Usage: ruby rdep.rb sourcefile
18
+
19
+ The sourcefile may or may not have a .rb extension.
20
+
21
+ The directories in the $: array (which includes the RUBYLIB environment
22
+ variable) are searched first. File extensions are currently searched for
23
+ in this order: no extension, .rb, .o, .so, .dll (this may not be correct).
24
+
25
+ If there are no detected dependencies, the program will give the
26
+ message, "No dependencies found."
27
+
28
+ If the program finds [auto]load and require statements that it can
29
+ understand, it searches for the specified files. Any recognized Ruby
30
+ source files (*.rb) are processed recursively in the same way. No attempt
31
+ is made to open the files that appear to be binary.
32
+
33
+ The program will print up to four lists (any or all may be omitted):
34
+ 1. A list of files it found by going through RUBYLIB.;
35
+ 2. A list of files found under the searchroot (or under '.');
36
+ 3. A list of directories under searchroot which should perhaps be
37
+ added to RUBYLIB; and
38
+ 4. A list of files (without extensions) which could not be found.
39
+
40
+ If there were unparseable [auto]load or require statements, a warning
41
+ will be issued.
42
+
43
+ Between lists 3 and 4, the program will give an opinion about the overall
44
+ situation. The worst case is that files were not found; the uncertain
45
+ case is when there were unparseable statements; and the best case is
46
+ when all files could be found (lists 1 and 2).
47
+
48
+ Exit codes
49
+
50
+ 0 - Usage or successful execution
51
+ 1 - Nonexistent sourcefile specified
52
+ 2 - Improper sourcefile (pipe, special file, ...)
53
+ 3 - Some kind of problem reading a file
54
+
55
+ Limitations
56
+
57
+ Requires Ruby 1.6.0 or higher
58
+ No recursion on binaries
59
+ Can't look at dynamically built names
60
+ Can't detect "tested" requires (e.g.: flag = require "foo.rb")
61
+ [auto]load/require can be preceded only by whitespace on the line
62
+ Only recognizes simple strings ("file" or 'file')
63
+ Does not recognized named constants (e.g.: require MyFile)
64
+ Assumes every directory entry is either a file or subdirectory
65
+ Does not handle the Windows variable RUBYLIB_PREFIX
66
+ May be SLOW if a directory structure is deep (especially
67
+ on Windows with 1.6.x)
68
+
69
+ Known bugs:
70
+
71
+ Logic may be incorrect in terms of search order, file extensions, etc.
72
+ Injected a bug in 1.3: In rare cases will recurse until stack overflow
73
+
74
+ Revision history
75
+
76
+ Version 1.0 - 13 October 2000 - Initial release
77
+ Version 1.1 - 10 July 2001 - Bug fixes
78
+ Version 1.2 - 15 August 2002 - Works correctly on Win98
79
+ Version 1.3 - 21 October 2002 - Removed globals; removed search root;
80
+ added $: instead of RUBYLIB; etc.
81
+ Version 1.4 - 2 November 2002 - Fixed autoload recursion bug
82
+
83
+ To-do list
84
+
85
+ Possibly change extension search order?
86
+ Possibly add extensions to list?
87
+ Are explicit extensions allowed other than .rb?
88
+ Is a null extension really legal?
89
+ Additional tests/safeguards? (file permissions, non-empty files,...)
90
+ Change inconsistent expansion of tilde, dot, etc.?
91
+ Make it smarter somehow??
92
+
93
+ =end
94
+
95
+ #
96
+ # File.doc_skip - iterator to skip embedded docs in Ruby input file
97
+ #
98
+
99
+ class File
100
+
101
+ def doc_skip
102
+ loop do
103
+ str = gets
104
+ break if not str
105
+ if str =~ /^=begin([ \t]|$)/
106
+ loop do
107
+ str = gets
108
+ break if not str
109
+ break if str =~ /^=end([ \t]|$)/
110
+ end
111
+ else
112
+ yield str
113
+ end
114
+ end
115
+ end
116
+
117
+ end
118
+
119
+ class Dependency
120
+
121
+ #
122
+ # unquote - Find the value of a string. Called from scan.
123
+ #
124
+
125
+ def unquote(str)
126
+ # Still more kludgy code.
127
+ return nil if str == nil
128
+ if [?', ?"].include? str[0] # ' Unconfuse gvim
129
+ str = str[1..-2]
130
+ else
131
+ ""
132
+ end
133
+ end
134
+
135
+ #
136
+ # scan - Scans a line and returns the filename from a load or require
137
+ # statement. Returns null string if there was a parsing problem.
138
+ # Returns nil if this is not a load or require.
139
+ #
140
+
141
+ def scan(line)
142
+ line.strip!
143
+ if line =~ /^load/ or line =~ /^auto/ or line =~ /^require/
144
+ @has_dep = true # At least one dependency found.
145
+ # Kludge!!
146
+ junk = %w[ require load autoload ( ) , ] + [""]
147
+ temp = line.split(/[ \t\(\),]/) - junk
148
+ if temp[2] and temp[2][0].chr =~ /[#;]/ # Comments, semi...
149
+ temp = temp[0..1]
150
+ end
151
+ if temp[-1] =~ /\#\{/ # #{} means trouble
152
+ str = ""
153
+ else
154
+ str = unquote(temp[-1]) # May return nil.
155
+ end
156
+ str
157
+ else
158
+ nil
159
+ end
160
+ end
161
+
162
+ #
163
+ # find_files - The heart of the program. Search for files using $:
164
+ #
165
+
166
+ def find_files(source)
167
+ # loadable - This file or some variant can be found in one of the
168
+ # directories in $:
169
+ loadable = false
170
+
171
+ files = [] # Save a list of load/require files.
172
+ found = [] # Save a list of files found (.rb only for now)
173
+
174
+ # Open the file, strip embedded docs, and look for load/require statements.
175
+
176
+ begin
177
+ File.open(source).doc_skip {|line| files << scan(line)}
178
+ rescue => err
179
+ puts "Problem processing file #{source}: #{err}"
180
+ caller.each {|x| puts " #{x}"}
181
+ exit 3
182
+ end
183
+
184
+ # If no dependencies, don't bother searching!
185
+ if ! @has_dep
186
+ puts "No dependencies found."
187
+ exit 0
188
+ end
189
+
190
+ files.compact!
191
+ catch(:skip) do
192
+ for file in files
193
+
194
+ if file == "" # Warning
195
+ @warnfiles << source
196
+ next
197
+ end
198
+
199
+ throw :skip if (@inpath.include? file) || (@cantfind.include? file)
200
+
201
+ if file =~ /\.rb$/ then # Don't add suffix to *.rb
202
+ suffixes = [""] # Hmm... .rbw?? Probably not needed.
203
+ else
204
+ suffixes = @suffixes # Use any suffix (extension)
205
+ end
206
+
207
+ # Look through search path (@search_path)
208
+
209
+ for dir in @search_path
210
+
211
+ for suf in suffixes
212
+ filename = dir + file + suf
213
+ loadable = test ?e, filename
214
+ break if loadable
215
+ end
216
+
217
+ if loadable
218
+ @inpath << filename # Files we found in RUBYLIB
219
+ # Add to 'found' if it's a source file (so we can recurse)
220
+ found << filename if filename =~ /\.rb$/
221
+ break
222
+ end
223
+
224
+ end
225
+
226
+ @cantfind << file if !loadable
227
+ end
228
+ end
229
+
230
+ found.uniq!
231
+ found.compact!
232
+ list = found
233
+ found.each {|x| list += find_files(x)}
234
+
235
+ list
236
+ end
237
+
238
+ #
239
+ # print_list - Print a header message followed by a list of files
240
+ # or directories.
241
+ #
242
+
243
+ def print_list(header, list)
244
+ return if list.empty?
245
+ puts header + "\n\n" # Extra newlines
246
+ list.each {|x| puts " #{x}"}
247
+ puts "\n" # Extra newline
248
+ end
249
+
250
+ SEP = File::Separator
251
+ DIRSEP = if SEP=="/" then ":" else ";" end
252
+
253
+ def execute
254
+ @has_dep = false
255
+ @warnfiles = []
256
+ @newdirs = []
257
+ @inpath = []
258
+ @cantfind = []
259
+ @suffixes = [""] + %w[ .rb .o .so .dll ]
260
+ @rdirs = []
261
+ @global_found = []
262
+
263
+ # No parameters? Usage message
264
+
265
+ if not ARGV[0]
266
+ puts "Usage: ruby rdep.rb sourcefile [searchroot]"
267
+ exit 0
268
+ end
269
+
270
+ # Does sourcefile exist?
271
+
272
+ if ! test ?e, ARGV[0]
273
+ puts "#{ARGV[0]} does not exist."
274
+ exit 1
275
+ end
276
+
277
+ # Is sourcefile a "real" file?
278
+
279
+ if ! test ?f, ARGV[0]
280
+ puts "#{ARGV[0]} is not a regular file."
281
+ exit 2
282
+ end
283
+
284
+ # Be sure to search under the dir where the
285
+ # program lives...
286
+
287
+ @proghome = File.dirname(File.expand_path(ARGV[0]))
288
+ if @proghome != File.expand_path(".")
289
+ $: << @proghome
290
+ end
291
+
292
+ # Get list of dirs in $:
293
+
294
+ @search_path = $:
295
+ @search_path.collect! {|x| x[-1] == SEP ? x : x + SEP }
296
+
297
+ # All real work happens here -- big recursive find
298
+
299
+ find_files(ARGV[0])
300
+
301
+ @warnfiles.uniq!
302
+ @cantfind.uniq!
303
+ @newdirs.uniq!
304
+ @inpath.map! {|x| File.expand_path(x)}
305
+ @inpath.uniq!
306
+
307
+ #
308
+ # Now, what are all the results? Report to user.
309
+ #
310
+
311
+ if @inpath[0]
312
+ print_list("Found in search path:", @inpath)
313
+ if ! @cantfind.empty? && @warnfiles.empty?
314
+ puts "This will probably be sufficient.\n"
315
+ end
316
+ end
317
+
318
+ # Did we use any dirs under the "home"?
319
+
320
+ homedirs = @inpath.find_all {|x| x =~ Regexp.new("^"+@proghome)}
321
+ if homedirs[0] # not empty
322
+ homedirs.map! {|x| File.dirname(x) }.uniq!
323
+ puts "Consider adding these directories to RUBYPATH:\n\n"
324
+ homedirs.each {|x| puts " #{x}" }
325
+ puts
326
+ if @warnfiles[0] and homedirs == [] # There are unparseable statements.
327
+ puts "This will probably NOT be sufficient. See below.\n\n"
328
+ end
329
+ end
330
+
331
+ # What's our opinion?
332
+
333
+ if @cantfind[0] # There are unknown files.
334
+ puts "This will probably NOT be sufficient. See below.\n\n"
335
+ elsif @warnfiles[0] and homedirs == [] # There are unparseable statements.
336
+ puts "Files may still be missing. See below.\n\n"
337
+ else # We think everything is OK.
338
+ puts "This will probably be sufficient."
339
+ end
340
+
341
+ # Report unknown files
342
+ print_list("Not located anywhere:", @cantfind)
343
+
344
+ # Print warning about load/require strings we couldn't understand
345
+ print_list("Warning: Unparseable usages of 'load' or 'require' in:",
346
+ @warnfiles)
347
+ end
348
+
349
+ end
350
+
351
+ Dependency.new.execute
352
+
353
+ exit 0
354
+
data/updates/temp.rb ADDED
@@ -0,0 +1 @@
1
+ # this file does nothing
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/zips/temp.rb ADDED
@@ -0,0 +1 @@
1
+ # this file does nothing
Binary file
Binary file