ribit 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (650) hide show
  1. data/INSTALL +52 -0
  2. data/LICENSE +343 -0
  3. data/README +42 -0
  4. data/bin/ribit +26 -0
  5. data/bin/ribit-setup +153 -0
  6. data/bin/ribitd +18 -0
  7. data/doc/TODO.txt +207 -0
  8. data/doc/devdiary.txt +258 -0
  9. data/doc/diagrams/content-classes.dia +0 -0
  10. data/doc/diagrams/main-classes.dia +0 -0
  11. data/doc/diagrams/page-rendering-classes.dia +0 -0
  12. data/doc/diagrams/ribitservlet-classes.dia +0 -0
  13. data/doc/examples/xhtml-example.html +64 -0
  14. data/doc/notes.txt +7 -0
  15. data/doc/rdoc/classes/ActionAdapter.html +137 -0
  16. data/doc/rdoc/classes/ActionAdapter.src/M000160.html +26 -0
  17. data/doc/rdoc/classes/ActionElement.html +179 -0
  18. data/doc/rdoc/classes/ActionElement.src/M000204.html +19 -0
  19. data/doc/rdoc/classes/ActionElement.src/M000205.html +18 -0
  20. data/doc/rdoc/classes/ActionManager.html +187 -0
  21. data/doc/rdoc/classes/ActionManager.src/M000237.html +19 -0
  22. data/doc/rdoc/classes/ActionManager.src/M000238.html +22 -0
  23. data/doc/rdoc/classes/ActionManager.src/M000239.html +22 -0
  24. data/doc/rdoc/classes/ActionManager.src/M000240.html +23 -0
  25. data/doc/rdoc/classes/Assert.html +229 -0
  26. data/doc/rdoc/classes/Assert.src/M000369.html +20 -0
  27. data/doc/rdoc/classes/Assert.src/M000370.html +18 -0
  28. data/doc/rdoc/classes/Assert.src/M000371.html +20 -0
  29. data/doc/rdoc/classes/Assert.src/M000372.html +18 -0
  30. data/doc/rdoc/classes/Assert.src/M000373.html +20 -0
  31. data/doc/rdoc/classes/Assert.src/M000374.html +18 -0
  32. data/doc/rdoc/classes/Assert.src/M000375.html +22 -0
  33. data/doc/rdoc/classes/Assert/AssertionFailedException.html +117 -0
  34. data/doc/rdoc/classes/BaseTag.html +166 -0
  35. data/doc/rdoc/classes/BaseTag.src/M000049.html +20 -0
  36. data/doc/rdoc/classes/BoldContainer.html +139 -0
  37. data/doc/rdoc/classes/BoldContainer.src/M000164.html +18 -0
  38. data/doc/rdoc/classes/BoldParser.html +156 -0
  39. data/doc/rdoc/classes/BoldParser.src/M000247.html +18 -0
  40. data/doc/rdoc/classes/BoldParser.src/M000248.html +18 -0
  41. data/doc/rdoc/classes/CachedPage.html +187 -0
  42. data/doc/rdoc/classes/CachedPage.src/M000244.html +20 -0
  43. data/doc/rdoc/classes/CachedPage.src/M000245.html +27 -0
  44. data/doc/rdoc/classes/CachedPage.src/M000246.html +18 -0
  45. data/doc/rdoc/classes/CancelAction.html +179 -0
  46. data/doc/rdoc/classes/CancelAction.src/M000165.html +22 -0
  47. data/doc/rdoc/classes/CancelAction.src/M000166.html +20 -0
  48. data/doc/rdoc/classes/CancelAction.src/M000167.html +21 -0
  49. data/doc/rdoc/classes/CancelCategoryAction.html +164 -0
  50. data/doc/rdoc/classes/CancelCategoryAction.src/M000115.html +22 -0
  51. data/doc/rdoc/classes/CancelCategoryAction.src/M000116.html +20 -0
  52. data/doc/rdoc/classes/CategoriesPage.html +212 -0
  53. data/doc/rdoc/classes/CategoriesPage.src/M000232.html +27 -0
  54. data/doc/rdoc/classes/CategoriesPage.src/M000233.html +18 -0
  55. data/doc/rdoc/classes/CategoriesPage.src/M000234.html +73 -0
  56. data/doc/rdoc/classes/CategoriesPage.src/M000235.html +29 -0
  57. data/doc/rdoc/classes/CategoriesPage.src/M000236.html +59 -0
  58. data/doc/rdoc/classes/CategoryBarActionElement.html +139 -0
  59. data/doc/rdoc/classes/CategoryBarActionElement.src/M000069.html +18 -0
  60. data/doc/rdoc/classes/CategoryBarNextLevelActionElement.html +139 -0
  61. data/doc/rdoc/classes/CategoryBarNextLevelActionElement.src/M000026.html +18 -0
  62. data/doc/rdoc/classes/CategoryFormAction.html +169 -0
  63. data/doc/rdoc/classes/CategoryFormAction.src/M000148.html +18 -0
  64. data/doc/rdoc/classes/CategoryFormAction.src/M000149.html +30 -0
  65. data/doc/rdoc/classes/CategoryFormActionAdapter.html +171 -0
  66. data/doc/rdoc/classes/CategoryFormActionAdapter.src/M000112.html +19 -0
  67. data/doc/rdoc/classes/CategoryFormActionAdapter.src/M000113.html +18 -0
  68. data/doc/rdoc/classes/CategoryFormActionAdapter.src/M000114.html +18 -0
  69. data/doc/rdoc/classes/CompositeAction.html +186 -0
  70. data/doc/rdoc/classes/CompositeAction.src/M000119.html +19 -0
  71. data/doc/rdoc/classes/CompositeAction.src/M000120.html +18 -0
  72. data/doc/rdoc/classes/CompositeAction.src/M000121.html +21 -0
  73. data/doc/rdoc/classes/CompositeAction.src/M000122.html +18 -0
  74. data/doc/rdoc/classes/CompositeLinkActionElement.html +156 -0
  75. data/doc/rdoc/classes/CompositeLinkActionElement.src/M000196.html +20 -0
  76. data/doc/rdoc/classes/CompositeLinkActionElement.src/M000197.html +41 -0
  77. data/doc/rdoc/classes/Constants.html +198 -0
  78. data/doc/rdoc/classes/Container.html +281 -0
  79. data/doc/rdoc/classes/Container.src/M000251.html +19 -0
  80. data/doc/rdoc/classes/Container.src/M000252.html +18 -0
  81. data/doc/rdoc/classes/Container.src/M000253.html +18 -0
  82. data/doc/rdoc/classes/Container.src/M000254.html +18 -0
  83. data/doc/rdoc/classes/Container.src/M000255.html +27 -0
  84. data/doc/rdoc/classes/Container.src/M000256.html +18 -0
  85. data/doc/rdoc/classes/Container.src/M000257.html +18 -0
  86. data/doc/rdoc/classes/Container.src/M000258.html +18 -0
  87. data/doc/rdoc/classes/Container.src/M000259.html +18 -0
  88. data/doc/rdoc/classes/Container.src/M000260.html +23 -0
  89. data/doc/rdoc/classes/ContentDoc.html +236 -0
  90. data/doc/rdoc/classes/ContentDoc.src/M000129.html +22 -0
  91. data/doc/rdoc/classes/ContentDoc.src/M000130.html +18 -0
  92. data/doc/rdoc/classes/ContentDoc.src/M000131.html +20 -0
  93. data/doc/rdoc/classes/ContentDoc.src/M000132.html +18 -0
  94. data/doc/rdoc/classes/ContentDoc.src/M000133.html +18 -0
  95. data/doc/rdoc/classes/ContentDoc.src/M000134.html +18 -0
  96. data/doc/rdoc/classes/ContentDoc.src/M000135.html +18 -0
  97. data/doc/rdoc/classes/ContentParser.html +176 -0
  98. data/doc/rdoc/classes/ContentParser.src/M000176.html +30 -0
  99. data/doc/rdoc/classes/ContentParser.src/M000177.html +28 -0
  100. data/doc/rdoc/classes/ContentParser.src/M000178.html +55 -0
  101. data/doc/rdoc/classes/CurrentList.html +209 -0
  102. data/doc/rdoc/classes/CurrentList.src/M000228.html +19 -0
  103. data/doc/rdoc/classes/CurrentList.src/M000229.html +18 -0
  104. data/doc/rdoc/classes/CurrentList.src/M000230.html +18 -0
  105. data/doc/rdoc/classes/CurrentList.src/M000231.html +18 -0
  106. data/doc/rdoc/classes/DataContainer.html +234 -0
  107. data/doc/rdoc/classes/DataContainer.src/M000101.html +26 -0
  108. data/doc/rdoc/classes/DataContainer.src/M000102.html +24 -0
  109. data/doc/rdoc/classes/DataContainer.src/M000103.html +23 -0
  110. data/doc/rdoc/classes/DataContainer.src/M000104.html +26 -0
  111. data/doc/rdoc/classes/DataContainer.src/M000105.html +22 -0
  112. data/doc/rdoc/classes/DataContainer.src/M000106.html +18 -0
  113. data/doc/rdoc/classes/DataStorage.html +199 -0
  114. data/doc/rdoc/classes/DataStorage.src/M000031.html +23 -0
  115. data/doc/rdoc/classes/DataStorage.src/M000032.html +36 -0
  116. data/doc/rdoc/classes/DataStorage.src/M000033.html +25 -0
  117. data/doc/rdoc/classes/DataStorage.src/M000034.html +30 -0
  118. data/doc/rdoc/classes/DataStorage.src/M000035.html +21 -0
  119. data/doc/rdoc/classes/DefaultAction.html +187 -0
  120. data/doc/rdoc/classes/DefaultAction.src/M000014.html +23 -0
  121. data/doc/rdoc/classes/DefaultAction.src/M000015.html +36 -0
  122. data/doc/rdoc/classes/DefaultAction.src/M000016.html +38 -0
  123. data/doc/rdoc/classes/DefaultLoggerFactory.html +140 -0
  124. data/doc/rdoc/classes/DefaultLoggerFactory.src/M000169.html +19 -0
  125. data/doc/rdoc/classes/DirectLinkContainer.html +156 -0
  126. data/doc/rdoc/classes/DirectLinkContainer.src/M000209.html +19 -0
  127. data/doc/rdoc/classes/DirectLinkContainer.src/M000210.html +18 -0
  128. data/doc/rdoc/classes/DirectLinkParser.html +137 -0
  129. data/doc/rdoc/classes/DirectLinkParser.src/M000168.html +39 -0
  130. data/doc/rdoc/classes/DivTag.html +150 -0
  131. data/doc/rdoc/classes/DivTag.src/M000030.html +19 -0
  132. data/doc/rdoc/classes/EditAction.html +177 -0
  133. data/doc/rdoc/classes/EditAction.src/M000056.html +24 -0
  134. data/doc/rdoc/classes/EditAction.src/M000057.html +64 -0
  135. data/doc/rdoc/classes/EditActionAdapter.html +139 -0
  136. data/doc/rdoc/classes/EditActionAdapter.src/M000002.html +20 -0
  137. data/doc/rdoc/classes/EditCategoryAction.html +176 -0
  138. data/doc/rdoc/classes/EditCategoryAction.src/M000126.html +24 -0
  139. data/doc/rdoc/classes/EditCategoryAction.src/M000127.html +39 -0
  140. data/doc/rdoc/classes/EditCategoryActionAdapter.html +139 -0
  141. data/doc/rdoc/classes/EditCategoryActionAdapter.src/M000021.html +20 -0
  142. data/doc/rdoc/classes/EditCategoryPage.html +242 -0
  143. data/doc/rdoc/classes/EditCategoryPage.src/M000036.html +29 -0
  144. data/doc/rdoc/classes/EditCategoryPage.src/M000037.html +18 -0
  145. data/doc/rdoc/classes/EditCategoryPage.src/M000038.html +18 -0
  146. data/doc/rdoc/classes/EditCategoryPage.src/M000039.html +18 -0
  147. data/doc/rdoc/classes/EditCategoryPage.src/M000040.html +109 -0
  148. data/doc/rdoc/classes/EditCategoryPage.src/M000041.html +60 -0
  149. data/doc/rdoc/classes/EditCategoryPage.src/M000042.html +29 -0
  150. data/doc/rdoc/classes/EditNewActionAdapter.html +156 -0
  151. data/doc/rdoc/classes/EditNewActionAdapter.src/M000220.html +20 -0
  152. data/doc/rdoc/classes/EditNewActionAdapter.src/M000221.html +23 -0
  153. data/doc/rdoc/classes/EditPage.html +212 -0
  154. data/doc/rdoc/classes/EditPage.src/M000064.html +33 -0
  155. data/doc/rdoc/classes/EditPage.src/M000065.html +18 -0
  156. data/doc/rdoc/classes/EditPage.src/M000066.html +18 -0
  157. data/doc/rdoc/classes/EditPage.src/M000067.html +18 -0
  158. data/doc/rdoc/classes/EditPage.src/M000068.html +112 -0
  159. data/doc/rdoc/classes/EmphasisContainer.html +156 -0
  160. data/doc/rdoc/classes/EmphasisContainer.src/M000003.html +20 -0
  161. data/doc/rdoc/classes/EmphasisContainer.src/M000004.html +19 -0
  162. data/doc/rdoc/classes/EmphasisParser.html +176 -0
  163. data/doc/rdoc/classes/EmphasisParser.src/M000076.html +19 -0
  164. data/doc/rdoc/classes/EmphasisParser.src/M000077.html +18 -0
  165. data/doc/rdoc/classes/EmphasisParser.src/M000078.html +45 -0
  166. data/doc/rdoc/classes/EscapeParser.html +137 -0
  167. data/doc/rdoc/classes/EscapeParser.src/M000150.html +26 -0
  168. data/doc/rdoc/classes/ExpireMetaTag.html +139 -0
  169. data/doc/rdoc/classes/ExpireMetaTag.src/M000241.html +18 -0
  170. data/doc/rdoc/classes/FilePersistentStorageHandler.html +207 -0
  171. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000215.html +27 -0
  172. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000216.html +21 -0
  173. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000217.html +19 -0
  174. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000218.html +19 -0
  175. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000219.html +20 -0
  176. data/doc/rdoc/classes/FormAction.html +169 -0
  177. data/doc/rdoc/classes/FormAction.src/M000081.html +18 -0
  178. data/doc/rdoc/classes/FormAction.src/M000082.html +30 -0
  179. data/doc/rdoc/classes/FormActionAdapter.html +171 -0
  180. data/doc/rdoc/classes/FormActionAdapter.src/M000086.html +19 -0
  181. data/doc/rdoc/classes/FormActionAdapter.src/M000087.html +18 -0
  182. data/doc/rdoc/classes/FormActionAdapter.src/M000088.html +18 -0
  183. data/doc/rdoc/classes/FormActionElement.html +169 -0
  184. data/doc/rdoc/classes/FormActionElement.src/M000044.html +18 -0
  185. data/doc/rdoc/classes/FormActionElement.src/M000045.html +18 -0
  186. data/doc/rdoc/classes/FormActionElement.src/M000046.html +23 -0
  187. data/doc/rdoc/classes/FormInputTag.html +165 -0
  188. data/doc/rdoc/classes/FormInputTag.src/M000161.html +21 -0
  189. data/doc/rdoc/classes/HiddenFormInputTag.html +139 -0
  190. data/doc/rdoc/classes/HiddenFormInputTag.src/M000027.html +18 -0
  191. data/doc/rdoc/classes/IDataStorage.html +170 -0
  192. data/doc/rdoc/classes/IDataStorage.src/M000382.html +18 -0
  193. data/doc/rdoc/classes/IDataStorage.src/M000383.html +18 -0
  194. data/doc/rdoc/classes/IDataStorage.src/M000384.html +18 -0
  195. data/doc/rdoc/classes/ItalicContainer.html +139 -0
  196. data/doc/rdoc/classes/ItalicContainer.src/M000128.html +18 -0
  197. data/doc/rdoc/classes/ItalicParser.html +156 -0
  198. data/doc/rdoc/classes/ItalicParser.src/M000207.html +18 -0
  199. data/doc/rdoc/classes/ItalicParser.src/M000208.html +18 -0
  200. data/doc/rdoc/classes/LinkActionElement.html +184 -0
  201. data/doc/rdoc/classes/LinkActionElement.src/M000005.html +18 -0
  202. data/doc/rdoc/classes/LinkActionElement.src/M000006.html +18 -0
  203. data/doc/rdoc/classes/LinkActionElement.src/M000007.html +18 -0
  204. data/doc/rdoc/classes/LinkActionElement.src/M000008.html +18 -0
  205. data/doc/rdoc/classes/LinkTag.html +187 -0
  206. data/doc/rdoc/classes/LinkTag.src/M000153.html +34 -0
  207. data/doc/rdoc/classes/LinkTag.src/M000154.html +18 -0
  208. data/doc/rdoc/classes/LinkTag.src/M000155.html +20 -0
  209. data/doc/rdoc/classes/ListContainer.html +156 -0
  210. data/doc/rdoc/classes/ListContainer.src/M000174.html +18 -0
  211. data/doc/rdoc/classes/ListContainer.src/M000175.html +19 -0
  212. data/doc/rdoc/classes/ListItemContainer.html +156 -0
  213. data/doc/rdoc/classes/ListItemContainer.src/M000028.html +19 -0
  214. data/doc/rdoc/classes/ListItemContainer.src/M000029.html +19 -0
  215. data/doc/rdoc/classes/ListParser.html +144 -0
  216. data/doc/rdoc/classes/ListParser.src/M000195.html +147 -0
  217. data/doc/rdoc/classes/ListParserUtils.html +141 -0
  218. data/doc/rdoc/classes/ListParserUtils.src/M000385.html +23 -0
  219. data/doc/rdoc/classes/Localization.html +209 -0
  220. data/doc/rdoc/classes/Localization.src/M000311.html +40 -0
  221. data/doc/rdoc/classes/Localization.src/M000312.html +23 -0
  222. data/doc/rdoc/classes/Log4r.html +111 -0
  223. data/doc/rdoc/classes/Log4r/ExtendedRollingFileOutputter.html +178 -0
  224. data/doc/rdoc/classes/Log4r/ExtendedRollingFileOutputter.src/M000380.html +25 -0
  225. data/doc/rdoc/classes/Log4r/ExtendedRollingFileOutputter.src/M000381.html +33 -0
  226. data/doc/rdoc/classes/LoggerFactory.html +152 -0
  227. data/doc/rdoc/classes/LoggerFactory.src/M000062.html +22 -0
  228. data/doc/rdoc/classes/LoggerFactory.src/M000063.html +18 -0
  229. data/doc/rdoc/classes/MetaTag.html +166 -0
  230. data/doc/rdoc/classes/MetaTag.src/M000118.html +20 -0
  231. data/doc/rdoc/classes/NoCacheMetaTag.html +139 -0
  232. data/doc/rdoc/classes/NoCacheMetaTag.src/M000043.html +18 -0
  233. data/doc/rdoc/classes/PageRequest.html +259 -0
  234. data/doc/rdoc/classes/PageRequest.src/M000179.html +20 -0
  235. data/doc/rdoc/classes/PageRequest.src/M000180.html +18 -0
  236. data/doc/rdoc/classes/PageRequest.src/M000181.html +18 -0
  237. data/doc/rdoc/classes/PageRequest.src/M000182.html +18 -0
  238. data/doc/rdoc/classes/PageRequest.src/M000183.html +19 -0
  239. data/doc/rdoc/classes/PageRequest.src/M000184.html +23 -0
  240. data/doc/rdoc/classes/PageRequest.src/M000185.html +23 -0
  241. data/doc/rdoc/classes/PageRequest.src/M000186.html +19 -0
  242. data/doc/rdoc/classes/PageRequest.src/M000187.html +18 -0
  243. data/doc/rdoc/classes/PageResponse.html +250 -0
  244. data/doc/rdoc/classes/PageResponse.src/M000092.html +18 -0
  245. data/doc/rdoc/classes/PageResponse.src/M000093.html +18 -0
  246. data/doc/rdoc/classes/PageResponse.src/M000094.html +18 -0
  247. data/doc/rdoc/classes/PageResponse.src/M000095.html +18 -0
  248. data/doc/rdoc/classes/PageResponse.src/M000096.html +18 -0
  249. data/doc/rdoc/classes/PageResponse.src/M000097.html +18 -0
  250. data/doc/rdoc/classes/PageResponse.src/M000098.html +18 -0
  251. data/doc/rdoc/classes/PageResponse.src/M000099.html +18 -0
  252. data/doc/rdoc/classes/ParagraphContainer.html +156 -0
  253. data/doc/rdoc/classes/ParagraphContainer.src/M000158.html +19 -0
  254. data/doc/rdoc/classes/ParagraphContainer.src/M000159.html +24 -0
  255. data/doc/rdoc/classes/ParagraphParser.html +137 -0
  256. data/doc/rdoc/classes/ParagraphParser.src/M000151.html +42 -0
  257. data/doc/rdoc/classes/PersistentStorageHandler.html +182 -0
  258. data/doc/rdoc/classes/PersistentStorageHandler.src/M000376.html +18 -0
  259. data/doc/rdoc/classes/PersistentStorageHandler.src/M000377.html +18 -0
  260. data/doc/rdoc/classes/PersistentStorageHandler.src/M000378.html +18 -0
  261. data/doc/rdoc/classes/PersistentStorageHandler.src/M000379.html +18 -0
  262. data/doc/rdoc/classes/Pid.html +182 -0
  263. data/doc/rdoc/classes/Pid.src/M000083.html +18 -0
  264. data/doc/rdoc/classes/Pid.src/M000084.html +24 -0
  265. data/doc/rdoc/classes/Pid.src/M000085.html +18 -0
  266. data/doc/rdoc/classes/Properties.html +184 -0
  267. data/doc/rdoc/classes/Properties.src/M000058.html +18 -0
  268. data/doc/rdoc/classes/Properties.src/M000059.html +18 -0
  269. data/doc/rdoc/classes/Properties.src/M000060.html +18 -0
  270. data/doc/rdoc/classes/Properties.src/M000061.html +27 -0
  271. data/doc/rdoc/classes/PropertyList.html +187 -0
  272. data/doc/rdoc/classes/PropertyList.src/M000017.html +19 -0
  273. data/doc/rdoc/classes/PropertyList.src/M000018.html +23 -0
  274. data/doc/rdoc/classes/PropertyList.src/M000019.html +23 -0
  275. data/doc/rdoc/classes/PropertyList.src/M000020.html +18 -0
  276. data/doc/rdoc/classes/RawAttribute.html +154 -0
  277. data/doc/rdoc/classes/RawAttribute.src/M000249.html +20 -0
  278. data/doc/rdoc/classes/RawAttribute.src/M000250.html +21 -0
  279. data/doc/rdoc/classes/RawPage.html +171 -0
  280. data/doc/rdoc/classes/RawPage.src/M000107.html +19 -0
  281. data/doc/rdoc/classes/RawPage.src/M000108.html +18 -0
  282. data/doc/rdoc/classes/RawPage.src/M000109.html +18 -0
  283. data/doc/rdoc/classes/ReferenceLinkContainer.html +156 -0
  284. data/doc/rdoc/classes/ReferenceLinkContainer.src/M000213.html +20 -0
  285. data/doc/rdoc/classes/ReferenceLinkContainer.src/M000214.html +19 -0
  286. data/doc/rdoc/classes/Ribit.html +124 -0
  287. data/doc/rdoc/classes/Ribit/ContentStore.html +236 -0
  288. data/doc/rdoc/classes/Ribit/ContentStore.src/M000304.html +23 -0
  289. data/doc/rdoc/classes/Ribit/ContentStore.src/M000305.html +29 -0
  290. data/doc/rdoc/classes/Ribit/ContentStore.src/M000306.html +25 -0
  291. data/doc/rdoc/classes/Ribit/ContentStore.src/M000307.html +49 -0
  292. data/doc/rdoc/classes/Ribit/ContentStore.src/M000308.html +18 -0
  293. data/doc/rdoc/classes/Ribit/ContentStore.src/M000309.html +73 -0
  294. data/doc/rdoc/classes/Ribit/ContentStore.src/M000310.html +51 -0
  295. data/doc/rdoc/classes/Ribit/FileWriter.html +162 -0
  296. data/doc/rdoc/classes/Ribit/FileWriter.src/M000289.html +19 -0
  297. data/doc/rdoc/classes/Ribit/FileWriter.src/M000290.html +32 -0
  298. data/doc/rdoc/classes/Ribit/Repository.html +174 -0
  299. data/doc/rdoc/classes/Ribit/Repository.src/M000276.html +18 -0
  300. data/doc/rdoc/classes/Ribit/Repository.src/M000277.html +18 -0
  301. data/doc/rdoc/classes/Ribit/Repository.src/M000278.html +18 -0
  302. data/doc/rdoc/classes/Ribit/RibitLogger.html +137 -0
  303. data/doc/rdoc/classes/Ribit/RibitLogger.src/M000301.html +18 -0
  304. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.html +182 -0
  305. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000279.html +18 -0
  306. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000280.html +23 -0
  307. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000281.html +21 -0
  308. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000282.html +18 -0
  309. data/doc/rdoc/classes/Ribit/RibitLoggerFactory.html +154 -0
  310. data/doc/rdoc/classes/Ribit/RibitLoggerFactory.src/M000287.html +18 -0
  311. data/doc/rdoc/classes/Ribit/RibitLoggerFactory.src/M000288.html +25 -0
  312. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.html +229 -0
  313. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000294.html +26 -0
  314. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000295.html +18 -0
  315. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000296.html +18 -0
  316. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000297.html +18 -0
  317. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000298.html +18 -0
  318. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000299.html +18 -0
  319. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000300.html +18 -0
  320. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.html +210 -0
  321. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.src/M000291.html +20 -0
  322. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.src/M000292.html +32 -0
  323. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.src/M000293.html +18 -0
  324. data/doc/rdoc/classes/Ribit/Writer.html +163 -0
  325. data/doc/rdoc/classes/Ribit/Writer.src/M000302.html +18 -0
  326. data/doc/rdoc/classes/Ribit/Writer.src/M000303.html +21 -0
  327. data/doc/rdoc/classes/RibitConfig.html +247 -0
  328. data/doc/rdoc/classes/RibitConfig.src/M000072.html +32 -0
  329. data/doc/rdoc/classes/RibitConfig.src/M000073.html +18 -0
  330. data/doc/rdoc/classes/RibitConfig.src/M000074.html +18 -0
  331. data/doc/rdoc/classes/RibitConfig.src/M000075.html +18 -0
  332. data/doc/rdoc/classes/RibitConfigParser.html +140 -0
  333. data/doc/rdoc/classes/RibitConfigParser.src/M000117.html +45 -0
  334. data/doc/rdoc/classes/RibitData.html +128 -0
  335. data/doc/rdoc/classes/RibitData/CategoriesWriter.html +169 -0
  336. data/doc/rdoc/classes/RibitData/CategoriesWriter.src/M000338.html +18 -0
  337. data/doc/rdoc/classes/RibitData/CategoriesWriter.src/M000339.html +27 -0
  338. data/doc/rdoc/classes/RibitData/CategoriesWriter.src/M000340.html +24 -0
  339. data/doc/rdoc/classes/RibitData/Category.html +485 -0
  340. data/doc/rdoc/classes/RibitData/Category.src/M000313.html +27 -0
  341. data/doc/rdoc/classes/RibitData/Category.src/M000314.html +36 -0
  342. data/doc/rdoc/classes/RibitData/Category.src/M000315.html +22 -0
  343. data/doc/rdoc/classes/RibitData/Category.src/M000316.html +18 -0
  344. data/doc/rdoc/classes/RibitData/Category.src/M000317.html +18 -0
  345. data/doc/rdoc/classes/RibitData/Category.src/M000318.html +18 -0
  346. data/doc/rdoc/classes/RibitData/Category.src/M000319.html +18 -0
  347. data/doc/rdoc/classes/RibitData/Category.src/M000320.html +18 -0
  348. data/doc/rdoc/classes/RibitData/Category.src/M000321.html +18 -0
  349. data/doc/rdoc/classes/RibitData/Category.src/M000322.html +18 -0
  350. data/doc/rdoc/classes/RibitData/Category.src/M000323.html +18 -0
  351. data/doc/rdoc/classes/RibitData/Category.src/M000324.html +18 -0
  352. data/doc/rdoc/classes/RibitData/Category.src/M000325.html +18 -0
  353. data/doc/rdoc/classes/RibitData/Category.src/M000326.html +18 -0
  354. data/doc/rdoc/classes/RibitData/Category.src/M000327.html +36 -0
  355. data/doc/rdoc/classes/RibitData/Category.src/M000328.html +18 -0
  356. data/doc/rdoc/classes/RibitData/Category.src/M000329.html +48 -0
  357. data/doc/rdoc/classes/RibitData/Category.src/M000330.html +45 -0
  358. data/doc/rdoc/classes/RibitData/Category.src/M000331.html +30 -0
  359. data/doc/rdoc/classes/RibitData/Category.src/M000332.html +25 -0
  360. data/doc/rdoc/classes/RibitData/Category.src/M000333.html +18 -0
  361. data/doc/rdoc/classes/RibitData/CategoryParser.html +217 -0
  362. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000357.html +18 -0
  363. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000358.html +29 -0
  364. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000359.html +31 -0
  365. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000360.html +27 -0
  366. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000361.html +45 -0
  367. data/doc/rdoc/classes/RibitData/Page.html +313 -0
  368. data/doc/rdoc/classes/RibitData/Page.src/M000362.html +33 -0
  369. data/doc/rdoc/classes/RibitData/Page.src/M000363.html +22 -0
  370. data/doc/rdoc/classes/RibitData/Page.src/M000364.html +18 -0
  371. data/doc/rdoc/classes/RibitData/Page.src/M000365.html +18 -0
  372. data/doc/rdoc/classes/RibitData/Page.src/M000366.html +18 -0
  373. data/doc/rdoc/classes/RibitData/Page.src/M000367.html +46 -0
  374. data/doc/rdoc/classes/RibitData/Page.src/M000368.html +26 -0
  375. data/doc/rdoc/classes/RibitData/PageParser.html +190 -0
  376. data/doc/rdoc/classes/RibitData/PageParser.src/M000334.html +19 -0
  377. data/doc/rdoc/classes/RibitData/PageParser.src/M000335.html +32 -0
  378. data/doc/rdoc/classes/RibitData/PageParser.src/M000336.html +42 -0
  379. data/doc/rdoc/classes/RibitData/PageParser.src/M000337.html +21 -0
  380. data/doc/rdoc/classes/RibitData/RibitData.html +389 -0
  381. data/doc/rdoc/classes/RibitData/RibitData.src/M000341.html +26 -0
  382. data/doc/rdoc/classes/RibitData/RibitData.src/M000342.html +22 -0
  383. data/doc/rdoc/classes/RibitData/RibitData.src/M000343.html +18 -0
  384. data/doc/rdoc/classes/RibitData/RibitData.src/M000344.html +36 -0
  385. data/doc/rdoc/classes/RibitData/RibitData.src/M000345.html +18 -0
  386. data/doc/rdoc/classes/RibitData/RibitData.src/M000346.html +25 -0
  387. data/doc/rdoc/classes/RibitData/RibitData.src/M000347.html +18 -0
  388. data/doc/rdoc/classes/RibitData/RibitData.src/M000348.html +22 -0
  389. data/doc/rdoc/classes/RibitData/RibitData.src/M000349.html +18 -0
  390. data/doc/rdoc/classes/RibitData/RibitData.src/M000350.html +30 -0
  391. data/doc/rdoc/classes/RibitData/RibitData.src/M000351.html +18 -0
  392. data/doc/rdoc/classes/RibitData/RibitData.src/M000352.html +48 -0
  393. data/doc/rdoc/classes/RibitData/RibitData.src/M000353.html +30 -0
  394. data/doc/rdoc/classes/RibitData/RibitData.src/M000354.html +22 -0
  395. data/doc/rdoc/classes/RibitData/RibitData.src/M000355.html +22 -0
  396. data/doc/rdoc/classes/RibitData/RibitData.src/M000356.html +22 -0
  397. data/doc/rdoc/classes/RibitData/RibitDataException.html +113 -0
  398. data/doc/rdoc/classes/RibitException.html +117 -0
  399. data/doc/rdoc/classes/RibitLinkContainer.html +156 -0
  400. data/doc/rdoc/classes/RibitLinkContainer.src/M000211.html +85 -0
  401. data/doc/rdoc/classes/RibitLinkContainer.src/M000212.html +18 -0
  402. data/doc/rdoc/classes/RibitLinkParser.html +137 -0
  403. data/doc/rdoc/classes/RibitLinkParser.src/M000100.html +50 -0
  404. data/doc/rdoc/classes/RibitServlet.html +196 -0
  405. data/doc/rdoc/classes/RibitServlet.src/M000222.html +37 -0
  406. data/doc/rdoc/classes/RibitServlet.src/M000223.html +53 -0
  407. data/doc/rdoc/classes/RibitServlet.src/M000224.html +39 -0
  408. data/doc/rdoc/classes/RibitServlet.src/M000225.html +19 -0
  409. data/doc/rdoc/classes/RootContainer.html +139 -0
  410. data/doc/rdoc/classes/RootContainer.src/M000206.html +19 -0
  411. data/doc/rdoc/classes/SaveAction.html +164 -0
  412. data/doc/rdoc/classes/SaveAction.src/M000162.html +24 -0
  413. data/doc/rdoc/classes/SaveAction.src/M000163.html +116 -0
  414. data/doc/rdoc/classes/SaveCategoryAction.html +164 -0
  415. data/doc/rdoc/classes/SaveCategoryAction.src/M000047.html +24 -0
  416. data/doc/rdoc/classes/SaveCategoryAction.src/M000048.html +97 -0
  417. data/doc/rdoc/classes/SectionContainer.html +156 -0
  418. data/doc/rdoc/classes/SectionContainer.src/M000070.html +19 -0
  419. data/doc/rdoc/classes/SectionContainer.src/M000071.html +20 -0
  420. data/doc/rdoc/classes/SectionParser.html +137 -0
  421. data/doc/rdoc/classes/SectionParser.src/M000152.html +41 -0
  422. data/doc/rdoc/classes/SelectOptionTag.html +177 -0
  423. data/doc/rdoc/classes/SelectOptionTag.src/M000156.html +22 -0
  424. data/doc/rdoc/classes/SelectOptionTag.src/M000157.html +18 -0
  425. data/doc/rdoc/classes/StyleSheetAction.html +182 -0
  426. data/doc/rdoc/classes/StyleSheetAction.src/M000226.html +31 -0
  427. data/doc/rdoc/classes/StyleSheetAction.src/M000227.html +36 -0
  428. data/doc/rdoc/classes/TextContainer.html +214 -0
  429. data/doc/rdoc/classes/TextContainer.src/M000050.html +19 -0
  430. data/doc/rdoc/classes/TextContainer.src/M000051.html +18 -0
  431. data/doc/rdoc/classes/TextContainer.src/M000052.html +18 -0
  432. data/doc/rdoc/classes/TextContainer.src/M000053.html +18 -0
  433. data/doc/rdoc/classes/TextContainer.src/M000054.html +18 -0
  434. data/doc/rdoc/classes/TextContainer.src/M000055.html +18 -0
  435. data/doc/rdoc/classes/TextPage.html +226 -0
  436. data/doc/rdoc/classes/TextPage.src/M000198.html +29 -0
  437. data/doc/rdoc/classes/TextPage.src/M000199.html +18 -0
  438. data/doc/rdoc/classes/TextPage.src/M000200.html +54 -0
  439. data/doc/rdoc/classes/TextPage.src/M000201.html +36 -0
  440. data/doc/rdoc/classes/TextPage.src/M000202.html +46 -0
  441. data/doc/rdoc/classes/TextPage.src/M000203.html +25 -0
  442. data/doc/rdoc/classes/URL.html +182 -0
  443. data/doc/rdoc/classes/URL.src/M000123.html +24 -0
  444. data/doc/rdoc/classes/URL.src/M000124.html +19 -0
  445. data/doc/rdoc/classes/URL.src/M000125.html +35 -0
  446. data/doc/rdoc/classes/UnformattedContentContainer.html +156 -0
  447. data/doc/rdoc/classes/UnformattedContentContainer.src/M000079.html +20 -0
  448. data/doc/rdoc/classes/UnformattedContentContainer.src/M000080.html +20 -0
  449. data/doc/rdoc/classes/UnformattedContentParser.html +137 -0
  450. data/doc/rdoc/classes/UnformattedContentParser.src/M000194.html +49 -0
  451. data/doc/rdoc/classes/ViewAction.html +221 -0
  452. data/doc/rdoc/classes/ViewAction.src/M000009.html +25 -0
  453. data/doc/rdoc/classes/ViewAction.src/M000010.html +20 -0
  454. data/doc/rdoc/classes/ViewAction.src/M000011.html +77 -0
  455. data/doc/rdoc/classes/ViewAction.src/M000012.html +18 -0
  456. data/doc/rdoc/classes/ViewAction.src/M000013.html +22 -0
  457. data/doc/rdoc/classes/ViewActionAdapter.html +186 -0
  458. data/doc/rdoc/classes/ViewActionAdapter.src/M000022.html +20 -0
  459. data/doc/rdoc/classes/ViewActionAdapter.src/M000023.html +24 -0
  460. data/doc/rdoc/classes/ViewActionAdapter.src/M000024.html +20 -0
  461. data/doc/rdoc/classes/ViewActionAdapter.src/M000025.html +21 -0
  462. data/doc/rdoc/classes/ViewCategoriesAction.html +211 -0
  463. data/doc/rdoc/classes/ViewCategoriesAction.src/M000261.html +25 -0
  464. data/doc/rdoc/classes/ViewCategoriesAction.src/M000262.html +20 -0
  465. data/doc/rdoc/classes/ViewCategoriesAction.src/M000263.html +61 -0
  466. data/doc/rdoc/classes/ViewCategoriesAction.src/M000264.html +22 -0
  467. data/doc/rdoc/classes/ViewCategoriesActionAdapter.html +171 -0
  468. data/doc/rdoc/classes/ViewCategoriesActionAdapter.src/M000089.html +18 -0
  469. data/doc/rdoc/classes/ViewCategoriesActionAdapter.src/M000090.html +24 -0
  470. data/doc/rdoc/classes/ViewCategoriesActionAdapter.src/M000091.html +18 -0
  471. data/doc/rdoc/classes/W3CValidatorLinkActionAdapter.html +156 -0
  472. data/doc/rdoc/classes/W3CValidatorLinkActionAdapter.src/M000110.html +26 -0
  473. data/doc/rdoc/classes/W3CValidatorLinkActionAdapter.src/M000111.html +18 -0
  474. data/doc/rdoc/classes/WebAction.html +165 -0
  475. data/doc/rdoc/classes/WebAction.src/M000242.html +18 -0
  476. data/doc/rdoc/classes/WebAction.src/M000243.html +19 -0
  477. data/doc/rdoc/classes/WebPage.html +184 -0
  478. data/doc/rdoc/classes/WebPage.src/M000170.html +17 -0
  479. data/doc/rdoc/classes/WebPage.src/M000171.html +19 -0
  480. data/doc/rdoc/classes/WebPage.src/M000172.html +18 -0
  481. data/doc/rdoc/classes/WebPage.src/M000173.html +18 -0
  482. data/doc/rdoc/classes/XHTMLDocument.html +377 -0
  483. data/doc/rdoc/classes/XHTMLDocument.src/M000136.html +26 -0
  484. data/doc/rdoc/classes/XHTMLDocument.src/M000137.html +40 -0
  485. data/doc/rdoc/classes/XHTMLDocument.src/M000138.html +20 -0
  486. data/doc/rdoc/classes/XHTMLDocument.src/M000139.html +18 -0
  487. data/doc/rdoc/classes/XHTMLDocument.src/M000140.html +18 -0
  488. data/doc/rdoc/classes/XHTMLDocument.src/M000141.html +19 -0
  489. data/doc/rdoc/classes/XHTMLDocument.src/M000142.html +21 -0
  490. data/doc/rdoc/classes/XHTMLDocument.src/M000143.html +30 -0
  491. data/doc/rdoc/classes/XHTMLDocument.src/M000144.html +18 -0
  492. data/doc/rdoc/classes/XHTMLDocument.src/M000145.html +18 -0
  493. data/doc/rdoc/classes/XHTMLDocument.src/M000146.html +23 -0
  494. data/doc/rdoc/classes/XHTMLDocument.src/M000147.html +18 -0
  495. data/doc/rdoc/classes/XHTMLException.html +117 -0
  496. data/doc/rdoc/classes/XHTMLPage.html +225 -0
  497. data/doc/rdoc/classes/XHTMLPage.src/M000188.html +20 -0
  498. data/doc/rdoc/classes/XHTMLPage.src/M000189.html +18 -0
  499. data/doc/rdoc/classes/XHTMLPage.src/M000190.html +44 -0
  500. data/doc/rdoc/classes/XHTMLPage.src/M000191.html +18 -0
  501. data/doc/rdoc/classes/XHTMLPage.src/M000192.html +54 -0
  502. data/doc/rdoc/classes/XHTMLPage.src/M000193.html +22 -0
  503. data/doc/rdoc/created.rid +1 -0
  504. data/doc/rdoc/files/CHANGES.html +150 -0
  505. data/doc/rdoc/files/INSTALL.html +169 -0
  506. data/doc/rdoc/files/LICENSE.html +449 -0
  507. data/doc/rdoc/files/README.html +176 -0
  508. data/doc/rdoc/files/lib/common/assert_rb.html +101 -0
  509. data/doc/rdoc/files/lib/common/cvs_rb.html +116 -0
  510. data/doc/rdoc/files/lib/common/datastorage_rb.html +108 -0
  511. data/doc/rdoc/files/lib/common/loggerfactory_rb.html +108 -0
  512. data/doc/rdoc/files/lib/common/pid_rb.html +101 -0
  513. data/doc/rdoc/files/lib/common/properties_rb.html +101 -0
  514. data/doc/rdoc/files/lib/common/url_rb.html +108 -0
  515. data/doc/rdoc/files/lib/log4r/outputter/extendedrollingfileoutputter_rb.html +111 -0
  516. data/doc/rdoc/files/lib/ribit/action_rb.html +116 -0
  517. data/doc/rdoc/files/lib/ribit/actionelement_rb.html +108 -0
  518. data/doc/rdoc/files/lib/ribit/common_rb.html +130 -0
  519. data/doc/rdoc/files/lib/ribit/common_rb.src/M000001.html +25 -0
  520. data/doc/rdoc/files/lib/ribit/config_rb.html +116 -0
  521. data/doc/rdoc/files/lib/ribit/constants_rb.html +101 -0
  522. data/doc/rdoc/files/lib/ribit/contentparser_rb.html +112 -0
  523. data/doc/rdoc/files/lib/ribit/contentstore_rb.html +112 -0
  524. data/doc/rdoc/files/lib/ribit/localization_rb.html +108 -0
  525. data/doc/rdoc/files/lib/ribit/main_rb.html +120 -0
  526. data/doc/rdoc/files/lib/ribit/ribit_rb.html +123 -0
  527. data/doc/rdoc/files/lib/ribit/ribitdata_rb.html +112 -0
  528. data/doc/rdoc/files/lib/ribit/ribitlogger_rb.html +111 -0
  529. data/doc/rdoc/files/lib/ribit/webpage_rb.html +118 -0
  530. data/doc/rdoc/files/lib/ribit/xhtmldocument_rb.html +109 -0
  531. data/doc/rdoc/files/lib/ribit/xhtmltag_rb.html +109 -0
  532. data/doc/rdoc/fr_class_index.html +150 -0
  533. data/doc/rdoc/fr_file_index.html +53 -0
  534. data/doc/rdoc/fr_method_index.html +411 -0
  535. data/doc/rdoc/index.html +24 -0
  536. data/doc/rdoc/rdoc-style.css +208 -0
  537. data/doc/spec.txt +42 -0
  538. data/doc/test_run_25052005.txt +108 -0
  539. data/doc/testplan.txt +87 -0
  540. data/doc/www/index.html +5 -0
  541. data/lib/common/assert.rb +72 -0
  542. data/lib/common/cvs.rb +201 -0
  543. data/lib/common/datastorage.rb +265 -0
  544. data/lib/common/loggerfactory.rb +56 -0
  545. data/lib/common/pid.rb +44 -0
  546. data/lib/common/properties.rb +89 -0
  547. data/lib/common/url.rb +64 -0
  548. data/lib/log4r/outputter/extendedrollingfileoutputter.rb +73 -0
  549. data/lib/ribit/action.rb +1106 -0
  550. data/lib/ribit/actionelement.rb +152 -0
  551. data/lib/ribit/common.rb +34 -0
  552. data/lib/ribit/config.rb +123 -0
  553. data/lib/ribit/constants.rb +50 -0
  554. data/lib/ribit/contentparser.rb +1111 -0
  555. data/lib/ribit/contentstore.rb +406 -0
  556. data/lib/ribit/localization.rb +76 -0
  557. data/lib/ribit/main.rb +114 -0
  558. data/lib/ribit/ribit.rb +319 -0
  559. data/lib/ribit/ribitdata.rb +909 -0
  560. data/lib/ribit/ribitlogger.rb +192 -0
  561. data/lib/ribit/webpage.rb +802 -0
  562. data/lib/ribit/xhtmldocument.rb +148 -0
  563. data/lib/ribit/xhtmltag.rb +189 -0
  564. data/share/config/content/1/1.xml +6 -0
  565. data/share/config/content/1/2.xml +6 -0
  566. data/share/config/content/1/3.xml +6 -0
  567. data/share/config/content/1/4.xml +6 -0
  568. data/share/config/content/1/5.xml +6 -0
  569. data/share/config/content/1/category.xml +7 -0
  570. data/share/config/content/1/files/edit-category-template.html +59 -0
  571. data/share/config/content/1/files/edit-template.html +88 -0
  572. data/share/config/content/1/files/localization_en.properties +11 -0
  573. data/share/config/content/1/files/ribit.css +215 -0
  574. data/share/config/content/1/files/view-template.html +50 -0
  575. data/share/config/content/2/1.xml +19 -0
  576. data/share/config/content/2/2.xml +54 -0
  577. data/share/config/content/2/category.xml +5 -0
  578. data/share/config/content/3/1.xml +11 -0
  579. data/share/config/content/3/3.xml +17 -0
  580. data/share/config/content/3/4.xml +28 -0
  581. data/share/config/content/3/category.xml +5 -0
  582. data/share/config/content/categories.xml +12 -0
  583. data/share/config/ribitconfig.xml +48 -0
  584. data/share/config/ribitconfig_dev.xml +41 -0
  585. data/share/config/ribitconfig_local.xml +39 -0
  586. data/share/test/config/content/1/1.xml +6 -0
  587. data/share/test/config/content/1/2.xml +6 -0
  588. data/share/test/config/content/1/3.xml +6 -0
  589. data/share/test/config/content/1/4.xml +6 -0
  590. data/share/test/config/content/1/category.xml +4 -0
  591. data/share/test/config/content/1/files/edit-template.html +50 -0
  592. data/share/test/config/content/1/files/localization_en.properties +4 -0
  593. data/share/test/config/content/1/files/ribit.css +139 -0
  594. data/share/test/config/content/1/files/view-template.html +36 -0
  595. data/share/test/config/content/2/1.xml +16 -0
  596. data/share/test/config/content/2/2.xml +25 -0
  597. data/share/test/config/content/2/category.xml +4 -0
  598. data/share/test/config/content/categories.xml +11 -0
  599. data/share/test/config/content/ribitdata.xml +348 -0
  600. data/share/test/config/ribitconfig.xml +36 -0
  601. data/share/test/test1.xml +13 -0
  602. data/share/test/test2.xml +17 -0
  603. data/share/test/test3.xml +5 -0
  604. data/test/alltests.rb +35 -0
  605. data/test/common/allcommontests.rb +40 -0
  606. data/test/common/asserttest.rb +71 -0
  607. data/test/common/cvstest.rb +117 -0
  608. data/test/common/datastoragetest.rb +151 -0
  609. data/test/common/filepersistentstoragehandlertest.rb +105 -0
  610. data/test/common/propertiestest.rb +77 -0
  611. data/test/common/urltest.rb +70 -0
  612. data/test/log4r/outputter/alllog4routputtertests.rb +28 -0
  613. data/test/log4r/outputter/extendedrollingfileoutputtertest.rb +77 -0
  614. data/test/mock/mock.rb +147 -0
  615. data/test/ribit/actionadaptertest.rb +58 -0
  616. data/test/ribit/actionelementtest.rb +147 -0
  617. data/test/ribit/actionmanagertest.rb +55 -0
  618. data/test/ribit/allribittests.rb +62 -0
  619. data/test/ribit/categoryformactiontest.rb +153 -0
  620. data/test/ribit/configtest.rb +43 -0
  621. data/test/ribit/contentparsertest.rb +404 -0
  622. data/test/ribit/contentstorestub.rb +64 -0
  623. data/test/ribit/contentstoretest.rb +222 -0
  624. data/test/ribit/editcategorypagetest.rb +121 -0
  625. data/test/ribit/formactiontest.rb +367 -0
  626. data/test/ribit/localizationtest.rb +65 -0
  627. data/test/ribit/loggertest.rb +44 -0
  628. data/test/ribit/misc/allmisctests.rb +32 -0
  629. data/test/ribit/misc/amritatest.rb +24 -0
  630. data/test/ribit/misc/debugservlet.rb +63 -0
  631. data/test/ribit/misc/postsevlet.rb +36 -0
  632. data/test/ribit/misc/rexmlcdatatest.rb +17 -0
  633. data/test/ribit/misc/rexmldoctypetest.rb +20 -0
  634. data/test/ribit/misc/rexmlreadtest.rb +13 -0
  635. data/test/ribit/misc/rexmlwritetest.rb +28 -0
  636. data/test/ribit/misc/rubytest.rb +184 -0
  637. data/test/ribit/misc/suidtest.rb +21 -0
  638. data/test/ribit/misc/suite.rb +12 -0
  639. data/test/ribit/misc/wwwtest.rb +68 -0
  640. data/test/ribit/pagerequesttest.rb +74 -0
  641. data/test/ribit/ribitdatatest.rb +404 -0
  642. data/test/ribit/ribitservlettest.rb +94 -0
  643. data/test/ribit/testdata/ribittestdata.rb +49 -0
  644. data/test/ribit/testutil/ribitstub.rb +83 -0
  645. data/test/ribit/testutil/ribittestcase.rb +66 -0
  646. data/test/ribit/viewactiontest.rb +332 -0
  647. data/test/ribit/webpagetest.rb +531 -0
  648. data/test/ribit/xhtmldocumenttest.rb +263 -0
  649. data/test/ribit/xhtmltagtest.rb +84 -0
  650. metadata +837 -0
