qwik2md 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +4 -0
  5. data/README.md +36 -0
  6. data/Rakefile +10 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/exe/qwik2md +17 -0
  10. data/lib/qwik2md/version.rb +3 -0
  11. data/lib/qwik2md.rb +39 -0
  12. data/qwik2md.gemspec +30 -0
  13. data/vendor/qwik/AUTHORS +10 -0
  14. data/vendor/qwik/COPYING +340 -0
  15. data/vendor/qwik/COPYRIGHT +346 -0
  16. data/vendor/qwik/lib/qwik/Makefile +63 -0
  17. data/vendor/qwik/lib/qwik/Rakefile +17 -0
  18. data/vendor/qwik/lib/qwik/act-aa.rb +83 -0
  19. data/vendor/qwik/lib/qwik/act-archive.rb +386 -0
  20. data/vendor/qwik/lib/qwik/act-attach.rb +304 -0
  21. data/vendor/qwik/lib/qwik/act-backup.rb +236 -0
  22. data/vendor/qwik/lib/qwik/act-basic.rb +325 -0
  23. data/vendor/qwik/lib/qwik/act-book.rb +161 -0
  24. data/vendor/qwik/lib/qwik/act-calc.rb +371 -0
  25. data/vendor/qwik/lib/qwik/act-charset.rb +251 -0
  26. data/vendor/qwik/lib/qwik/act-christel.rb +112 -0
  27. data/vendor/qwik/lib/qwik/act-chronology.rb +149 -0
  28. data/vendor/qwik/lib/qwik/act-code.rb +155 -0
  29. data/vendor/qwik/lib/qwik/act-comment.rb +554 -0
  30. data/vendor/qwik/lib/qwik/act-config.rb +49 -0
  31. data/vendor/qwik/lib/qwik/act-counter.rb +125 -0
  32. data/vendor/qwik/lib/qwik/act-day.rb +96 -0
  33. data/vendor/qwik/lib/qwik/act-describe.rb +135 -0
  34. data/vendor/qwik/lib/qwik/act-diary.rb +109 -0
  35. data/vendor/qwik/lib/qwik/act-edit.rb +317 -0
  36. data/vendor/qwik/lib/qwik/act-embed-html.rb +296 -0
  37. data/vendor/qwik/lib/qwik/act-emode.rb +150 -0
  38. data/vendor/qwik/lib/qwik/act-event.rb +187 -0
  39. data/vendor/qwik/lib/qwik/act-file.rb +303 -0
  40. data/vendor/qwik/lib/qwik/act-files.rb +771 -0
  41. data/vendor/qwik/lib/qwik/act-getpass.rb +295 -0
  42. data/vendor/qwik/lib/qwik/act-history.rb +136 -0
  43. data/vendor/qwik/lib/qwik/act-html.rb +204 -0
  44. data/vendor/qwik/lib/qwik/act-httpauth.rb +147 -0
  45. data/vendor/qwik/lib/qwik/act-include.rb +142 -0
  46. data/vendor/qwik/lib/qwik/act-interwiki.rb +189 -0
  47. data/vendor/qwik/lib/qwik/act-isearch.rb +109 -0
  48. data/vendor/qwik/lib/qwik/act-keywords.rb +137 -0
  49. data/vendor/qwik/lib/qwik/act-lang.rb +81 -0
  50. data/vendor/qwik/lib/qwik/act-license.rb +63 -0
  51. data/vendor/qwik/lib/qwik/act-list.rb +287 -0
  52. data/vendor/qwik/lib/qwik/act-login.rb +410 -0
  53. data/vendor/qwik/lib/qwik/act-logout.rb +60 -0
  54. data/vendor/qwik/lib/qwik/act-mail.rb +159 -0
  55. data/vendor/qwik/lib/qwik/act-map.rb +292 -0
  56. data/vendor/qwik/lib/qwik/act-md5.rb +42 -0
  57. data/vendor/qwik/lib/qwik/act-mdlb.rb +741 -0
  58. data/vendor/qwik/lib/qwik/act-media.rb +416 -0
  59. data/vendor/qwik/lib/qwik/act-member.rb +157 -0
  60. data/vendor/qwik/lib/qwik/act-menu.rb +142 -0
  61. data/vendor/qwik/lib/qwik/act-metadata.rb +323 -0
  62. data/vendor/qwik/lib/qwik/act-mlsubmitform.rb +49 -0
  63. data/vendor/qwik/lib/qwik/act-monitor.rb +167 -0
  64. data/vendor/qwik/lib/qwik/act-new.rb +418 -0
  65. data/vendor/qwik/lib/qwik/act-pagelist.rb +248 -0
  66. data/vendor/qwik/lib/qwik/act-password.rb +145 -0
  67. data/vendor/qwik/lib/qwik/act-plan.rb +210 -0
  68. data/vendor/qwik/lib/qwik/act-povray.rb +230 -0
  69. data/vendor/qwik/lib/qwik/act-presen.rb +380 -0
  70. data/vendor/qwik/lib/qwik/act-redirect.rb +133 -0
  71. data/vendor/qwik/lib/qwik/act-ring.rb +1071 -0
  72. data/vendor/qwik/lib/qwik/act-rrefs.rb +255 -0
  73. data/vendor/qwik/lib/qwik/act-ruby.rb +116 -0
  74. data/vendor/qwik/lib/qwik/act-sample.rb +170 -0
  75. data/vendor/qwik/lib/qwik/act-save.rb +295 -0
  76. data/vendor/qwik/lib/qwik/act-schedule.rb +374 -0
  77. data/vendor/qwik/lib/qwik/act-search.rb +180 -0
  78. data/vendor/qwik/lib/qwik/act-searchwords.rb +51 -0
  79. data/vendor/qwik/lib/qwik/act-sendpass.rb +83 -0
  80. data/vendor/qwik/lib/qwik/act-site.rb +89 -0
  81. data/vendor/qwik/lib/qwik/act-sitebackup.rb +419 -0
  82. data/vendor/qwik/lib/qwik/act-sitelog.rb +118 -0
  83. data/vendor/qwik/lib/qwik/act-smil.rb +299 -0
  84. data/vendor/qwik/lib/qwik/act-status.rb +220 -0
  85. data/vendor/qwik/lib/qwik/act-style.rb +608 -0
  86. data/vendor/qwik/lib/qwik/act-table.rb +263 -0
  87. data/vendor/qwik/lib/qwik/act-tableform.rb +241 -0
  88. data/vendor/qwik/lib/qwik/act-tag.rb +103 -0
  89. data/vendor/qwik/lib/qwik/act-text.rb +70 -0
  90. data/vendor/qwik/lib/qwik/act-textarea.rb +164 -0
  91. data/vendor/qwik/lib/qwik/act-theme.rb +346 -0
  92. data/vendor/qwik/lib/qwik/act-toc.rb +112 -0
  93. data/vendor/qwik/lib/qwik/act-typekey.rb +198 -0
  94. data/vendor/qwik/lib/qwik/act-under-const.rb +94 -0
  95. data/vendor/qwik/lib/qwik/act-webservice.rb +321 -0
  96. data/vendor/qwik/lib/qwik/act-wema.rb +558 -0
  97. data/vendor/qwik/lib/qwik/act-wysiwyg.rb +238 -0
  98. data/vendor/qwik/lib/qwik/action.rb +325 -0
  99. data/vendor/qwik/lib/qwik/autoreload.rb +98 -0
  100. data/vendor/qwik/lib/qwik/bench-bench.rb +28 -0
  101. data/vendor/qwik/lib/qwik/bench-emode.rb +47 -0
  102. data/vendor/qwik/lib/qwik/bench-format-xml.rb +70 -0
  103. data/vendor/qwik/lib/qwik/bench-large-table.rb +62 -0
  104. data/vendor/qwik/lib/qwik/bench-md5.rb +14 -0
  105. data/vendor/qwik/lib/qwik/bench-module-session.rb +19 -0
  106. data/vendor/qwik/lib/qwik/bench-page.rb +50 -0
  107. data/vendor/qwik/lib/qwik/bench-s-md5.rb +28 -0
  108. data/vendor/qwik/lib/qwik/bench-session.rb +25 -0
  109. data/vendor/qwik/lib/qwik/bench-textformat.rb +31 -0
  110. data/vendor/qwik/lib/qwik/catalog-factory.rb +91 -0
  111. data/vendor/qwik/lib/qwik/catalog-ja.rb +479 -0
  112. data/vendor/qwik/lib/qwik/catalog-ml-ja.rb +145 -0
  113. data/vendor/qwik/lib/qwik/check-act-monitor.rb +112 -0
  114. data/vendor/qwik/lib/qwik/check-act-monitor2.rb +46 -0
  115. data/vendor/qwik/lib/qwik/check-act-theme.rb +27 -0
  116. data/vendor/qwik/lib/qwik/check-event.rb +112 -0
  117. data/vendor/qwik/lib/qwik/check-event2.rb +55 -0
  118. data/vendor/qwik/lib/qwik/check-htree-rexml.rb +77 -0
  119. data/vendor/qwik/lib/qwik/check-htree.rb +51 -0
  120. data/vendor/qwik/lib/qwik/check-libxml.rb +135 -0
  121. data/vendor/qwik/lib/qwik/check-many-pages.rb +47 -0
  122. data/vendor/qwik/lib/qwik/check-monitor.rb +33 -0
  123. data/vendor/qwik/lib/qwik/check-observer.rb +67 -0
  124. data/vendor/qwik/lib/qwik/check-server.rb +61 -0
  125. data/vendor/qwik/lib/qwik/check-uuencode.rb +33 -0
  126. data/vendor/qwik/lib/qwik/check-webdav.rb +65 -0
  127. data/vendor/qwik/lib/qwik/check-xml-xpath.rb +27 -0
  128. data/vendor/qwik/lib/qwik/common-backtrace.rb +94 -0
  129. data/vendor/qwik/lib/qwik/common-basic.rb +111 -0
  130. data/vendor/qwik/lib/qwik/common-condition.rb +142 -0
  131. data/vendor/qwik/lib/qwik/common-error.rb +48 -0
  132. data/vendor/qwik/lib/qwik/common-gettext.rb +50 -0
  133. data/vendor/qwik/lib/qwik/common-javascript.rb +45 -0
  134. data/vendor/qwik/lib/qwik/common-notice.rb +132 -0
  135. data/vendor/qwik/lib/qwik/common-plain.rb +105 -0
  136. data/vendor/qwik/lib/qwik/common-plugin.rb +111 -0
  137. data/vendor/qwik/lib/qwik/common-res.rb +76 -0
  138. data/vendor/qwik/lib/qwik/common-resolve.rb +92 -0
  139. data/vendor/qwik/lib/qwik/common-send.rb +171 -0
  140. data/vendor/qwik/lib/qwik/common-session.rb +139 -0
  141. data/vendor/qwik/lib/qwik/common-surface.rb +261 -0
  142. data/vendor/qwik/lib/qwik/common-url.rb +90 -0
  143. data/vendor/qwik/lib/qwik/compat/Makefile +12 -0
  144. data/vendor/qwik/lib/qwik/compat/add_load_path.rb +1 -0
  145. data/vendor/qwik/lib/qwik/config.rb +299 -0
  146. data/vendor/qwik/lib/qwik/db-b-backup.rb +142 -0
  147. data/vendor/qwik/lib/qwik/db-backup.rb +184 -0
  148. data/vendor/qwik/lib/qwik/db-berkeley.rb +306 -0
  149. data/vendor/qwik/lib/qwik/db-filesystem.rb +305 -0
  150. data/vendor/qwik/lib/qwik/db-indexer.rb +154 -0
  151. data/vendor/qwik/lib/qwik/db-searchwords.rb +238 -0
  152. data/vendor/qwik/lib/qwik/description-ja.rb +267 -0
  153. data/vendor/qwik/lib/qwik/description.rb +256 -0
  154. data/vendor/qwik/lib/qwik/dev-add-copyright.rb +23 -0
  155. data/vendor/qwik/lib/qwik/dev-backup.rb +24 -0
  156. data/vendor/qwik/lib/qwik/dev-bench.rb +175 -0
  157. data/vendor/qwik/lib/qwik/dev-calctime.rb +52 -0
  158. data/vendor/qwik/lib/qwik/dev-css-compressor.rb +60 -0
  159. data/vendor/qwik/lib/qwik/dev-extract-catalog.rb +102 -0
  160. data/vendor/qwik/lib/qwik/dev-js-compressor.rb +73 -0
  161. data/vendor/qwik/lib/qwik/dev-release.rb +235 -0
  162. data/vendor/qwik/lib/qwik/dev-replace.rb +353 -0
  163. data/vendor/qwik/lib/qwik/dev-sendmail.rb +25 -0
  164. data/vendor/qwik/lib/qwik/farm.rb +283 -0
  165. data/vendor/qwik/lib/qwik/gettext.rb +56 -0
  166. data/vendor/qwik/lib/qwik/group-cond.rb +157 -0
  167. data/vendor/qwik/lib/qwik/group-config.rb +247 -0
  168. data/vendor/qwik/lib/qwik/group-confirm.rb +147 -0
  169. data/vendor/qwik/lib/qwik/group-db.rb +326 -0
  170. data/vendor/qwik/lib/qwik/group-mail.rb +195 -0
  171. data/vendor/qwik/lib/qwik/group-member.rb +307 -0
  172. data/vendor/qwik/lib/qwik/group-sendmail.rb +231 -0
  173. data/vendor/qwik/lib/qwik/group-site.rb +374 -0
  174. data/vendor/qwik/lib/qwik/group-sweep.rb +63 -0
  175. data/vendor/qwik/lib/qwik/group.rb +157 -0
  176. data/vendor/qwik/lib/qwik/helper.rb +6 -0
  177. data/vendor/qwik/lib/qwik/html-generator.rb +104 -0
  178. data/vendor/qwik/lib/qwik/html-to-wabisabi.rb +148 -0
  179. data/vendor/qwik/lib/qwik/htree-diff.rb +87 -0
  180. data/vendor/qwik/lib/qwik/htree-format-xml.rb +57 -0
  181. data/vendor/qwik/lib/qwik/htree-generator.rb +144 -0
  182. data/vendor/qwik/lib/qwik/htree-get.rb +251 -0
  183. data/vendor/qwik/lib/qwik/htree-html-generator.rb +179 -0
  184. data/vendor/qwik/lib/qwik/htree-template.rb +263 -0
  185. data/vendor/qwik/lib/qwik/htree-to-wabisabi.rb +171 -0
  186. data/vendor/qwik/lib/qwik/loadlib.rb +79 -0
  187. data/vendor/qwik/lib/qwik/logger.rb +115 -0
  188. data/vendor/qwik/lib/qwik/mail-body.rb +171 -0
  189. data/vendor/qwik/lib/qwik/mail-header.rb +474 -0
  190. data/vendor/qwik/lib/qwik/mail-multipart.rb +193 -0
  191. data/vendor/qwik/lib/qwik/mail-parse.rb +147 -0
  192. data/vendor/qwik/lib/qwik/mail.rb +341 -0
  193. data/vendor/qwik/lib/qwik/mailaddress.rb +83 -0
  194. data/vendor/qwik/lib/qwik/mdlb-model.rb +81 -0
  195. data/vendor/qwik/lib/qwik/mdlb-sample.rb +324 -0
  196. data/vendor/qwik/lib/qwik/ml-catalog-factory.rb +27 -0
  197. data/vendor/qwik/lib/qwik/ml-exception.rb +15 -0
  198. data/vendor/qwik/lib/qwik/ml-generator.rb +28 -0
  199. data/vendor/qwik/lib/qwik/ml-gettext.rb +137 -0
  200. data/vendor/qwik/lib/qwik/ml-logger.rb +82 -0
  201. data/vendor/qwik/lib/qwik/ml-memory.rb +65 -0
  202. data/vendor/qwik/lib/qwik/ml-msg-validator.rb +86 -0
  203. data/vendor/qwik/lib/qwik/ml-processor.rb +609 -0
  204. data/vendor/qwik/lib/qwik/ml-quickml-server.rb +122 -0
  205. data/vendor/qwik/lib/qwik/ml-sendmail.rb +0 -0
  206. data/vendor/qwik/lib/qwik/ml-server.rb +107 -0
  207. data/vendor/qwik/lib/qwik/ml-session.rb +348 -0
  208. data/vendor/qwik/lib/qwik/ml-sweeper.rb +101 -0
  209. data/vendor/qwik/lib/qwik/mock-logger.rb +65 -0
  210. data/vendor/qwik/lib/qwik/mock-sendmail.rb +78 -0
  211. data/vendor/qwik/lib/qwik/mock-socket.rb +82 -0
  212. data/vendor/qwik/lib/qwik/modulobe.rb +406 -0
  213. data/vendor/qwik/lib/qwik/mongrel-server.rb +72 -0
  214. data/vendor/qwik/lib/qwik/page-files.rb +249 -0
  215. data/vendor/qwik/lib/qwik/page-generate.rb +82 -0
  216. data/vendor/qwik/lib/qwik/page-get.rb +262 -0
  217. data/vendor/qwik/lib/qwik/page-images.rb +168 -0
  218. data/vendor/qwik/lib/qwik/page-put.rb +128 -0
  219. data/vendor/qwik/lib/qwik/page-rrefs.rb +154 -0
  220. data/vendor/qwik/lib/qwik/page-title.rb +0 -0
  221. data/vendor/qwik/lib/qwik/page-wikidb.rb +234 -0
  222. data/vendor/qwik/lib/qwik/page.rb +67 -0
  223. data/vendor/qwik/lib/qwik/pages.rb +444 -0
  224. data/vendor/qwik/lib/qwik/parse-plugin.rb +249 -0
  225. data/vendor/qwik/lib/qwik/parser-emode.rb +116 -0
  226. data/vendor/qwik/lib/qwik/parser-inline.rb +272 -0
  227. data/vendor/qwik/lib/qwik/parser.rb +349 -0
  228. data/vendor/qwik/lib/qwik/password.rb +183 -0
  229. data/vendor/qwik/lib/qwik/periodic.rb +79 -0
  230. data/vendor/qwik/lib/qwik/qp.rb +56 -0
  231. data/vendor/qwik/lib/qwik/qwik-service.rb +341 -0
  232. data/vendor/qwik/lib/qwik/qwik.rb +5 -0
  233. data/vendor/qwik/lib/qwik/qwikweb-adduser.rb +34 -0
  234. data/vendor/qwik/lib/qwik/qwikweb-catalog-validator.rb +110 -0
  235. data/vendor/qwik/lib/qwik/qwikweb-incgen.rb +28 -0
  236. data/vendor/qwik/lib/qwik/qwikweb-makesite.rb +41 -0
  237. data/vendor/qwik/lib/qwik/qwikweb-server.rb +44 -0
  238. data/vendor/qwik/lib/qwik/qwikweb-showpassword.rb +26 -0
  239. data/vendor/qwik/lib/qwik/qwikweb-watchlog.rb +67 -0
  240. data/vendor/qwik/lib/qwik/request-path.rb +304 -0
  241. data/vendor/qwik/lib/qwik/request-ua.rb +76 -0
  242. data/vendor/qwik/lib/qwik/request-webrick.rb +81 -0
  243. data/vendor/qwik/lib/qwik/request.rb +91 -0
  244. data/vendor/qwik/lib/qwik/resolve-tdiary.rb +292 -0
  245. data/vendor/qwik/lib/qwik/resolve.rb +121 -0
  246. data/vendor/qwik/lib/qwik/response.rb +228 -0
  247. data/vendor/qwik/lib/qwik/server-memory.rb +57 -0
  248. data/vendor/qwik/lib/qwik/server-webrick.rb +102 -0
  249. data/vendor/qwik/lib/qwik/server.rb +252 -0
  250. data/vendor/qwik/lib/qwik/site-config.rb +149 -0
  251. data/vendor/qwik/lib/qwik/site-db.rb +136 -0
  252. data/vendor/qwik/lib/qwik/site-event.rb +162 -0
  253. data/vendor/qwik/lib/qwik/site-files.rb +86 -0
  254. data/vendor/qwik/lib/qwik/site-group.rb +103 -0
  255. data/vendor/qwik/lib/qwik/site-index.rb +47 -0
  256. data/vendor/qwik/lib/qwik/site-log.rb +64 -0
  257. data/vendor/qwik/lib/qwik/site-member.rb +230 -0
  258. data/vendor/qwik/lib/qwik/site-monitor.rb +97 -0
  259. data/vendor/qwik/lib/qwik/site-pages.rb +62 -0
  260. data/vendor/qwik/lib/qwik/site-plan.rb +139 -0
  261. data/vendor/qwik/lib/qwik/site-report.rb +282 -0
  262. data/vendor/qwik/lib/qwik/site-resolve.rb +230 -0
  263. data/vendor/qwik/lib/qwik/site-rrefs.rb +18 -0
  264. data/vendor/qwik/lib/qwik/site-search.rb +180 -0
  265. data/vendor/qwik/lib/qwik/site-timeline.rb +153 -0
  266. data/vendor/qwik/lib/qwik/site-url.rb +189 -0
  267. data/vendor/qwik/lib/qwik/site.rb +76 -0
  268. data/vendor/qwik/lib/qwik/smil-time.rb +105 -0
  269. data/vendor/qwik/lib/qwik/smtp-session.rb +331 -0
  270. data/vendor/qwik/lib/qwik/template-generator.rb +149 -0
  271. data/vendor/qwik/lib/qwik/template.rb +85 -0
  272. data/vendor/qwik/lib/qwik/test-common.rb +10 -0
  273. data/vendor/qwik/lib/qwik/test-ml-info.rb +225 -0
  274. data/vendor/qwik/lib/qwik/test-module-ml.rb +142 -0
  275. data/vendor/qwik/lib/qwik/test-module-path.rb +110 -0
  276. data/vendor/qwik/lib/qwik/test-module-public.rb +70 -0
  277. data/vendor/qwik/lib/qwik/test-module-server.rb +98 -0
  278. data/vendor/qwik/lib/qwik/test-module-session.rb +264 -0
  279. data/vendor/qwik/lib/qwik/test-module-suite.rb +91 -0
  280. data/vendor/qwik/lib/qwik/test-ms-applemail.rb +59 -0
  281. data/vendor/qwik/lib/qwik/test-ms-attach.rb +174 -0
  282. data/vendor/qwik/lib/qwik/test-ms-basic.rb +40 -0
  283. data/vendor/qwik/lib/qwik/test-ms-close.rb +35 -0
  284. data/vendor/qwik/lib/qwik/test-ms-confirm.rb +75 -0
  285. data/vendor/qwik/lib/qwik/test-ms-ignore-spam.rb +57 -0
  286. data/vendor/qwik/lib/qwik/test-ms-japanese.rb +97 -0
  287. data/vendor/qwik/lib/qwik/test-ms-jfilename.rb +82 -0
  288. data/vendor/qwik/lib/qwik/test-ms-large.rb +58 -0
  289. data/vendor/qwik/lib/qwik/test-ms-member.rb +103 -0
  290. data/vendor/qwik/lib/qwik/test-ms-multipart.rb +84 -0
  291. data/vendor/qwik/lib/qwik/test-ms-org.rb +129 -0
  292. data/vendor/qwik/lib/qwik/test-ms-plan.rb +130 -0
  293. data/vendor/qwik/lib/qwik/test-ms-post.rb +53 -0
  294. data/vendor/qwik/lib/qwik/test-ms-quopri.rb +76 -0
  295. data/vendor/qwik/lib/qwik/test-sub-quopri.rb +45 -0
  296. data/vendor/qwik/lib/qwik/test-submit-base64.rb +59 -0
  297. data/vendor/qwik/lib/qwik/test-submit-forward.rb +61 -0
  298. data/vendor/qwik/lib/qwik/test-submit-html-mail.rb +52 -0
  299. data/vendor/qwik/lib/qwik/test-submit-japanese.rb +135 -0
  300. data/vendor/qwik/lib/qwik/test-submit-jfilename.rb +144 -0
  301. data/vendor/qwik/lib/qwik/test-submit-uuencode.rb +71 -0
  302. data/vendor/qwik/lib/qwik/test-suite-all.rb +8 -0
  303. data/vendor/qwik/lib/qwik/test-suite-basic.rb +9 -0
  304. data/vendor/qwik/lib/qwik/test-suite-ml.rb +9 -0
  305. data/vendor/qwik/lib/qwik/test-typekey.rb +64 -0
  306. data/vendor/qwik/lib/qwik/testunit.rb +45 -0
  307. data/vendor/qwik/lib/qwik/tokenizer-inline.rb +288 -0
  308. data/vendor/qwik/lib/qwik/tokenizer.rb +331 -0
  309. data/vendor/qwik/lib/qwik/typekey.rb +160 -0
  310. data/vendor/qwik/lib/qwik/util-basic.rb +135 -0
  311. data/vendor/qwik/lib/qwik/util-charset.rb +331 -0
  312. data/vendor/qwik/lib/qwik/util-css.rb +56 -0
  313. data/vendor/qwik/lib/qwik/util-csv-tokenizer.rb +113 -0
  314. data/vendor/qwik/lib/qwik/util-filename.rb +112 -0
  315. data/vendor/qwik/lib/qwik/util-pathname.rb +202 -0
  316. data/vendor/qwik/lib/qwik/util-pid.rb +58 -0
  317. data/vendor/qwik/lib/qwik/util-safe.rb +67 -0
  318. data/vendor/qwik/lib/qwik/util-sendmail.rb +273 -0
  319. data/vendor/qwik/lib/qwik/util-string.rb +202 -0
  320. data/vendor/qwik/lib/qwik/util-time.rb +125 -0
  321. data/vendor/qwik/lib/qwik/util-webrick.rb +176 -0
  322. data/vendor/qwik/lib/qwik/version.rb +11 -0
  323. data/vendor/qwik/lib/qwik/wabisabi-basic.rb +163 -0
  324. data/vendor/qwik/lib/qwik/wabisabi-diff.rb +130 -0
  325. data/vendor/qwik/lib/qwik/wabisabi-format-xml.rb +310 -0
  326. data/vendor/qwik/lib/qwik/wabisabi-generator.rb +262 -0
  327. data/vendor/qwik/lib/qwik/wabisabi-index.rb +174 -0
  328. data/vendor/qwik/lib/qwik/wabisabi-table.rb +212 -0
  329. data/vendor/qwik/lib/qwik/wabisabi-template.rb +295 -0
  330. data/vendor/qwik/lib/qwik/wabisabi-to-htree.rb +111 -0
  331. data/vendor/qwik/lib/qwik/wabisabi-to-wiki.rb +690 -0
  332. data/vendor/qwik/lib/qwik/wabisabi-traverse.rb +207 -0
  333. data/vendor/qwik/lib/qwik/wabisabi-validator.rb +116 -0
  334. data/vendor/qwik/lib/qwik/wabisabi.rb +5 -0
  335. metadata +492 -0
@@ -0,0 +1,171 @@
1
+ # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ # This is free software with ABSOLUTELY NO WARRANTY.
3
+ # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
+
5
+ $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
6
+
7
+ module Qwik
8
+ class Action
9
+ def c_simple_send(path, type=nil)
10
+ return SimpleSender.send(@config, @req, @res, path.to_s, type)
11
+ end
12
+
13
+ def c_download(path)
14
+ return SimpleSender.download(@req, @res, path.to_s, @config.test)
15
+ end
16
+ end
17
+
18
+ class SimpleSender
19
+ # copied from webrick
20
+ def self.send(config, req, res, local_path, mtype=nil)
21
+ local_path = local_path.path
22
+ if ! local_path.exist?
23
+ raise WEBrick::HTTPStatus::NotFound
24
+ end
25
+
26
+ st = local_path.stat
27
+ res['etag'] = sprintf('%x-%x-%x', st.ino, st.size, st.mtime.to_i)
28
+
29
+ if not_modified?(req, res, st.mtime)
30
+ res.body = ''
31
+ raise WEBrick::HTTPStatus::NotModified
32
+ end
33
+
34
+ if mtype.nil?
35
+ mtype = res.get_mimetypes(local_path.ext) # Get content type.
36
+ end
37
+ res['Content-Type'] = mtype
38
+ res['Content-Length'] = st.size
39
+ res['Last-Modified'] = st.mtime.httpdate
40
+
41
+ if config.ssl || config.test
42
+ # BUG: ssl can not send data as stream.
43
+ res.body = local_path.read
44
+ else
45
+ res.body = open(local_path.to_s, 'rb')
46
+ end
47
+ end
48
+
49
+ def self.download(req, res, local_path, test=false)
50
+ local_path = local_path.path
51
+ if ! local_path.exist?
52
+ raise WEBrick::HTTPStatus::NotFound
53
+ end
54
+
55
+ st = local_path.stat
56
+ res['etag'] = sprintf('%x-%x-%x', st.ino, st.size, st.mtime.to_i)
57
+
58
+ if not_modified?(req, res, st.mtime)
59
+ res.body = ''
60
+ raise WEBrick::HTTPStatus::NotModified
61
+ end
62
+
63
+ res.set_content_type(local_path.ext)
64
+ res['Content-Length'] = st.size
65
+ res['Last-Modified'] = st.mtime.httpdate
66
+
67
+ basename = local_path.basename
68
+ decoded = Filename.decode(basename.to_s) # UTF-8
69
+ filename = decoded.to_page_charset
70
+ res['Content-Disposition'] = "attachment; filename=\"#{filename}\""
71
+
72
+ if test
73
+ res.body = local_path.read
74
+ else
75
+ res.body = open(local_path.to_s, 'rb')
76
+ end
77
+ end
78
+
79
+ def self.fsend(config, req, res, local_path, mtype, dfilename)
80
+ local_path = local_path.path
81
+ if ! local_path.exist?
82
+ raise WEBrick::HTTPStatus::NotFound
83
+ end
84
+ res['Content-Type'] = mtype
85
+ res['Content-Disposition'] = ' attachment; filename='+dfilename
86
+ res.body = local_path.read
87
+ end
88
+
89
+ private
90
+
91
+ def self.not_modified?(req, res, mtime)
92
+ if ir = req['if-range']
93
+ begin
94
+ return true if mtime <= ::Time.httpdate(ir)
95
+ rescue
96
+ if WEBrick::HTTPUtils::split_header_valie(ir).member?(res['etag'])
97
+ return true
98
+ end
99
+ end
100
+ end
101
+
102
+ if (ims = req['if-modified-since']) && mtime <= ::Time.parse(ims)
103
+ return true
104
+ end
105
+
106
+ if (inm = req['if-none-match']) &&
107
+ WEBrick::HTTPUtils::split_header_value(inm).member?(res['etag'])
108
+ return true
109
+ end
110
+
111
+ return false
112
+ end
113
+ end
114
+ end
115
+
116
+ if $0 == __FILE__
117
+ require 'qwik/test-common'
118
+ $test = true
119
+ end
120
+
121
+ if defined?($test) && $test
122
+ class TestCommon < Test::Unit::TestCase
123
+ include TestSession
124
+
125
+ def test_simple_send
126
+ t_add_user
127
+
128
+ page = @site.create_new
129
+ page.store('t')
130
+
131
+ # At the first, attach a text file for test.
132
+ res = session('POST /test/1.files') {|req|
133
+ req.query.update('content'=>t_make_content('t.txt', 't'))
134
+ }
135
+ ok_title('File attachment completed')
136
+
137
+ # Get the content using simple send.
138
+ res = session('/test/1.files/t.txt')
139
+ ok_eq('text/plain', res['Content-Type'])
140
+ ok_eq('t', res.body)
141
+
142
+ t_without_testmode {
143
+ res = session('/test/1.files/t.txt')
144
+ ok_eq('text/plain', res['Content-Type'])
145
+ assert_instance_of(File, res.body)
146
+ str = res.body.read
147
+ res.body.close # important
148
+ ok_eq('t', str)
149
+ }
150
+ end
151
+
152
+ def test_download
153
+ t_add_user
154
+
155
+ page = @site.create_new
156
+ page.store('t')
157
+
158
+ # At the first, attach a test file.
159
+ res = session('POST /test/1.files') {|req|
160
+ req.query.update('content'=>t_make_content('t.txt', 't'))
161
+ }
162
+ ok_title('File attachment completed')
163
+
164
+ # Get the content by download.
165
+ res = session('/test/1.download/t.txt')
166
+ ok_eq('text/plain', res['Content-Type'])
167
+ ok_eq("attachment; filename=\"t.txt\"", res['Content-Disposition'])
168
+ ok_eq('t', res.body)
169
+ end
170
+ end
171
+ end
@@ -0,0 +1,139 @@
1
+ # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ # This is free software with ABSOLUTELY NO WARRANTY.
3
+ # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
+
5
+ $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
6
+
7
+ module Qwik
8
+ class Action
9
+ # ============================== verify
10
+ # called from act-login.rb:41
11
+ def check_session
12
+ sid = @req.cookies['sid'] # get session id from cookie.
13
+ return if sid.nil? || sid.empty? # return if you don't have session id.
14
+ sdb = @memory.sessiondb
15
+ user = sdb.get(sid) # Get user from SessionDB.
16
+ return if user.nil? # return if there is no session id.
17
+ @req.user = user # OK! I have your sesssion id. I know who you are.
18
+ @req.auth = 'session'
19
+ end
20
+
21
+ # ============================== login
22
+ # called from act-login, act-typkey and this file.
23
+ def session_store(user)
24
+ sdb = @memory.sessiondb
25
+ sid = sdb.generate_sid # Make a new session id.
26
+ sdb.put(sid, user) # Store the session id to session db.
27
+ return sid
28
+ end
29
+
30
+ # ============================== logout
31
+ def session_clear
32
+ sid = @req.cookies['sid'] # Get sid from cookie.
33
+ return if sid.nil? || sid.empty? # return if you don't have session id.
34
+ sdb = @memory.sessiondb
35
+ user = sdb.get(sid) # Get user from SessionDB.
36
+ return if user.nil? # return if there is no session id.
37
+ sdb.clear(sid)
38
+ end
39
+ end
40
+
41
+ class SessionDB
42
+ DEFAULT_EXPIRE_TIME = 60 * 60 * 24 * 14 # 2 weeks
43
+
44
+ def initialize(config)
45
+ @config = config
46
+ @config.cache_dir.path.check_directory
47
+ @path = @config.cache_dir.path+'sid'
48
+ @path.check_directory
49
+ @expire_time = DEFAULT_EXPIRE_TIME
50
+ end
51
+
52
+ def generate_sid
53
+ str = Time.now.to_i.to_s+':'+rand.to_s
54
+ return str.md5hex
55
+ end
56
+
57
+ def path(sid)
58
+ @path + sid
59
+ end
60
+
61
+ def put(sid, user)
62
+ path(sid).put(user)
63
+ end
64
+
65
+ def clear(sid)
66
+ file = path(sid)
67
+ return nil if ! file.exist?
68
+ file.unlink # delete it
69
+ end
70
+
71
+ def get(sid)
72
+ return if sid.nil? || sid.empty?
73
+ file = path(sid)
74
+ return nil if ! file.exist?
75
+ mtime = file.mtime
76
+ diff = Time.now.to_i - mtime.to_i
77
+ if @expire_time < diff
78
+ clear(sid)
79
+ return nil
80
+ end
81
+ str = file.read
82
+ return str
83
+ end
84
+ end
85
+ end
86
+
87
+ if $0 == __FILE__
88
+ require 'qwik/test-common'
89
+ $test = true
90
+ end
91
+
92
+ if defined?($test) && $test
93
+ class TestCommonSession < Test::Unit::TestCase
94
+ include TestSession
95
+
96
+ def test_all
97
+ # not yet
98
+ end
99
+ end
100
+
101
+ class TestSessionDB < Test::Unit::TestCase
102
+ def test_all
103
+ if defined?($test_memory)
104
+ @memory = $test_memory
105
+ else
106
+ @memory = Qwik::ServerMemory.new(@config)
107
+ end
108
+
109
+ sdb = @memory.sessiondb
110
+
111
+ # test generate session id
112
+ sid = sdb.generate_sid
113
+ ok_eq(32, sid.length)
114
+ assert_match(/\A[0-9a-f]+\z/, sid)
115
+
116
+ # test put
117
+ sdb.put(sid, 'user@e.com')
118
+ file = sdb.path(sid)
119
+ ok_eq(true, file.exist?)
120
+
121
+ # test get empty
122
+ ok_eq(nil, sdb.get(nil))
123
+ ok_eq(nil, sdb.get(''))
124
+
125
+ # test get
126
+ user = sdb.get(sid)
127
+ ok_eq('user@e.com', user)
128
+
129
+ mtime = file.mtime
130
+ oldtime = Time.at(mtime.to_i - 60 * 60 * 24 * 100) # 100 days ago.
131
+ file.utime(oldtime, oldtime)
132
+
133
+ # test session expired
134
+ user = sdb.get(sid)
135
+ ok_eq(nil, user)
136
+ ok_eq(false, file.exist?)
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,261 @@
1
+ # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ # This is free software with ABSOLUTELY NO WARRANTY.
3
+ # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
+
5
+ $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
6
+ require 'qwik/act-basic'
7
+ require 'qwik/wabisabi-index'
8
+
9
+ module Qwik
10
+ class Action
11
+ # ==================== c_surface
12
+ # http://co/qwik/.test_surface
13
+ # Only for page design check.
14
+ def act_test_surface
15
+ w = c_page_res('TextFormat')
16
+ c_surface('act_test_surface') { w }
17
+ end
18
+
19
+ def c_surface(title, patch=true, &b)
20
+ msg = yield
21
+ c_set_status
22
+ c_set_contenttype
23
+ c_set_no_cache
24
+ body = surface_generate(title, msg, patch)
25
+ c_set_body(body)
26
+ end
27
+
28
+ def surface_generate(title, msg, patch=true)
29
+ template = @memory.template.get('surface')
30
+ adminmenu = c_page_res('_AdminMenu')
31
+ if patch
32
+ li = adminmenu.get_path('//ul/li[2]')
33
+ li.clear if li
34
+ end
35
+ data = {
36
+ :title => title,
37
+ :theme_path => site_theme_path,
38
+ :adminmenu => adminmenu,
39
+ :toc => nil, # Do not use toc.
40
+ :h1 => title, # same as title.
41
+ :body => msg,
42
+ :sidemenu => surface_get_sidemenu,
43
+ :pageattribute => c_page_res('_PageAttribute'),
44
+ }
45
+ surface_template(template, data)
46
+ return template
47
+ end
48
+
49
+ # ==================== view page
50
+ # Called from act-html.rb:28, 57
51
+ def surface_view(pagename)
52
+ c_set_status
53
+ c_set_contenttype
54
+ c_set_no_cache
55
+ body = surface_view_generate(pagename)
56
+ c_set_body(body)
57
+ end
58
+
59
+ def surface_view_generate(pagename)
60
+ page = @site[pagename]
61
+ template = @memory.template.get('surface')
62
+ data = {
63
+ :title => @site.get_page_title(pagename),
64
+ :theme_path => site_theme_path,
65
+ :adminmenu => c_page_res('_AdminMenu'),
66
+ :toc => toc_inside,
67
+ :h1 => page.get_title,
68
+ :body => surface_get_body(page),
69
+ :sidemenu => surface_get_sidemenu,
70
+ :pageattribute => c_page_res('_PageAttribute'),
71
+ }
72
+ surface_template(template, data)
73
+ return template
74
+ end
75
+
76
+ # act-include:22, act-tag:49
77
+ def surface_get_body(page)
78
+ tree = page.get_body_tree
79
+ w = Resolver.resolve(@site, self, tree)
80
+ w = TDiaryResolver.resolve(@config, @site, self, w)
81
+ return w
82
+ end
83
+
84
+ private
85
+
86
+ def surface_get_sidemenu
87
+ page = @site.get_superpage('SideMenu')
88
+ tree = page.get_tree
89
+ w = Resolver.resolve(@site, self, tree)
90
+ return w
91
+ end
92
+
93
+ # ==================== build using template
94
+ # Destructive for template.
95
+ def old_surface_template(template, data)
96
+ w = template.get_tag('head') # TAKETIME: Here!
97
+ w.insert(1, [:title, data[:title]])
98
+ media = 'screen,tv,print'
99
+ w.insert(w.length, [:link, {:href=>'.theme/css/base.css', :media=>media,
100
+ :rel=>'stylesheet', :type=>'text/css'}])
101
+ w.insert(w.length, [:link, {:href=>data[:theme_path], :media=>media,
102
+ :rel=>'stylesheet', :type=>'text/css'}])
103
+ js = Action.generate_js
104
+ w.insert(w.length, *js)
105
+
106
+ w = template.get_by_class('adminmenu') # TAKETIME: Here!
107
+ w << data[:adminmenu]
108
+
109
+ w = template.get_by_class('toc') # TAKETIME: Here!
110
+ if data[:toc].nil?
111
+ w.clear
112
+ else
113
+ w << data[:toc]
114
+ end
115
+
116
+ w = template.get_tag('h1') # TAKETIME: Here!
117
+ w << data[:h1]
118
+
119
+ w = template.get_by_class('body_enter') # TAKETIME: Here!
120
+ w.clear
121
+
122
+ w = template.get_by_class('body_main') # TAKETIME: Here!
123
+ w << data[:body]
124
+
125
+ w = template.get_by_class('sidebar') # TAKETIME: Here!
126
+ w << data[:sidemenu]
127
+
128
+ w = template.get_by_class('body_leave') # TAKETIME: Here!
129
+ w << [:div, {:class=>'day'},
130
+ [:div, {:class=>'comment'},
131
+ [:div, {:class=>'caption'},
132
+ [:div, {:class=>'page_attribute'},
133
+ data[:pageattribute]]]]]
134
+
135
+ return nil # Do not return any value. Just destruct the template.
136
+ end
137
+
138
+ def new_surface_template(template, data)
139
+ template.make_index
140
+
141
+ w = template.index_tag(:head)
142
+
143
+ w.insert(1, [:title, data[:title]])
144
+
145
+ media = 'screen,tv,print'
146
+ w.insert(w.length, [:link, {:href=>'.theme/css/base.css', :media=>media,
147
+ :rel=>'stylesheet', :type=>'text/css'}])
148
+ w.insert(w.length, [:link, {:href=>data[:theme_path], :media=>media,
149
+ :rel=>'stylesheet', :type=>'text/css'}])
150
+ w.insert(w.length, [:link, {:href=>'rss.xml', :title=>'RSS 0.91',
151
+ :rel=>'alternate', :type=>"application/rss+xml"}])
152
+
153
+ js = Action.generate_js
154
+ w.insert(w.length, *js)
155
+
156
+ w = template.index_class('adminmenu')
157
+ w << data[:adminmenu]
158
+
159
+ w = template.index_class('toc')
160
+ if data[:toc].nil?
161
+ w.clear
162
+ else
163
+ w << data[:toc]
164
+ end
165
+
166
+ w = template.index_tag(:h1)
167
+ w << data[:h1]
168
+
169
+ w = template.index_class('body_enter')
170
+ w.clear
171
+
172
+ w = template.index_class('body_main')
173
+ w << data[:body]
174
+
175
+ w = template.index_class('sidebar')
176
+ w << data[:sidemenu]
177
+
178
+ w = template.index_class('body_leave')
179
+ w << [:div, {:class=>'day'},
180
+ [:div, {:class=>'comment'},
181
+ [:div, {:class=>'caption'},
182
+ [:div, {:class=>'page_attribute'},
183
+ data[:pageattribute]]]]]
184
+
185
+ return nil # Do not return any value. Just destruct the template.
186
+ end
187
+
188
+ #alias surface_template old_surface_template
189
+ alias surface_template new_surface_template
190
+ end
191
+ end
192
+
193
+ if $0 == __FILE__
194
+ require 'qwik/test-common'
195
+ $test = true
196
+ end
197
+
198
+ if defined?($test) && $test
199
+ require 'qwik/test-module-public'
200
+
201
+ class TestActSurface < Test::Unit::TestCase
202
+ include TestSession
203
+ include TestModulePublic
204
+
205
+ def test_test_surface
206
+ t_add_user
207
+ res = session('/test/.test_surface')
208
+ ok_title 'act_test_surface'
209
+ end
210
+
211
+ def test_all
212
+ res = session
213
+
214
+ # @action.generate_surface_page('title', 'msg')
215
+ # ok_xp([:title, 'title'], 'title', res)
216
+
217
+ @action.c_surface('c_surface title') { 'msg' }
218
+ ok_title 'c_surface title'
219
+ end
220
+
221
+ def test_surface_generate
222
+ res = session
223
+
224
+ # test_original_template
225
+ template = @memory.template.get('surface')
226
+ eq [:h1], template.get_tag('h1')
227
+ eq [:div, {:class=>'body_main'}],
228
+ template.get_by_class('body_main')
229
+
230
+ # test_surface_generate
231
+ res = @action.surface_generate('title', 'msg')
232
+ eq [:title, 'title'], res.get_tag('title')
233
+ # eq [:script, {:src=>'.theme/js/base.js',
234
+ # :type=>'text/javascript'}, ''], res.get_tag('script')
235
+ eq [:h1, 'title'], res.get_tag('h1')
236
+ eq [:div, {:class=>'body_main'}, 'msg'],
237
+ res.get_path("//div[@class='body_main']")
238
+ end
239
+
240
+ def test_surface_build_template
241
+ res = session
242
+ t_make_public(Qwik::Action, :surface_template)
243
+ template = @memory.template.get('surface')
244
+ data = {
245
+ :title => 'title',
246
+ :theme_path => 'theme_path',
247
+ :adminmenu => 'adminmenu',
248
+ :toc => 'toc',
249
+ :h1 => 'h1',
250
+ :body => 'body',
251
+ :sidemenu => 'sidemenu',
252
+ :pageattribute => 'pageattribute',
253
+ }
254
+ @action.surface_template(template, data)
255
+ res.body = template
256
+ ok_title 'title'
257
+ ok_xp([:div, {:class=>'sidebar'}, 'sidemenu'],
258
+ "//div[@class='sidebar']")
259
+ end
260
+ end
261
+ end
@@ -0,0 +1,90 @@
1
+ # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ # This is free software with ABSOLUTELY NO WARRANTY.
3
+ # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
+
5
+ require 'uri'
6
+
7
+ $LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
8
+
9
+ module Qwik
10
+ class Action
11
+ # 1.html -> /test/1.html
12
+ def c_relative_to_root(url)
13
+ return url if /\A\// =~ url # It's already from root path.
14
+ uri = URI(@config.public_url)
15
+ return "#{uri.path}#{@site.url_path}#{url}"
16
+ end
17
+
18
+ # 1.html -> http://example.com/test/1.html
19
+ def c_relative_to_absolute(url)
20
+ if /\Ahttp:\/\// =~ url || /\Ahttps:\/\// =~ url
21
+ return url # It's already absolute URL.
22
+ end
23
+
24
+ # make absolute url
25
+ fromrootpath = c_relative_to_root(url)
26
+ return "#{@site.host_url.chomp('/')}#{fromrootpath}"
27
+ end
28
+
29
+ def is_valid_url?(str)
30
+ return %r!\Ahttp://[\-\_\.\/\?A-Za-z]+\z! =~ str
31
+ end
32
+ end
33
+ end
34
+
35
+ if $0 == __FILE__
36
+ require 'qwik/test-common'
37
+ $test = true
38
+ end
39
+
40
+ if defined?($test) && $test
41
+ class TestActUrl < Test::Unit::TestCase
42
+ include TestSession
43
+
44
+ def test_normal_site
45
+ res = session
46
+ eq '/test/1.html', @action.c_relative_to_root('1.html')
47
+ eq 'http://example.com/test/1.html',
48
+ @action.c_relative_to_absolute('1.html')
49
+ end
50
+
51
+ def test_top_site
52
+ res = session
53
+ @action.instance_eval {
54
+ @site = @memory.farm.get_top_site
55
+ }
56
+ eq '/1.html', @action.c_relative_to_root('1.html')
57
+ eq 'http://example.com/1.html', @action.c_relative_to_absolute('1.html')
58
+ end
59
+
60
+ def test_external_site
61
+ res = session
62
+ page = @site['_SiteConfig']
63
+ page.store(':siteurl:http://example.org/')
64
+ eq '/1.html', @action.c_relative_to_root('1.html')
65
+ eq 'http://example.org/1.html', @action.c_relative_to_absolute('1.html')
66
+ end
67
+
68
+ def test_with_path
69
+ t_with_path {
70
+ res = session
71
+ eq '/qwik/test/1.html', @action.c_relative_to_root('1.html')
72
+ eq 'http://www.example.org/qwik/test/1.html',
73
+ @action.c_relative_to_absolute('1.html')
74
+ }
75
+ end
76
+
77
+ def test_anomaly
78
+ res = session
79
+ eq '/.theme', @action.c_relative_to_root('/.theme')
80
+ eq 'http://example.gov/',
81
+ @action.c_relative_to_absolute('http://example.gov/')
82
+ end
83
+
84
+ def test_is_valid_url?
85
+ res = session
86
+ eq true, !!@action.is_valid_url?('http://e.com/')
87
+ eq true, !!@action.is_valid_url?("http://e.com/?")
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,12 @@
1
+ # Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
2
+ # This is free software with ABSOLUTELY NO WARRANTY.
3
+ # You can redistribute it and/or modify it under the terms of the GNU GPL 2.
4
+
5
+ all:
6
+ echo 'You can download dependencies by "make get"'
7
+
8
+ get: get_typekey
9
+
10
+ get_typekey:
11
+ wget http://jouno.s11.xrea.com/x/script/typekey/TypeKey.rb
12
+
@@ -0,0 +1 @@
1
+ $LOAD_PATH << File.expand_path(File::dirname(__FILE__))