@@ -0,0 +1,152 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ require 'rexml/document'
20
+
21
+ # Models actions in xhtml document
22
+ class ActionElement
23
+ attr_reader :id
24
+ # def url
25
+ # def data
26
+
27
+ # Constructor taking action ID and element
28
+ def initialize( id, element )
29
+ @id = id
30
+ @element = element
31
+ end
32
+
33
+ # Removes the element from the document
34
+ def remove
35
+ @element.remove
36
+ end
37
+ end
38
+
39
+ #
40
+ class LinkActionElement < ActionElement
41
+
42
+ #
43
+ def url=( newUrl )
44
+ @element.attributes['href'] = newUrl.to_s
45
+ end
46
+
47
+ #
48
+ def url
49
+ return @element.attributes['href']
50
+ end
51
+
52
+ #
53
+ def data=( newData )
54
+ @element.text = newData
55
+ end
56
+
57
+ #
58
+ def data
59
+ return @element.text
60
+ end
61
+
62
+ end
63
+
64
+ ##
65
+ #
66
+ class FormActionElement < ActionElement
67
+
68
+ #
69
+ def url=( newUrl )
70
+ @element.attributes['action'] = newUrl.to_s
71
+ end
72
+
73
+ #
74
+ def data=( newData )
75
+ # do nothing
76
+ end
77
+
78
+ #
79
+ def insert_to_top( element )
80
+ firstElement = @element[0]
81
+ if ( firstElement == nil )
82
+ @element.add_element( element )
83
+ else
84
+ @element.insert_before( firstElement, element )
85
+ end
86
+ end
87
+
88
+ end
89
+
90
+ ##
91
+ #
92
+ class CompositeLinkActionElement < ActionElement
93
+
94
+ #
95
+ def initialize( id, element, delimiter, appendDelimiterAlsoToEnd )
96
+ super( id, element )
97
+ @delimiter = delimiter
98
+ @appendDelimiterAlsoToEnd = appendDelimiterAlsoToEnd
99
+ end
100
+
101
+ #
102
+ def replace_link_elements( linkAdapters )
103
+ # just remove this link if no adapters
104
+ if ( linkAdapters.size == 0 )
105
+ @element.remove
106
+ return
107
+ end
108
+
109
+ # there has to be at least one adapter => replace the original element with that
110
+ parent = @element.parent
111
+ parent.replace_child( @element, linkAdapters[0].to_ele )
112
+ @element = linkAdapters[0].to_ele
113
+
114
+ if ( linkAdapters.size() > 1 or @appendDelimiterAlsoToEnd )
115
+ parent.insert_after( @element, REXML::Text.new( @delimiter ) )
116
+ end
117
+
118
+ index = 1;
119
+ linkAdapters[1..linkAdapters.size].each do |adapter|
120
+ parent.insert_after( @element, adapter.to_ele )
121
+ index = index + 1
122
+ if ( @appendDelimiterAlsoToEnd or index <= linkAdapters.size - 1 )
123
+ parent.insert_after( @element, REXML::Text.new( @delimiter ) )
124
+ end
125
+ end
126
+
127
+ end
128
+
129
+ end
130
+
131
+ ##
132
+ #
133
+ class CategoryBarActionElement < CompositeLinkActionElement
134
+
135
+ #
136
+ def initialize( id, element )
137
+ super( id, element, ' / ', true )
138
+ end
139
+
140
+ end
141
+
142
+
143
+ ##
144
+ #
145
+ class CategoryBarNextLevelActionElement < CompositeLinkActionElement
146
+
147
+ #
148
+ def initialize( id, element )
149
+ super( id, element, ' - ', false )
150
+ end
151
+
152
+ end
@@ -0,0 +1,34 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ ##
20
+ # Thrown if an error occurs
21
+ class RibitException < RuntimeError
22
+ end
23
+
24
+ # Format the exception msg (includes the backtrace)
25
+ def format_exception( exp )
26
+ # 8 spaces
27
+ spaces = " "
28
+
29
+ msg = "Exception: #{exp.class.to_s} => #{exp.to_s}\n"
30
+ msg << spaces
31
+ msg << exp.backtrace.join( "\n#{spaces}" )
32
+
33
+ return msg
34
+ end
@@ -0,0 +1,123 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ require 'rexml/document'
20
+ require 'ribit/ribitlogger'
21
+
22
+ include Ribit
23
+
24
+ ##
25
+ #
26
+ class RibitConfig
27
+ HTTP_PORT = 'http-port'
28
+ HTTP_HOST = 'http-host'
29
+
30
+ MOUNT_POINT = 'ribit-mount-point'
31
+ DATA_PATH = 'ribit-data-path'
32
+ DATA_RELOAD = 'ribit-data-reload'
33
+ USER_ID = 'uid'
34
+ GROUP_ID = 'gid'
35
+ PID_FILE = 'pid-file'
36
+ MAIN_PAGE = 'ribit-main-page'
37
+ CVSROOT = 'ribit-cvsroot'
38
+ PAGE_CACHE_DIR = 'ribit-page-cache-path'
39
+
40
+ #
41
+ def initialize
42
+ @props = Hash.new
43
+ @props[HTTP_PORT] = '8080'
44
+ @props[HTTP_HOST] = 'localhost'
45
+ @props[MOUNT_POINT] = '/ribit'
46
+ @props[DATA_PATH] = './data'
47
+ @props[DATA_RELOAD] = 'false'
48
+ @props[CVSROOT] = nil
49
+
50
+ @props[USER_ID] = nil
51
+ @props[GROUP_ID] = nil
52
+ @props[PID_FILE] = nil
53
+
54
+ @props[MAIN_PAGE] = 'main::main'
55
+
56
+ @props[PAGE_CACHE_DIR] = nil
57
+ end
58
+
59
+ #
60
+ def []( key )
61
+ return @props[key]
62
+ end
63
+
64
+ #
65
+ def []=( key, value )
66
+ @props[key] = value
67
+ end
68
+
69
+ #
70
+ def get_base_url
71
+ return 'http://' + @props[HTTP_HOST] + ':' + @props[HTTP_PORT] + @props[MOUNT_POINT]
72
+ end
73
+ end
74
+
75
+ ##
76
+ #
77
+ class RibitConfigParser
78
+
79
+ # Parses an XML file and returns instance of RibitPage
80
+ def parse( fileName )
81
+ file = File.new( fileName )
82
+ begin
83
+ doc = REXML::Document.new file
84
+ @ribitConfig = RibitConfig.new
85
+
86
+ config = doc.elements['ribitconfig']
87
+ if ( config != nil )
88
+ read_prop( config, RibitConfig::HTTP_PORT )
89
+ read_prop( config, RibitConfig::HTTP_HOST )
90
+ read_prop( config, RibitConfig::MOUNT_POINT )
91
+ read_prop( config, RibitConfig::DATA_PATH )
92
+ read_prop( config, RibitConfig::DATA_RELOAD )
93
+ read_prop( config, RibitConfig::USER_ID )
94
+ read_prop( config, RibitConfig::GROUP_ID )
95
+ read_prop( config, RibitConfig::PID_FILE )
96
+ read_prop( config, RibitConfig::MAIN_PAGE )
97
+ read_prop( config, RibitConfig::CVSROOT )
98
+ read_prop( config, RibitConfig::PAGE_CACHE_DIR )
99
+ end
100
+
101
+ ensure
102
+ file.close
103
+ end
104
+
105
+ # read logging properties
106
+ RibitLoggerConfig.init_from_file( fileName )
107
+
108
+ return @ribitConfig
109
+ end
110
+
111
+ private
112
+ #
113
+ def read_prop( configEle, propName )
114
+ ele = configEle.elements[propName]
115
+ if ( ele != nil )
116
+ value = ele.text
117
+ if ( value != nil )
118
+ @ribitConfig[propName] = value
119
+ end
120
+ end
121
+ end
122
+
123
+ end
@@ -0,0 +1,50 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ ##
20
+ #
21
+ module Constants
22
+
23
+ PREV_REQUEST_PARAM_NAME = 'prev'
24
+ PREV_FORM_PARAM_NAME = 'previous-page-id'
25
+
26
+ PAGE_NAME_REQUEST_PARAM_NAME = 'name'
27
+ PAGE_NAME_FORM_PARAM_NAME = 'page-name'
28
+
29
+ PAGE_ID_REQUEST_PARAM_NAME = 'pageid'
30
+
31
+ PAGE_DATA_FORM_PARAM_NAME = 'data'
32
+
33
+ CATEGORY_REQUEST_PARAM_NAME = 'category'
34
+ CATEGORY_FORM_PARAM_NAME = 'category'
35
+
36
+ CATEGORY_NAME_FORM_PARAM_NAME = 'category-name'
37
+ CATEGORY_MAIN_PAGE_ID_FORM_PARAM_NAME = 'category-main-page'
38
+ CATEGORY_PARENT_ID_FORM_PARAM_NAME = 'category-parent'
39
+
40
+ CATEGORY_ID_REQUEST_PARAM_NAME = 'catid'
41
+
42
+ CATEGORY_NO_PARENT_FORM_VALUE = '-1'
43
+
44
+
45
+ # TODO: make platform independent!
46
+ PATH_SEPARATOR = '/'
47
+
48
+ NEW_PAGE_ID = 'new'
49
+ NEW_CATEGORY_ID = 'new'
50
+ end
@@ -0,0 +1,1111 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ =begin
20
+ Ribit module contains logic to parse text data from Ribit format (tags)
21
+ and generate basic xhtml.
22
+
23
+ A challenge is that Ribit format is not so unambigious as XML is. The basic
24
+ idea is to start building so called container tree piece by piece. A container
25
+ models one XHTML element and its contents. When the original data is parsed
26
+ tree nodes are processed recursively. Every node results to XHTML element.
27
+ In a container tree childs of a node (container) are XHTML elements inside
28
+ other (parent) XHTML elements.
29
+
30
+ The logic of parsing is divided to several parser that each is responsible for
31
+ certain type of XHTML element. The original document is parsed by every parser
32
+ in turn. The order of parsers is important because format rules aren't very
33
+ ambigious. Every parser gets the tree and every node containg plain text is
34
+ processed. This plain text is then replaced by containers.
35
+
36
+ An example:
37
+
38
+ Our test document contains following line:
39
+ this ''is'' a '''test''', ok ?
40
+
41
+ First tree is format (data is represented inside parenthesis)
42
+ Root
43
+ |
44
+ text
45
+ (this ''is'' a '''test''', ok ?)
46
+ Then BoldParser is applied and it parses text and generates following tree:
47
+ Root
48
+ | \ \
49
+ text BoldContainer text
50
+ (this ''is'' a ) (test) ( ?)
51
+
52
+ Next ItalicParser is applied:
53
+ Root
54
+ | \ \ \
55
+ text ItalicContainer text BoldContainer text
56
+ (this ) (is) (a ) (test) ( ?)
57
+
58
+ The text data under ItalicContainer and BoldContainer might still contain
59
+ some other formatting and then those nodes would get child container handling
60
+ that formatting.
61
+
62
+ =end
63
+
64
+ require 'ribit/action'
65
+ require 'ribit/constants'
66
+ require 'ribit/xhtmltag'
67
+ require 'ribit/ribitlogger'
68
+ require 'common/assert'
69
+
70
+ ##
71
+ #
72
+ class ContentParser
73
+ include Assert
74
+
75
+ #
76
+ def initialize( ribitData )
77
+ @parsers = [
78
+ SectionParser.new,
79
+ ListParser.new,
80
+ UnformattedContentParser.new,
81
+ ParagraphParser.new,
82
+ BoldParser.new,
83
+ ItalicParser.new,
84
+ RibitLinkParser.new,
85
+ DirectLinkParser.new,
86
+ EscapeParser.new ]
87
+
88
+ @ribitData = ribitData
89
+ @doc = nil
90
+ end
91
+
92
+ #
93
+ def parse( page )
94
+ assert_not_nil( page, 'The provided page is nil' )
95
+ @doc = ContentDoc.new( @ribitData, page )
96
+
97
+ @parsers.each do |parser|
98
+ #puts "activating parser: " + parser.class.name
99
+ handle_container( @doc.get_root, parser )
100
+
101
+ #puts "current doc = " + @doc.to_s
102
+ end
103
+
104
+ return @doc.to_s
105
+ end
106
+
107
+ #
108
+ def handle_container( container, parser )
109
+ # keeps record the index of currently handled childContainer
110
+ newChilds = Array.new
111
+
112
+ container.get_childs().each do |childContainer|
113
+
114
+ if ( childContainer.text? )
115
+
116
+ text = childContainer.get_text
117
+ #puts "handling text element = " + text
118
+ newContainers = parser.parse( text, @doc )
119
+ #puts "size of newContainers = " + newContainers.size().to_s
120
+
121
+ if ( newContainers != nil and newContainers.size() > 0 )
122
+ newChilds.concat( newContainers )
123
+ else
124
+ newChilds.push( childContainer )
125
+ end
126
+
127
+ elsif ( childContainer.childs? )
128
+ #puts "handling childContainer recursively"
129
+ # other than text element and it has childs
130
+ # => recursive parsing
131
+
132
+ # special case (hack!), there are not paragraphs inside List although
133
+ # format may match. For same reason lists are parsed before paragraphs
134
+ if ( parser.instance_of?( ParagraphParser ) and childContainer.instance_of?( ListContainer ) )
135
+ # do not go deeper
136
+ else
137
+ handle_container( childContainer, parser )
138
+ end
139
+ newChilds.push( childContainer )
140
+ else
141
+ newChilds.push( childContainer )
142
+ end
143
+
144
+ end
145
+
146
+ container.set_childs( newChilds )
147
+ end
148
+
149
+ end
150
+
151
+ ##
152
+ #
153
+ class ParagraphParser
154
+
155
+ #
156
+ def parse( text, contentDoc )
157
+ newContainers = Array.new
158
+ currentContainer = nil
159
+
160
+ text.each_line do |line|
161
+ emptyLine = /^[ \r\t]*$/.match( line ) != nil
162
+
163
+ if ( emptyLine == true and currentContainer != nil )
164
+ # yes, this is empty line => close current paragraph
165
+ currentContainer = nil
166
+
167
+ elsif ( emptyLine == false and currentContainer == nil )
168
+ # start new paragraph
169
+ currentContainer = ParagraphContainer.new
170
+ newContainers.push( currentContainer )
171
+
172
+ currentContainer << line
173
+ elsif ( emptyLine == false and currentContainer != nil )
174
+ # record line
175
+ currentContainer << line
176
+ else
177
+ # empty line => they are not recorded
178
+ end
179
+ end
180
+
181
+ return newContainers
182
+ end
183
+
184
+ end
185
+
186
+ ##
187
+ #
188
+ class EmphasisParser
189
+ include Assert
190
+ #
191
+ def initialize( tag )
192
+ assert_not_nil( tag )
193
+ @tag = tag
194
+ end
195
+
196
+ #
197
+ def create_emphasis_container()
198
+ raise 'implement this'
199
+ end
200
+
201
+ #
202
+ def parse( text, contentDoc )
203
+ #puts "em parser handling text = " + text
204
+ newContainers = Array.new
205
+ # @tag starts and ends
206
+ subStrs = text.split( @tag )
207
+
208
+ emOpen = false
209
+
210
+ subStrs.each do |sub|
211
+
212
+ if ( !emOpen )
213
+ newContainers.push( TextContainer.new( sub ) ) unless sub.size() == 0
214
+ emOpen = true
215
+ else
216
+ # element is open
217
+ emContainer = create_emphasis_container()
218
+ emContainer << sub
219
+ newContainers.push( emContainer )
220
+ emOpen = false
221
+ end
222
+ end
223
+
224
+ str = ''
225
+ newContainers.each do |n|
226
+ str << n.to_s
227
+ end
228
+ #puts "newContainer contains = " + str
229
+
230
+ return newContainers
231
+ end
232
+
233
+ end
234
+
235
+ ##
236
+ #
237
+ class BoldParser < EmphasisParser
238
+
239
+ #
240
+ def initialize
241
+ super( "'''" )
242
+ end
243
+
244
+ #
245
+ def create_emphasis_container()
246
+ return BoldContainer.new
247
+ end
248
+
249
+ end
250
+
251
+ ##
252
+ #
253
+ class ItalicParser < EmphasisParser
254
+
255
+ #
256
+ def initialize
257
+ super( "''" )
258
+ end
259
+
260
+ #
261
+ def create_emphasis_container()
262
+ return ItalicContainer.new
263
+ end
264
+
265
+ end
266
+
267
+ ##
268
+ #
269
+ class EscapeParser
270
+
271
+ #
272
+ def parse( text, contentDoc )
273
+
274
+ # we need to escape all <,>,',",&
275
+ text.gsub!( /&/, '&amp;' )
276
+ text.gsub!( /</, '&lt;' )
277
+ text.gsub!( />/, '&gt;' )
278
+ text.gsub!( /\"/, '&quot;' )
279
+ text.gsub!( /\'/, '&apos;' )
280
+
281
+ return [ TextContainer.new( text ) ]
282
+ end
283
+
284
+ end
285
+
286
+ ##
287
+ #
288
+ class UnformattedContentParser
289
+
290
+ #
291
+ def parse( text, contentDoc )
292
+ preStarted = false
293
+ newContainers = Array.new
294
+
295
+ currentContainer = TextContainer.new
296
+ newContainers.push( currentContainer )
297
+
298
+ # NOTE: that lines contain line feeds
299
+ text.each_line do |line|
300
+ preLine = /^ /.match( line ) != nil
301
+
302
+ if ( preLine == true and preStarted == false )
303
+ currentContainer = UnformattedContentContainer.new
304
+ newContainers.push( currentContainer )
305
+ preStarted = true
306
+
307
+ elsif ( preLine == false and preStarted == true )
308
+ currentContainer = TextContainer.new
309
+ newContainers.push( currentContainer )
310
+ preStarted = false
311
+
312
+ end
313
+
314
+ if ( preStarted )
315
+ # drop first character that is space
316
+ currentContainer << line[1, line.size()]
317
+ else
318
+ currentContainer << line
319
+ end
320
+
321
+ end
322
+
323
+ return newContainers
324
+ end
325
+
326
+ end
327
+
328
+ ##
329
+ #
330
+ class DirectLinkParser
331
+
332
+ #
333
+ def parse( text, contentDoc )
334
+ newContainers = Array.new
335
+ urls = text.scan( /http:\/\/[^ \n]+/ )
336
+ str = text
337
+ urls.each do |url|
338
+ firstIndex = str.index( url )
339
+ newContainers.push( TextContainer.new( text[0, firstIndex] ) )
340
+ newContainers.push( DirectLinkContainer.new( url ) )
341
+
342
+ # take the rest of the string
343
+ str = str[ firstIndex + url.size, str.size]
344
+ end
345
+
346
+ # take tail
347
+ if ( str != nil and str.size() > 0 )
348
+ newContainers.push( TextContainer.new( str ) )
349
+ end
350
+
351
+ if ( newContainers.size == 0 )
352
+ return [TextContainer.new( text )]
353
+ end
354
+
355
+ return newContainers
356
+ end
357
+ end
358
+
359
+ ##
360
+ #
361
+ class RibitLinkParser
362
+
363
+ #
364
+ def parse( text, contentDoc )
365
+ newContainers = Array.new
366
+ urls = text.scan( /\[[^\]]+\]/ )
367
+ str = text
368
+ urls.each do |url|
369
+ #puts "*** str = " + str
370
+ firstIndex = str.index( url )
371
+ newContainers.push( TextContainer.new( str[0, firstIndex] ) )
372
+
373
+ pageName = url.delete( '[]' )
374
+
375
+ # if reference link like [1]
376
+ if ( /^http:\/\/.+$/.match( pageName ) != nil )
377
+ newContainers.push( ReferenceLinkContainer.new( pageName, contentDoc ) )
378
+ else
379
+ newContainers.push( RibitLinkContainer.new( pageName, contentDoc ) )
380
+ end
381
+
382
+ # take the rest of the string
383
+ str = str[ firstIndex + url.size, str.size]
384
+ end
385
+
386
+ # take tail
387
+ if ( str != nil and str.size() > 0 )
388
+ #puts "*** adding the tail : " + str
389
+ newContainers.push( TextContainer.new( str ) )
390
+ end
391
+
392
+ if ( newContainers.size == 0 )
393
+ #puts "*** adding empty container"
394
+ return [TextContainer.new( text )]
395
+ end
396
+
397
+ return newContainers
398
+ end
399
+
400
+ end
401
+
402
+ ##
403
+ # This module contains utility methods shared between several classes.
404
+ module ListParserUtils
405
+
406
+ # Builds regex for matching list item start depending from
407
+ # the level of the list. 1 is level for toplevel list.
408
+ def build_regex( level )
409
+ regex = '^'
410
+ level = level * 2 + 1
411
+ level.times { regex << ' ' }
412
+ regex << '\* '
413
+
414
+ return regex
415
+ end
416
+ end
417
+
418
+ ##
419
+ #
420
+ class ListParser
421
+ include ListParserUtils
422
+
423
+ #
424
+ def parse( text, contentDoc )
425
+ @newContainers = Array.new
426
+
427
+ # this is stack of currently active lists (list hierarchy)
428
+ @activeLists = Array.new
429
+ @buffer = ''
430
+ @endConditionFound = false
431
+ @currentContainer = nil
432
+ # regex changes depending of a level of the list
433
+ @currentListRegex = build_regex( 1 )
434
+
435
+ # NOTE: that lines contain line feeds
436
+ text.each_line do |line|
437
+ isListLine = Regexp.new( @currentListRegex ).match( line ) != nil
438
+ isEmptyLine = ( line.strip.size() == 0 )
439
+
440
+ listStarted = @activeLists.size() > 0
441
+ isSiblingListLine = (listStarted and Regexp.new( @activeLists.last.get_sibling_regex() ).match( line ) != nil)
442
+
443
+ # puts "line = '#{line}'"
444
+ # puts "siblingregex=" + @activeLists.last.get_sibling_regex() if isSiblingListLine
445
+ # puts "empty=" + isEmptyLine.to_s \
446
+ # + ",listline=" + isListLine.to_s \
447
+ # + ",end=" + @endConditionFound.to_s \
448
+ # + ",listStart=" + listStarted.to_s \
449
+ # + ",sibling=" + isSiblingListLine.to_s
450
+
451
+ # case: no active list but list item found => create a list
452
+ if ( isListLine == true and listStarted == false )
453
+ create_list_container( 1 )
454
+ start_new_item()
455
+
456
+ # case: new item found to the current list
457
+ elsif ( isListLine == true and listStarted == true )
458
+ # new item found => save old data
459
+ create_list_item( @buffer )
460
+ start_new_item()
461
+
462
+ # case: sibling line found
463
+ elsif( isSiblingListLine == true and listStarted == true )
464
+ # first store previous item
465
+ lastItem = create_list_item( @buffer )
466
+ start_new_item()
467
+
468
+ # then create new list container
469
+ create_list_container( @activeLists.last.level + 1 )
470
+ # ... that is child of last list item (inside <li></li>)
471
+ lastItem.add_child( @currentContainer )
472
+
473
+ # case: previous line was empty => now empty or text line terminates the current list
474
+ elsif ( @endConditionFound == true and isListLine == false and listStarted == true )
475
+ # first store last item
476
+ create_list_item( @buffer )
477
+ start_new_item()
478
+
479
+ # remove the current list from the stack
480
+ @activeLists.pop
481
+
482
+ # end condition is common for all
483
+ # => drop first last
484
+ list = find_matching_parent_list( line )
485
+
486
+ if ( list != nil )
487
+ @currentContainer = list.container
488
+ @currentListRegex = list.get_regex
489
+ # hack!
490
+ isListLine = true
491
+ else
492
+ # did we found any list container, if not then create new text
493
+ @currentContainer = TextContainer.new
494
+ @newContainers.push( @currentContainer )
495
+ @currentListRegex = build_regex( 1 )
496
+ end
497
+
498
+ elsif ( listStarted == true and isEmptyLine == true )
499
+ @endConditionFound = true
500
+
501
+ elsif ( listStarted == true )
502
+ # just go forward adding data to current item
503
+ @endConditionFound = false
504
+
505
+ # check is data line upper level list item
506
+ if ( @activeLists.size() > 1 )
507
+ # yes, there are upper level items
508
+
509
+ # go through all upper level lists
510
+ endIndex = @activeLists.size() - 2
511
+ for index in (0..endIndex)
512
+ list = @activeLists[index]
513
+ if ( Regexp.new( list.get_regex ).match( line ) != nil )
514
+ # yes, the current line matches to the upper level item
515
+ # => lower level list ends
516
+ create_list_item( @buffer )
517
+ start_new_item()
518
+
519
+ # drop all lists that are closed now
520
+ @activeLists = @activeLists[0,index + 1]
521
+ @currentContainer = list.container
522
+ @currentListRegex = list.get_regex
523
+
524
+ # hack! => to handle list item properly
525
+ isListLine = true
526
+
527
+ break
528
+ end
529
+ end # end of for loop
530
+ end
531
+
532
+ end
533
+
534
+ # situation might been changed
535
+ listStarted = @activeLists.size() > 0
536
+
537
+ if ( listStarted and (isListLine or isSiblingListLine ) )
538
+ add_list_start_line_to_buffer( line )
539
+
540
+ elsif ( listStarted )
541
+ add_normal_line_to_buffer( line )
542
+
543
+ else
544
+ if ( @currentContainer == nil )
545
+ @currentContainer = TextContainer.new
546
+ @newContainers.push( @currentContainer )
547
+ end
548
+ add_to_text_container( line )
549
+ end
550
+
551
+ end
552
+
553
+ # if list line was last item
554
+ if ( @buffer.size() > 0 )
555
+ create_list_item( @buffer )
556
+ end
557
+
558
+ return @newContainers
559
+ end
560
+
561
+ private
562
+
563
+ #
564
+ def add_list_start_line_to_buffer( line )
565
+ # drop leading characters, like ' * '
566
+ index = @activeLists.last.get_number_of_leading_chars
567
+ @buffer << line[index, line.size()]
568
+ end
569
+
570
+ #
571
+ def add_normal_line_to_buffer( line )
572
+ @buffer << line
573
+ end
574
+
575
+ #
576
+ def add_to_text_container( line )
577
+ # normal text line inserted to TextContainer
578
+ @currentContainer << line
579
+ end
580
+ #
581
+ def create_list_item( data )
582
+ lastItem = ListItemContainer.new( data )
583
+ @currentContainer.add_child( lastItem )
584
+ return lastItem
585
+ end
586
+
587
+ #
588
+ def find_matching_parent_list( line )
589
+ while ( @activeLists.size() > 0 )
590
+ list = @activeLists.last
591
+ if ( Regexp.new( list.get_regex ).match( line ) != nil )
592
+ # yes, the current line matches to the list level
593
+ return list
594
+ end
595
+
596
+ # didn't match => drop it
597
+ @activeLists.pop
598
+ end
599
+
600
+ return nil
601
+ end
602
+
603
+ #
604
+ def start_new_item
605
+ @endConditionFound = false
606
+ @buffer = ''
607
+ end
608
+
609
+ #
610
+ def create_list_container( level )
611
+ @currentContainer = ListContainer.new
612
+
613
+ # only toplevel containers are added to newContainers list
614
+ if ( @activeLists.size() == 0 )
615
+ @newContainers.push( @currentContainer )
616
+ end
617
+ @activeLists.push( CurrentList.new( @currentContainer, level ) )
618
+ @currentListRegex = @activeLists.last.get_regex()
619
+
620
+ end
621
+ end
622
+
623
+ ##
624
+ #
625
+ class CurrentList
626
+ include ListParserUtils
627
+
628
+ attr_reader :container, :level
629
+
630
+ #
631
+ def initialize( listContainer, level )
632
+ @container = listContainer
633
+ @level = level
634
+ end
635
+
636
+ #
637
+ def get_sibling_regex
638
+ return build_regex( @level + 1 )
639
+ end
640
+
641
+ #
642
+ def get_number_of_leading_chars
643
+ return @level * 2 + 1 + 2
644
+ end
645
+
646
+ #
647
+ def get_regex
648
+ return build_regex( @level )
649
+ end
650
+
651
+ end
652
+
653
+ ##
654
+ #
655
+ class SectionParser
656
+
657
+ #
658
+ def parse( text, contentDoc )
659
+ newContainers = Array.new
660
+ sections = text.scan( /\n----[^\n]*/ )
661
+ str = text
662
+ sections.each do |section|
663
+ firstIndex = str.index( section )
664
+ newContainers.push( SectionContainer.new( str[0, firstIndex] ) )
665
+
666
+ # take the rest of the string
667
+ str = str[ firstIndex + section.size, str.size]
668
+ end
669
+
670
+ # take tail
671
+ if ( str != nil and str.size() > 0 and newContainers.size > 0 )
672
+ #puts "*** adding the tail : " + str
673
+ newContainers.push( SectionContainer.new( str ) )
674
+ elsif ( newContainers.size == 0 )
675
+ # no sections, (if only one then don't use it)
676
+ return [TextContainer.new( text )]
677
+ end
678
+
679
+ # newContainers.each do |i|
680
+ # puts "### i = " + i.to_s
681
+ # end
682
+ return newContainers
683
+ end
684
+
685
+ end
686
+
687
+ ##
688
+ #
689
+ class ContentDoc
690
+ include Assert
691
+
692
+ #
693
+ def initialize( ribitData, currentPage )
694
+ assert_not_nil( currentPage, 'The provided currentPage is nil' )
695
+ @root = RootContainer.new( currentPage.data )
696
+ @refCounter = 1
697
+ @currentPage = currentPage
698
+ @ribitData = ribitData
699
+ end
700
+
701
+ #
702
+ def get_root
703
+ return @root
704
+ end
705
+
706
+ #
707
+ def get_next_ref_counter
708
+ current = @refCounter
709
+ @refCounter = @refCounter + 1
710
+ return current
711
+ end
712
+
713
+ #
714
+ def get_ribitdata
715
+ return @ribitData
716
+ end
717
+
718
+ #
719
+ def get_current_category
720
+ @currentPage.category
721
+ end
722
+
723
+ #
724
+ def get_current_page_full_id
725
+ @currentPage.full_id
726
+ end
727
+
728
+ #
729
+ def to_s
730
+ return @root.to_s
731
+ end
732
+
733
+
734
+ end
735
+
736
+ ##
737
+ #
738
+ class Container
739
+ include Assert
740
+
741
+ #
742
+ def initialize( parentContainer )
743
+ @parent = parentContainer
744
+ @childs = Array.new
745
+ end
746
+
747
+ #
748
+ def get_parent
749
+ return @parent
750
+ end
751
+
752
+ #
753
+ def add_child( container )
754
+ @childs.push( container )
755
+ end
756
+
757
+ #
758
+ def set_childs( newChilds )
759
+ @childs = newChilds
760
+ end
761
+
762
+ #
763
+ def replace( index, replacingContainers )
764
+ #puts "replacing starting from index = " + index.to_s
765
+ #puts "size of replacingContainers = " + replacingContainers.size().to_s
766
+
767
+ firstPart = @childs[0, index]
768
+ lastPart = @childs[index + 1, @childs.length]
769
+ newChilds = Array.new
770
+ newChilds.concat( firstPart ) unless firstPart == nil
771
+ newChilds.concat( replacingContainers ) unless replacingContainers == nil
772
+ newChilds.concat( lastPart ) unless lastPart == nil
773
+ @childs = newChilds
774
+ end
775
+
776
+ #
777
+ def << ( data )
778
+ @childs.last << data
779
+ end
780
+
781
+ #
782
+ def childs?
783
+ return @childs.size() > 0
784
+ end
785
+
786
+ #
787
+ def text?
788
+ return false
789
+ end
790
+
791
+ #
792
+ def get_childs
793
+ return @childs
794
+ end
795
+
796
+ #
797
+ def to_s
798
+ result = ''
799
+ @childs.each do |item|
800
+ result << item.to_s
801
+ end
802
+
803
+ return result
804
+ end
805
+
806
+ end
807
+
808
+ ##
809
+ #
810
+ class TextContainer
811
+
812
+ #
813
+ def initialize( data='', modifiable=true )
814
+ @text = data
815
+ @modifiable = modifiable
816
+ end
817
+
818
+ #
819
+ def text?
820
+ return @modifiable
821
+ end
822
+
823
+ #
824
+ def childs?
825
+ return false
826
+ end
827
+ #
828
+ def get_text
829
+ return @text
830
+ end
831
+
832
+ #
833
+ def << ( data )
834
+ @text << data
835
+ end
836
+
837
+ #
838
+ def to_s
839
+ return @text
840
+ end
841
+
842
+ end
843
+
844
+ ##
845
+ #
846
+ class RootContainer < Container
847
+
848
+ #
849
+ def initialize( data )
850
+ super( nil )
851
+ add_child( TextContainer.new( data ) )
852
+ end
853
+
854
+ end
855
+
856
+ ##
857
+ #
858
+ class ParagraphContainer < Container
859
+
860
+ #
861
+ def initialize
862
+ super( nil )
863
+ add_child( TextContainer.new( '' ) )
864
+ end
865
+
866
+ #
867
+ def to_s
868
+ text = super
869
+
870
+ # remove last line feed if exists
871
+ if ( text[ text.size - 1 ] == 10 )
872
+ text.chop!
873
+ end
874
+ return '<p>' + text + '</p>'
875
+ end
876
+
877
+ end
878
+
879
+ ##
880
+ #
881
+ class SectionContainer < Container
882
+
883
+ #
884
+ def initialize( text )
885
+ super( nil )
886
+ add_child( TextContainer.new( text ) )
887
+ end
888
+
889
+ #
890
+ def to_s
891
+ text = super
892
+
893
+ return '<div class=\'section\'>' + text + '</div>'
894
+ end
895
+
896
+ end
897
+
898
+ ##
899
+ #
900
+ class EmphasisContainer < Container
901
+
902
+ #
903
+ def initialize( finalTag )
904
+ super( nil )
905
+ add_child( TextContainer.new( '' ) )
906
+ @finalTag = finalTag
907
+ end
908
+
909
+ #
910
+ def to_s
911
+ text = super
912
+ return "<#{@finalTag}>#{text}</#{@finalTag}>"
913
+ end
914
+
915
+ end
916
+
917
+ ##
918
+ #
919
+ class BoldContainer < EmphasisContainer
920
+
921
+ #
922
+ def initialize
923
+ super( 'strong' )
924
+ end
925
+
926
+ end
927
+
928
+ ##
929
+ #
930
+ class ItalicContainer < EmphasisContainer
931
+
932
+ #
933
+ def initialize
934
+ super( 'em' )
935
+ end
936
+
937
+ end
938
+
939
+ ##
940
+ #
941
+ class UnformattedContentContainer < Container
942
+
943
+ #
944
+ def initialize
945
+ super( nil )
946
+ # other parsers shouldn't modify text of this container => pass false
947
+ add_child( TextContainer.new( '', false ) )
948
+ end
949
+
950
+ #
951
+ def to_s
952
+ text = super
953
+
954
+ return '<pre>' + text + '</pre>'
955
+ end
956
+
957
+ end
958
+
959
+ ##
960
+ #
961
+ class DirectLinkContainer < Container
962
+
963
+ #
964
+ def initialize( href )
965
+ super( nil )
966
+ @href =href
967
+ end
968
+
969
+ #
970
+ def to_s
971
+ return "<a href='#{@href}'>#{@href}</a>"
972
+ end
973
+
974
+ end
975
+
976
+ ##
977
+ #
978
+ class RibitLinkContainer < Container
979
+
980
+ #
981
+ def initialize( linkData, contentDoc )
982
+ super( nil )
983
+ @logger = RibitLogger.new( RibitLinkContainer )
984
+
985
+ if ( /\|/.match( linkData ) )
986
+ # yes, there is link description
987
+ splitData = linkData.split( '|' )
988
+ linkData = splitData[0]
989
+ linkDescription = splitData[1]
990
+ else
991
+ linkDescription = linkData
992
+ end
993
+
994
+ # does linkData contain category ref ?
995
+ if ( /::/.match( linkData ) )
996
+ # yes, it does => split data
997
+ splitData = linkData.split( '::' )
998
+ pageName = splitData[ splitData.size - 1 ]
999
+ categoryFullName = splitData[0..(splitData.size - 2 )].join( '::' )
1000
+
1001
+ # if link ends to | then we show just page name
1002
+ if ( linkDescription == nil or linkDescription.strip.size == 0 )
1003
+ linkDescription = pageName
1004
+ end
1005
+ else
1006
+ # no category => use default
1007
+ categoryFullName = contentDoc.get_current_category().full_name
1008
+ pageName = linkData
1009
+
1010
+ if ( linkDescription == nil or linkDescription.strip.size == 0 )
1011
+ linkDescription = pageName
1012
+ end
1013
+ end
1014
+
1015
+ ribitData = contentDoc.get_ribitdata
1016
+ # first try with full name (assuming categoryFullName is really full name)
1017
+ targetPage = ribitData.get_page_by_full_name( categoryFullName + "::" + pageName )
1018
+ #puts "searching: " + categoryFullName + "::" + pageName
1019
+ # .. then if not found try partial name
1020
+ if ( targetPage == nil )
1021
+ newCategoryFullName = contentDoc.get_current_category().full_name + '::' + categoryFullName
1022
+
1023
+ newCandinate = newCategoryFullName + "::" + pageName
1024
+ targetPage = ribitData.get_page_by_full_name( newCandinate )
1025
+
1026
+ if ( targetPage != nil )
1027
+ categoryFullName = newCategoryFullName
1028
+ end
1029
+ end
1030
+
1031
+ if ( targetPage == nil )
1032
+ # page doesn't exist => link for creating new
1033
+
1034
+ action = EditNewActionAdapter.new( categoryFullName, pageName, contentDoc.get_current_page_full_id )
1035
+
1036
+ url = action.get_url
1037
+
1038
+ link1 = LinkTag.new( url, '[', false )
1039
+ link2 = LinkTag.new( url, ']', false )
1040
+ @logger.debug( 'link1=' + link1.to_s )
1041
+ @text = link1.to_s + linkDescription + link2.to_s
1042
+ @logger.debug( 'text=' + @text )
1043
+
1044
+ else
1045
+ # page exists so put just page id
1046
+ action = ViewActionAdapter.new( targetPage.full_id )
1047
+ @text = LinkTag.new( action.get_url, linkDescription, false ).to_s
1048
+ end
1049
+
1050
+ end
1051
+
1052
+ #
1053
+ def to_s
1054
+ return @text
1055
+ end
1056
+
1057
+ end
1058
+
1059
+ ##
1060
+ #
1061
+ class ReferenceLinkContainer < Container
1062
+
1063
+ #
1064
+ def initialize( url, contentDoc )
1065
+ super( nil )
1066
+ @url = url
1067
+ @counter = contentDoc.get_next_ref_counter
1068
+ end
1069
+
1070
+ #
1071
+ def to_s
1072
+ description = @counter.to_s
1073
+ return '[' + LinkTag.new( @url, description, false ).to_s + ']'
1074
+ end
1075
+
1076
+ end
1077
+
1078
+ ##
1079
+ #
1080
+ class ListContainer < Container
1081
+
1082
+ #
1083
+ def initialize
1084
+ super( nil )
1085
+ end
1086
+
1087
+ #
1088
+ def to_s
1089
+ text = super
1090
+ return '<ul>' + text + '</ul>'
1091
+ end
1092
+
1093
+ end
1094
+
1095
+ ##
1096
+ #
1097
+ class ListItemContainer < Container
1098
+
1099
+ #
1100
+ def initialize( data )
1101
+ super( nil )
1102
+ add_child( TextContainer.new( data.strip ) )
1103
+ end
1104
+
1105
+ #
1106
+ def to_s
1107
+ text = super
1108
+ return '<li>' + text + '</li>'
1109
+ end
1110
+
1111
+ end