qwik2md 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/qwik2md +17 -0
- data/lib/qwik2md/version.rb +3 -0
- data/lib/qwik2md.rb +39 -0
- data/qwik2md.gemspec +30 -0
- data/vendor/qwik/AUTHORS +10 -0
- data/vendor/qwik/COPYING +340 -0
- data/vendor/qwik/COPYRIGHT +346 -0
- data/vendor/qwik/lib/qwik/Makefile +63 -0
- data/vendor/qwik/lib/qwik/Rakefile +17 -0
- data/vendor/qwik/lib/qwik/act-aa.rb +83 -0
- data/vendor/qwik/lib/qwik/act-archive.rb +386 -0
- data/vendor/qwik/lib/qwik/act-attach.rb +304 -0
- data/vendor/qwik/lib/qwik/act-backup.rb +236 -0
- data/vendor/qwik/lib/qwik/act-basic.rb +325 -0
- data/vendor/qwik/lib/qwik/act-book.rb +161 -0
- data/vendor/qwik/lib/qwik/act-calc.rb +371 -0
- data/vendor/qwik/lib/qwik/act-charset.rb +251 -0
- data/vendor/qwik/lib/qwik/act-christel.rb +112 -0
- data/vendor/qwik/lib/qwik/act-chronology.rb +149 -0
- data/vendor/qwik/lib/qwik/act-code.rb +155 -0
- data/vendor/qwik/lib/qwik/act-comment.rb +554 -0
- data/vendor/qwik/lib/qwik/act-config.rb +49 -0
- data/vendor/qwik/lib/qwik/act-counter.rb +125 -0
- data/vendor/qwik/lib/qwik/act-day.rb +96 -0
- data/vendor/qwik/lib/qwik/act-describe.rb +135 -0
- data/vendor/qwik/lib/qwik/act-diary.rb +109 -0
- data/vendor/qwik/lib/qwik/act-edit.rb +317 -0
- data/vendor/qwik/lib/qwik/act-embed-html.rb +296 -0
- data/vendor/qwik/lib/qwik/act-emode.rb +150 -0
- data/vendor/qwik/lib/qwik/act-event.rb +187 -0
- data/vendor/qwik/lib/qwik/act-file.rb +303 -0
- data/vendor/qwik/lib/qwik/act-files.rb +771 -0
- data/vendor/qwik/lib/qwik/act-getpass.rb +295 -0
- data/vendor/qwik/lib/qwik/act-history.rb +136 -0
- data/vendor/qwik/lib/qwik/act-html.rb +204 -0
- data/vendor/qwik/lib/qwik/act-httpauth.rb +147 -0
- data/vendor/qwik/lib/qwik/act-include.rb +142 -0
- data/vendor/qwik/lib/qwik/act-interwiki.rb +189 -0
- data/vendor/qwik/lib/qwik/act-isearch.rb +109 -0
- data/vendor/qwik/lib/qwik/act-keywords.rb +137 -0
- data/vendor/qwik/lib/qwik/act-lang.rb +81 -0
- data/vendor/qwik/lib/qwik/act-license.rb +63 -0
- data/vendor/qwik/lib/qwik/act-list.rb +287 -0
- data/vendor/qwik/lib/qwik/act-login.rb +410 -0
- data/vendor/qwik/lib/qwik/act-logout.rb +60 -0
- data/vendor/qwik/lib/qwik/act-mail.rb +159 -0
- data/vendor/qwik/lib/qwik/act-map.rb +292 -0
- data/vendor/qwik/lib/qwik/act-md5.rb +42 -0
- data/vendor/qwik/lib/qwik/act-mdlb.rb +741 -0
- data/vendor/qwik/lib/qwik/act-media.rb +416 -0
- data/vendor/qwik/lib/qwik/act-member.rb +157 -0
- data/vendor/qwik/lib/qwik/act-menu.rb +142 -0
- data/vendor/qwik/lib/qwik/act-metadata.rb +323 -0
- data/vendor/qwik/lib/qwik/act-mlsubmitform.rb +49 -0
- data/vendor/qwik/lib/qwik/act-monitor.rb +167 -0
- data/vendor/qwik/lib/qwik/act-new.rb +418 -0
- data/vendor/qwik/lib/qwik/act-pagelist.rb +248 -0
- data/vendor/qwik/lib/qwik/act-password.rb +145 -0
- data/vendor/qwik/lib/qwik/act-plan.rb +210 -0
- data/vendor/qwik/lib/qwik/act-povray.rb +230 -0
- data/vendor/qwik/lib/qwik/act-presen.rb +380 -0
- data/vendor/qwik/lib/qwik/act-redirect.rb +133 -0
- data/vendor/qwik/lib/qwik/act-ring.rb +1071 -0
- data/vendor/qwik/lib/qwik/act-rrefs.rb +255 -0
- data/vendor/qwik/lib/qwik/act-ruby.rb +116 -0
- data/vendor/qwik/lib/qwik/act-sample.rb +170 -0
- data/vendor/qwik/lib/qwik/act-save.rb +295 -0
- data/vendor/qwik/lib/qwik/act-schedule.rb +374 -0
- data/vendor/qwik/lib/qwik/act-search.rb +180 -0
- data/vendor/qwik/lib/qwik/act-searchwords.rb +51 -0
- data/vendor/qwik/lib/qwik/act-sendpass.rb +83 -0
- data/vendor/qwik/lib/qwik/act-site.rb +89 -0
- data/vendor/qwik/lib/qwik/act-sitebackup.rb +419 -0
- data/vendor/qwik/lib/qwik/act-sitelog.rb +118 -0
- data/vendor/qwik/lib/qwik/act-smil.rb +299 -0
- data/vendor/qwik/lib/qwik/act-status.rb +220 -0
- data/vendor/qwik/lib/qwik/act-style.rb +608 -0
- data/vendor/qwik/lib/qwik/act-table.rb +263 -0
- data/vendor/qwik/lib/qwik/act-tableform.rb +241 -0
- data/vendor/qwik/lib/qwik/act-tag.rb +103 -0
- data/vendor/qwik/lib/qwik/act-text.rb +70 -0
- data/vendor/qwik/lib/qwik/act-textarea.rb +164 -0
- data/vendor/qwik/lib/qwik/act-theme.rb +346 -0
- data/vendor/qwik/lib/qwik/act-toc.rb +112 -0
- data/vendor/qwik/lib/qwik/act-typekey.rb +198 -0
- data/vendor/qwik/lib/qwik/act-under-const.rb +94 -0
- data/vendor/qwik/lib/qwik/act-webservice.rb +321 -0
- data/vendor/qwik/lib/qwik/act-wema.rb +558 -0
- data/vendor/qwik/lib/qwik/act-wysiwyg.rb +238 -0
- data/vendor/qwik/lib/qwik/action.rb +325 -0
- data/vendor/qwik/lib/qwik/autoreload.rb +98 -0
- data/vendor/qwik/lib/qwik/bench-bench.rb +28 -0
- data/vendor/qwik/lib/qwik/bench-emode.rb +47 -0
- data/vendor/qwik/lib/qwik/bench-format-xml.rb +70 -0
- data/vendor/qwik/lib/qwik/bench-large-table.rb +62 -0
- data/vendor/qwik/lib/qwik/bench-md5.rb +14 -0
- data/vendor/qwik/lib/qwik/bench-module-session.rb +19 -0
- data/vendor/qwik/lib/qwik/bench-page.rb +50 -0
- data/vendor/qwik/lib/qwik/bench-s-md5.rb +28 -0
- data/vendor/qwik/lib/qwik/bench-session.rb +25 -0
- data/vendor/qwik/lib/qwik/bench-textformat.rb +31 -0
- data/vendor/qwik/lib/qwik/catalog-factory.rb +91 -0
- data/vendor/qwik/lib/qwik/catalog-ja.rb +479 -0
- data/vendor/qwik/lib/qwik/catalog-ml-ja.rb +145 -0
- data/vendor/qwik/lib/qwik/check-act-monitor.rb +112 -0
- data/vendor/qwik/lib/qwik/check-act-monitor2.rb +46 -0
- data/vendor/qwik/lib/qwik/check-act-theme.rb +27 -0
- data/vendor/qwik/lib/qwik/check-event.rb +112 -0
- data/vendor/qwik/lib/qwik/check-event2.rb +55 -0
- data/vendor/qwik/lib/qwik/check-htree-rexml.rb +77 -0
- data/vendor/qwik/lib/qwik/check-htree.rb +51 -0
- data/vendor/qwik/lib/qwik/check-libxml.rb +135 -0
- data/vendor/qwik/lib/qwik/check-many-pages.rb +47 -0
- data/vendor/qwik/lib/qwik/check-monitor.rb +33 -0
- data/vendor/qwik/lib/qwik/check-observer.rb +67 -0
- data/vendor/qwik/lib/qwik/check-server.rb +61 -0
- data/vendor/qwik/lib/qwik/check-uuencode.rb +33 -0
- data/vendor/qwik/lib/qwik/check-webdav.rb +65 -0
- data/vendor/qwik/lib/qwik/check-xml-xpath.rb +27 -0
- data/vendor/qwik/lib/qwik/common-backtrace.rb +94 -0
- data/vendor/qwik/lib/qwik/common-basic.rb +111 -0
- data/vendor/qwik/lib/qwik/common-condition.rb +142 -0
- data/vendor/qwik/lib/qwik/common-error.rb +48 -0
- data/vendor/qwik/lib/qwik/common-gettext.rb +50 -0
- data/vendor/qwik/lib/qwik/common-javascript.rb +45 -0
- data/vendor/qwik/lib/qwik/common-notice.rb +132 -0
- data/vendor/qwik/lib/qwik/common-plain.rb +105 -0
- data/vendor/qwik/lib/qwik/common-plugin.rb +111 -0
- data/vendor/qwik/lib/qwik/common-res.rb +76 -0
- data/vendor/qwik/lib/qwik/common-resolve.rb +92 -0
- data/vendor/qwik/lib/qwik/common-send.rb +171 -0
- data/vendor/qwik/lib/qwik/common-session.rb +139 -0
- data/vendor/qwik/lib/qwik/common-surface.rb +261 -0
- data/vendor/qwik/lib/qwik/common-url.rb +90 -0
- data/vendor/qwik/lib/qwik/compat/Makefile +12 -0
- data/vendor/qwik/lib/qwik/compat/add_load_path.rb +1 -0
- data/vendor/qwik/lib/qwik/config.rb +299 -0
- data/vendor/qwik/lib/qwik/db-b-backup.rb +142 -0
- data/vendor/qwik/lib/qwik/db-backup.rb +184 -0
- data/vendor/qwik/lib/qwik/db-berkeley.rb +306 -0
- data/vendor/qwik/lib/qwik/db-filesystem.rb +305 -0
- data/vendor/qwik/lib/qwik/db-indexer.rb +154 -0
- data/vendor/qwik/lib/qwik/db-searchwords.rb +238 -0
- data/vendor/qwik/lib/qwik/description-ja.rb +267 -0
- data/vendor/qwik/lib/qwik/description.rb +256 -0
- data/vendor/qwik/lib/qwik/dev-add-copyright.rb +23 -0
- data/vendor/qwik/lib/qwik/dev-backup.rb +24 -0
- data/vendor/qwik/lib/qwik/dev-bench.rb +175 -0
- data/vendor/qwik/lib/qwik/dev-calctime.rb +52 -0
- data/vendor/qwik/lib/qwik/dev-css-compressor.rb +60 -0
- data/vendor/qwik/lib/qwik/dev-extract-catalog.rb +102 -0
- data/vendor/qwik/lib/qwik/dev-js-compressor.rb +73 -0
- data/vendor/qwik/lib/qwik/dev-release.rb +235 -0
- data/vendor/qwik/lib/qwik/dev-replace.rb +353 -0
- data/vendor/qwik/lib/qwik/dev-sendmail.rb +25 -0
- data/vendor/qwik/lib/qwik/farm.rb +283 -0
- data/vendor/qwik/lib/qwik/gettext.rb +56 -0
- data/vendor/qwik/lib/qwik/group-cond.rb +157 -0
- data/vendor/qwik/lib/qwik/group-config.rb +247 -0
- data/vendor/qwik/lib/qwik/group-confirm.rb +147 -0
- data/vendor/qwik/lib/qwik/group-db.rb +326 -0
- data/vendor/qwik/lib/qwik/group-mail.rb +195 -0
- data/vendor/qwik/lib/qwik/group-member.rb +307 -0
- data/vendor/qwik/lib/qwik/group-sendmail.rb +231 -0
- data/vendor/qwik/lib/qwik/group-site.rb +374 -0
- data/vendor/qwik/lib/qwik/group-sweep.rb +63 -0
- data/vendor/qwik/lib/qwik/group.rb +157 -0
- data/vendor/qwik/lib/qwik/helper.rb +6 -0
- data/vendor/qwik/lib/qwik/html-generator.rb +104 -0
- data/vendor/qwik/lib/qwik/html-to-wabisabi.rb +148 -0
- data/vendor/qwik/lib/qwik/htree-diff.rb +87 -0
- data/vendor/qwik/lib/qwik/htree-format-xml.rb +57 -0
- data/vendor/qwik/lib/qwik/htree-generator.rb +144 -0
- data/vendor/qwik/lib/qwik/htree-get.rb +251 -0
- data/vendor/qwik/lib/qwik/htree-html-generator.rb +179 -0
- data/vendor/qwik/lib/qwik/htree-template.rb +263 -0
- data/vendor/qwik/lib/qwik/htree-to-wabisabi.rb +171 -0
- data/vendor/qwik/lib/qwik/loadlib.rb +79 -0
- data/vendor/qwik/lib/qwik/logger.rb +115 -0
- data/vendor/qwik/lib/qwik/mail-body.rb +171 -0
- data/vendor/qwik/lib/qwik/mail-header.rb +474 -0
- data/vendor/qwik/lib/qwik/mail-multipart.rb +193 -0
- data/vendor/qwik/lib/qwik/mail-parse.rb +147 -0
- data/vendor/qwik/lib/qwik/mail.rb +341 -0
- data/vendor/qwik/lib/qwik/mailaddress.rb +83 -0
- data/vendor/qwik/lib/qwik/mdlb-model.rb +81 -0
- data/vendor/qwik/lib/qwik/mdlb-sample.rb +324 -0
- data/vendor/qwik/lib/qwik/ml-catalog-factory.rb +27 -0
- data/vendor/qwik/lib/qwik/ml-exception.rb +15 -0
- data/vendor/qwik/lib/qwik/ml-generator.rb +28 -0
- data/vendor/qwik/lib/qwik/ml-gettext.rb +137 -0
- data/vendor/qwik/lib/qwik/ml-logger.rb +82 -0
- data/vendor/qwik/lib/qwik/ml-memory.rb +65 -0
- data/vendor/qwik/lib/qwik/ml-msg-validator.rb +86 -0
- data/vendor/qwik/lib/qwik/ml-processor.rb +609 -0
- data/vendor/qwik/lib/qwik/ml-quickml-server.rb +122 -0
- data/vendor/qwik/lib/qwik/ml-sendmail.rb +0 -0
- data/vendor/qwik/lib/qwik/ml-server.rb +107 -0
- data/vendor/qwik/lib/qwik/ml-session.rb +348 -0
- data/vendor/qwik/lib/qwik/ml-sweeper.rb +101 -0
- data/vendor/qwik/lib/qwik/mock-logger.rb +65 -0
- data/vendor/qwik/lib/qwik/mock-sendmail.rb +78 -0
- data/vendor/qwik/lib/qwik/mock-socket.rb +82 -0
- data/vendor/qwik/lib/qwik/modulobe.rb +406 -0
- data/vendor/qwik/lib/qwik/mongrel-server.rb +72 -0
- data/vendor/qwik/lib/qwik/page-files.rb +249 -0
- data/vendor/qwik/lib/qwik/page-generate.rb +82 -0
- data/vendor/qwik/lib/qwik/page-get.rb +262 -0
- data/vendor/qwik/lib/qwik/page-images.rb +168 -0
- data/vendor/qwik/lib/qwik/page-put.rb +128 -0
- data/vendor/qwik/lib/qwik/page-rrefs.rb +154 -0
- data/vendor/qwik/lib/qwik/page-title.rb +0 -0
- data/vendor/qwik/lib/qwik/page-wikidb.rb +234 -0
- data/vendor/qwik/lib/qwik/page.rb +67 -0
- data/vendor/qwik/lib/qwik/pages.rb +444 -0
- data/vendor/qwik/lib/qwik/parse-plugin.rb +249 -0
- data/vendor/qwik/lib/qwik/parser-emode.rb +116 -0
- data/vendor/qwik/lib/qwik/parser-inline.rb +272 -0
- data/vendor/qwik/lib/qwik/parser.rb +349 -0
- data/vendor/qwik/lib/qwik/password.rb +183 -0
- data/vendor/qwik/lib/qwik/periodic.rb +79 -0
- data/vendor/qwik/lib/qwik/qp.rb +56 -0
- data/vendor/qwik/lib/qwik/qwik-service.rb +341 -0
- data/vendor/qwik/lib/qwik/qwik.rb +5 -0
- data/vendor/qwik/lib/qwik/qwikweb-adduser.rb +34 -0
- data/vendor/qwik/lib/qwik/qwikweb-catalog-validator.rb +110 -0
- data/vendor/qwik/lib/qwik/qwikweb-incgen.rb +28 -0
- data/vendor/qwik/lib/qwik/qwikweb-makesite.rb +41 -0
- data/vendor/qwik/lib/qwik/qwikweb-server.rb +44 -0
- data/vendor/qwik/lib/qwik/qwikweb-showpassword.rb +26 -0
- data/vendor/qwik/lib/qwik/qwikweb-watchlog.rb +67 -0
- data/vendor/qwik/lib/qwik/request-path.rb +304 -0
- data/vendor/qwik/lib/qwik/request-ua.rb +76 -0
- data/vendor/qwik/lib/qwik/request-webrick.rb +81 -0
- data/vendor/qwik/lib/qwik/request.rb +91 -0
- data/vendor/qwik/lib/qwik/resolve-tdiary.rb +292 -0
- data/vendor/qwik/lib/qwik/resolve.rb +121 -0
- data/vendor/qwik/lib/qwik/response.rb +228 -0
- data/vendor/qwik/lib/qwik/server-memory.rb +57 -0
- data/vendor/qwik/lib/qwik/server-webrick.rb +102 -0
- data/vendor/qwik/lib/qwik/server.rb +252 -0
- data/vendor/qwik/lib/qwik/site-config.rb +149 -0
- data/vendor/qwik/lib/qwik/site-db.rb +136 -0
- data/vendor/qwik/lib/qwik/site-event.rb +162 -0
- data/vendor/qwik/lib/qwik/site-files.rb +86 -0
- data/vendor/qwik/lib/qwik/site-group.rb +103 -0
- data/vendor/qwik/lib/qwik/site-index.rb +47 -0
- data/vendor/qwik/lib/qwik/site-log.rb +64 -0
- data/vendor/qwik/lib/qwik/site-member.rb +230 -0
- data/vendor/qwik/lib/qwik/site-monitor.rb +97 -0
- data/vendor/qwik/lib/qwik/site-pages.rb +62 -0
- data/vendor/qwik/lib/qwik/site-plan.rb +139 -0
- data/vendor/qwik/lib/qwik/site-report.rb +282 -0
- data/vendor/qwik/lib/qwik/site-resolve.rb +230 -0
- data/vendor/qwik/lib/qwik/site-rrefs.rb +18 -0
- data/vendor/qwik/lib/qwik/site-search.rb +180 -0
- data/vendor/qwik/lib/qwik/site-timeline.rb +153 -0
- data/vendor/qwik/lib/qwik/site-url.rb +189 -0
- data/vendor/qwik/lib/qwik/site.rb +76 -0
- data/vendor/qwik/lib/qwik/smil-time.rb +105 -0
- data/vendor/qwik/lib/qwik/smtp-session.rb +331 -0
- data/vendor/qwik/lib/qwik/template-generator.rb +149 -0
- data/vendor/qwik/lib/qwik/template.rb +85 -0
- data/vendor/qwik/lib/qwik/test-common.rb +10 -0
- data/vendor/qwik/lib/qwik/test-ml-info.rb +225 -0
- data/vendor/qwik/lib/qwik/test-module-ml.rb +142 -0
- data/vendor/qwik/lib/qwik/test-module-path.rb +110 -0
- data/vendor/qwik/lib/qwik/test-module-public.rb +70 -0
- data/vendor/qwik/lib/qwik/test-module-server.rb +98 -0
- data/vendor/qwik/lib/qwik/test-module-session.rb +264 -0
- data/vendor/qwik/lib/qwik/test-module-suite.rb +91 -0
- data/vendor/qwik/lib/qwik/test-ms-applemail.rb +59 -0
- data/vendor/qwik/lib/qwik/test-ms-attach.rb +174 -0
- data/vendor/qwik/lib/qwik/test-ms-basic.rb +40 -0
- data/vendor/qwik/lib/qwik/test-ms-close.rb +35 -0
- data/vendor/qwik/lib/qwik/test-ms-confirm.rb +75 -0
- data/vendor/qwik/lib/qwik/test-ms-ignore-spam.rb +57 -0
- data/vendor/qwik/lib/qwik/test-ms-japanese.rb +97 -0
- data/vendor/qwik/lib/qwik/test-ms-jfilename.rb +82 -0
- data/vendor/qwik/lib/qwik/test-ms-large.rb +58 -0
- data/vendor/qwik/lib/qwik/test-ms-member.rb +103 -0
- data/vendor/qwik/lib/qwik/test-ms-multipart.rb +84 -0
- data/vendor/qwik/lib/qwik/test-ms-org.rb +129 -0
- data/vendor/qwik/lib/qwik/test-ms-plan.rb +130 -0
- data/vendor/qwik/lib/qwik/test-ms-post.rb +53 -0
- data/vendor/qwik/lib/qwik/test-ms-quopri.rb +76 -0
- data/vendor/qwik/lib/qwik/test-sub-quopri.rb +45 -0
- data/vendor/qwik/lib/qwik/test-submit-base64.rb +59 -0
- data/vendor/qwik/lib/qwik/test-submit-forward.rb +61 -0
- data/vendor/qwik/lib/qwik/test-submit-html-mail.rb +52 -0
- data/vendor/qwik/lib/qwik/test-submit-japanese.rb +135 -0
- data/vendor/qwik/lib/qwik/test-submit-jfilename.rb +144 -0
- data/vendor/qwik/lib/qwik/test-submit-uuencode.rb +71 -0
- data/vendor/qwik/lib/qwik/test-suite-all.rb +8 -0
- data/vendor/qwik/lib/qwik/test-suite-basic.rb +9 -0
- data/vendor/qwik/lib/qwik/test-suite-ml.rb +9 -0
- data/vendor/qwik/lib/qwik/test-typekey.rb +64 -0
- data/vendor/qwik/lib/qwik/testunit.rb +45 -0
- data/vendor/qwik/lib/qwik/tokenizer-inline.rb +288 -0
- data/vendor/qwik/lib/qwik/tokenizer.rb +331 -0
- data/vendor/qwik/lib/qwik/typekey.rb +160 -0
- data/vendor/qwik/lib/qwik/util-basic.rb +135 -0
- data/vendor/qwik/lib/qwik/util-charset.rb +331 -0
- data/vendor/qwik/lib/qwik/util-css.rb +56 -0
- data/vendor/qwik/lib/qwik/util-csv-tokenizer.rb +113 -0
- data/vendor/qwik/lib/qwik/util-filename.rb +112 -0
- data/vendor/qwik/lib/qwik/util-pathname.rb +202 -0
- data/vendor/qwik/lib/qwik/util-pid.rb +58 -0
- data/vendor/qwik/lib/qwik/util-safe.rb +67 -0
- data/vendor/qwik/lib/qwik/util-sendmail.rb +273 -0
- data/vendor/qwik/lib/qwik/util-string.rb +202 -0
- data/vendor/qwik/lib/qwik/util-time.rb +125 -0
- data/vendor/qwik/lib/qwik/util-webrick.rb +176 -0
- data/vendor/qwik/lib/qwik/version.rb +11 -0
- data/vendor/qwik/lib/qwik/wabisabi-basic.rb +163 -0
- data/vendor/qwik/lib/qwik/wabisabi-diff.rb +130 -0
- data/vendor/qwik/lib/qwik/wabisabi-format-xml.rb +310 -0
- data/vendor/qwik/lib/qwik/wabisabi-generator.rb +262 -0
- data/vendor/qwik/lib/qwik/wabisabi-index.rb +174 -0
- data/vendor/qwik/lib/qwik/wabisabi-table.rb +212 -0
- data/vendor/qwik/lib/qwik/wabisabi-template.rb +295 -0
- data/vendor/qwik/lib/qwik/wabisabi-to-htree.rb +111 -0
- data/vendor/qwik/lib/qwik/wabisabi-to-wiki.rb +690 -0
- data/vendor/qwik/lib/qwik/wabisabi-traverse.rb +207 -0
- data/vendor/qwik/lib/qwik/wabisabi-validator.rb +116 -0
- data/vendor/qwik/lib/qwik/wabisabi.rb +5 -0
- metadata +492 -0
@@ -0,0 +1,554 @@
|
|
1
|
+
# -*- coding: shift_jis -*-
|
2
|
+
# Copyright (C) 2003-2006 Kouichirou Eto, All rights reserved.
|
3
|
+
# This is free software with ABSOLUTELY NO WARRANTY.
|
4
|
+
# You can redistribute it and/or modify it under the terms of the GNU GPL 2.
|
5
|
+
|
6
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
7
|
+
|
8
|
+
module Qwik
|
9
|
+
class Action
|
10
|
+
D_PluginComment = {
|
11
|
+
:dt => 'Comment plugin',
|
12
|
+
:dd => 'You can show comment field.',
|
13
|
+
:dc => "
|
14
|
+
* Multiline comment plugin
|
15
|
+
You can show a multi line comment field.
|
16
|
+
{{mcomment}}
|
17
|
+
{{mcomment}}
|
18
|
+
Add (1) to args, then you see the newest comment on the top.
|
19
|
+
{{mcomment(1)}}
|
20
|
+
* Hiki like comment plugin
|
21
|
+
You can show a Hiki like comment field.
|
22
|
+
{{hcomment}}
|
23
|
+
{{hcomment}}
|
24
|
+
Add (1) to args, then you see the newest comment on the top.
|
25
|
+
{{hcomment(1)}}
|
26
|
+
* Old comment plugin
|
27
|
+
This plugin is obsolete. Please use 'mcomment' plugin instead.
|
28
|
+
{{comment}}
|
29
|
+
{{comment}}
|
30
|
+
"
|
31
|
+
}
|
32
|
+
|
33
|
+
D_PluginComment_ja = {
|
34
|
+
:dt => 'コメント・プラグイン',
|
35
|
+
:dd => 'コメント入力欄を表示します。',
|
36
|
+
:dc => "
|
37
|
+
* 複数行コメント・プラグイン
|
38
|
+
複数行入力できるコメント・プラグインです。
|
39
|
+
{{mcomment}}
|
40
|
+
{{mcomment}}
|
41
|
+
このように、(1)をつけると、新しいコメントが一番上につくようになります。
|
42
|
+
{{mcomment(1)}}
|
43
|
+
* Hiki風コメント・プラグイン
|
44
|
+
Hikiのコメント・プラグインとほぼ同じ使い方ができます。
|
45
|
+
{{hcomment}}
|
46
|
+
{{hcomment}}
|
47
|
+
同様に、(1)をつけると、新しいコメントが一番上につくようになります。
|
48
|
+
{{hcomment(1)}}
|
49
|
+
* 旧コメント・プラグイン
|
50
|
+
古い仕様のコメントプラグインですので、利用は推奨しません。
|
51
|
+
「mcomment」プラグインを推奨します。
|
52
|
+
{{comment}}
|
53
|
+
{{comment}}
|
54
|
+
"
|
55
|
+
}
|
56
|
+
|
57
|
+
# ============================== comment
|
58
|
+
def plg_comment
|
59
|
+
action = "#{@req.base}.comment"
|
60
|
+
user = @req.user
|
61
|
+
return [:div, {:class=>'comment'},
|
62
|
+
[:form, {:action=>action},
|
63
|
+
[:dl,
|
64
|
+
[:dt, _('User')],
|
65
|
+
[:dd, [:em, user]],
|
66
|
+
[:dt, _('Message')],
|
67
|
+
[:dd, [:textarea, {:name=>'msg', :cols=>'40', :rows=>'7'}, '']],
|
68
|
+
[:dd, [:input, {:type=>'submit', :value=>'POST'}]]]]]
|
69
|
+
end
|
70
|
+
|
71
|
+
def ext_comment
|
72
|
+
user = MailAddress.obfuscate(@req.user)
|
73
|
+
ymdx = @req.start_time.ymdx
|
74
|
+
|
75
|
+
msg = "\n" + @req.query['msg']
|
76
|
+
msg = msg.normalize_newline
|
77
|
+
msg = msg.gsub("\n", '{{br}}')
|
78
|
+
content = ":#{user} (#{ymdx}):#{msg}\n"
|
79
|
+
|
80
|
+
page = @site[@req.base]
|
81
|
+
page.add(content)
|
82
|
+
c_make_log('comment') # COMMENT
|
83
|
+
url = @req.base+'.html'
|
84
|
+
return c_notice(_('Message has been added.'), url) {
|
85
|
+
[[:h2, _('Message has been added.')],
|
86
|
+
[:p, [:a, {:href=>url}, _('Go back')]]]
|
87
|
+
}
|
88
|
+
end
|
89
|
+
|
90
|
+
# ============================== Hiki style comment
|
91
|
+
def plg_hcomment(style='0')
|
92
|
+
action = @req.base+'.hcomment'
|
93
|
+
|
94
|
+
style = style.to_i
|
95
|
+
style = 0 if style != 1
|
96
|
+
|
97
|
+
# @hcomment_num is global for an action.
|
98
|
+
@hcomment_num = 0 if !defined?(@hcomment_num)
|
99
|
+
@hcomment_num += 1
|
100
|
+
num = @hcomment_num
|
101
|
+
|
102
|
+
return [:div, {:class=>'hcomment'},
|
103
|
+
[:form, {:method=>'POST', :action=>action},
|
104
|
+
_('Name'), ': ', [:input, {:name=>'name', :size=>10}], ' ',
|
105
|
+
_('Comment'), ': ', [:input, {:name=>'msg', :size=>50}], ' ',
|
106
|
+
[:input, {:type=>'submit', :name=>'comment', :value=>_('Submit')}],
|
107
|
+
[:input, {:type=>'hidden', :name=>'comment_no', :value=>num}],
|
108
|
+
[:input, {:type=>'hidden', :name=>'style', :value=>style}]]]
|
109
|
+
end
|
110
|
+
|
111
|
+
def ext_hcomment
|
112
|
+
#c_require_login # Guest can post.
|
113
|
+
c_require_login # Guest cannot post.
|
114
|
+
c_require_post
|
115
|
+
|
116
|
+
date = @req.start_time.ymdx
|
117
|
+
user = @req.query['name']
|
118
|
+
user = _('Anonymous') if user.nil? || user.empty?
|
119
|
+
msg = @req.query['msg']
|
120
|
+
return c_nerror('no message') if msg.nil? || msg.empty?
|
121
|
+
content = "- #{date} '''#{user}''' : #{msg}\n"
|
122
|
+
|
123
|
+
comment_no = @req.query['comment_no'].to_i
|
124
|
+
comment_no = 1 if comment_no < 1
|
125
|
+
style = @req.query['style'].to_i
|
126
|
+
style = 0 if style != 1
|
127
|
+
|
128
|
+
page = @site[@req.base]
|
129
|
+
str = page.load
|
130
|
+
md5 = str.md5hex
|
131
|
+
|
132
|
+
new_str, written = hcomment_add_to_page(str, comment_no, style, content)
|
133
|
+
|
134
|
+
return c_nerror(_('Failed')) if !written
|
135
|
+
|
136
|
+
begin
|
137
|
+
page.put_with_md5(new_str, md5)
|
138
|
+
rescue PageCollisionError
|
139
|
+
return hcomment_error(_('Page collision detected.'))
|
140
|
+
end
|
141
|
+
|
142
|
+
c_make_log('hcomment') # COMMENT
|
143
|
+
|
144
|
+
url = @req.base+'.html'
|
145
|
+
return c_notice(_('Add a comment.'), url){
|
146
|
+
[[:h2, _('Message has been added.')],
|
147
|
+
[:p, [:a, {:href=>url}, _('Go back')]]]
|
148
|
+
}
|
149
|
+
end
|
150
|
+
|
151
|
+
def hcomment_error(msg, url)
|
152
|
+
return c_nerror(msg){
|
153
|
+
[[:h2, msg],
|
154
|
+
[:p, msg],
|
155
|
+
[:p, _('Go back and input again.')],
|
156
|
+
[:dl,
|
157
|
+
[:dt, _('Name')], [:dd, user],
|
158
|
+
[:dt, _('Comment')], [:dd, msg],
|
159
|
+
[:p, [:a, {:href=>url}, _('Go back')]]]]
|
160
|
+
}
|
161
|
+
end
|
162
|
+
|
163
|
+
def hcomment_add_to_page(str, comment_no, style, content)
|
164
|
+
new_str = ''
|
165
|
+
num = 1
|
166
|
+
written = false
|
167
|
+
str.each {|line|
|
168
|
+
if /\A\{\{hcomment/ =~ line && !written
|
169
|
+
if num == comment_no
|
170
|
+
new_str << content if style == 0 # new comment is on the bottom.
|
171
|
+
new_str << line
|
172
|
+
new_str << content if style == 1 # new comment is on the top.
|
173
|
+
written = true
|
174
|
+
else
|
175
|
+
new_str << line
|
176
|
+
num += 1
|
177
|
+
end
|
178
|
+
else
|
179
|
+
new_str << line
|
180
|
+
end
|
181
|
+
}
|
182
|
+
return new_str, written
|
183
|
+
end
|
184
|
+
|
185
|
+
# ============================== Multiline comment
|
186
|
+
def plg_nomore_mcomment(style='0', cols='50', rows='4')
|
187
|
+
# Just show the content. No more post.
|
188
|
+
content = ''
|
189
|
+
content = yield if block_given?
|
190
|
+
messages = mcomment_construct_messages(content)
|
191
|
+
div = [:div, {:class=>'mcomment'}]
|
192
|
+
div += messages
|
193
|
+
return div
|
194
|
+
end
|
195
|
+
|
196
|
+
def plg_mcomment(style='0', cols='50', rows='4')
|
197
|
+
# @mcomment_num is global for an action.
|
198
|
+
@mcomment_num = 0 if !defined?(@mcomment_num)
|
199
|
+
@mcomment_num += 1
|
200
|
+
num = @mcomment_num
|
201
|
+
style = style.to_i
|
202
|
+
style = 0 if style != 1
|
203
|
+
action = "#{@req.base}.#{num}.#{style}.mcomment"
|
204
|
+
|
205
|
+
content = ''
|
206
|
+
content = yield if block_given?
|
207
|
+
messages = mcomment_construct_messages(content)
|
208
|
+
|
209
|
+
div = [:div, {:class=>'mcomment'}]
|
210
|
+
div += messages if style == 0
|
211
|
+
|
212
|
+
form = [:form, {:method=>'POST', :action=>action},
|
213
|
+
[:p, _('Name'), ': ', [:input, {:name=>'u', :size=>'30'}]],
|
214
|
+
[:p, _('Comment'), ': ',
|
215
|
+
[:textarea, {:name=>'m', :cols=>cols, :rows=>rows}, '']],
|
216
|
+
[:input, {:type=>'submit', :value=>_('Submit')}]]
|
217
|
+
|
218
|
+
form = [:form, {:method=>'POST', :action=>action},
|
219
|
+
[:table,
|
220
|
+
[:tr,
|
221
|
+
[:th, _('Name')],
|
222
|
+
[:td, [:input, {:name=>'u', :size=>'30'}]]],
|
223
|
+
[:tr,
|
224
|
+
[:th, _('Comment')],
|
225
|
+
[:td, [:textarea, {:name=>'m', :cols=>cols, :rows=>rows}, '']]],
|
226
|
+
[:tr,
|
227
|
+
[:th, ''],
|
228
|
+
[:td, [:input, {:type=>'submit', :value=>_('Submit')}]]]]]
|
229
|
+
|
230
|
+
div << form
|
231
|
+
|
232
|
+
div += messages if style == 1
|
233
|
+
return div
|
234
|
+
end
|
235
|
+
|
236
|
+
def mcomment_construct_messages(content)
|
237
|
+
messages = []
|
238
|
+
content.each {|line|
|
239
|
+
line.chomp!
|
240
|
+
dummy, date, user, msg = line.split('|', 4)
|
241
|
+
date = Time.at(date.to_i).ymd
|
242
|
+
msg ||= ''
|
243
|
+
msg.gsub!(/\\n/, "\n")
|
244
|
+
mm = []
|
245
|
+
msg.each {|m|
|
246
|
+
mm << m
|
247
|
+
mm << [:br]
|
248
|
+
}
|
249
|
+
messages << [:div, {:class=>'msg'},
|
250
|
+
[:dl, [:dt, [:span, {:class=>'date'}, date],
|
251
|
+
[:span, {:class=>'user'}, user]], [:dd, *mm]]]
|
252
|
+
}
|
253
|
+
return messages
|
254
|
+
end
|
255
|
+
|
256
|
+
def ext_mcomment
|
257
|
+
#c_require_login # Guest can also post comment.
|
258
|
+
c_require_login # Guest cannot post.
|
259
|
+
c_require_post
|
260
|
+
c_require_page_exist
|
261
|
+
|
262
|
+
date = @req.start_time.to_i
|
263
|
+
|
264
|
+
num = @req.ext_args[0].to_i
|
265
|
+
return c_nerror(_('Error')) if num < 1
|
266
|
+
|
267
|
+
style = @req.ext_args[1].to_i
|
268
|
+
style = 0 if style != 1
|
269
|
+
|
270
|
+
user = @req.query['u']
|
271
|
+
user = _('Anonymous') if user.nil? || user.empty?
|
272
|
+
|
273
|
+
msg = @req.query['m']
|
274
|
+
return c_nerror(_('No message.')) if msg.nil? || msg.empty?
|
275
|
+
msg = msg.normalize_newline
|
276
|
+
msg.gsub!("\n", "\\n")
|
277
|
+
|
278
|
+
comment = "|#{date}|#{user}|#{msg}\n"
|
279
|
+
|
280
|
+
begin
|
281
|
+
plugin_edit(:mcomment, num) {|content|
|
282
|
+
if style == 0
|
283
|
+
content += comment
|
284
|
+
else
|
285
|
+
content = comment + content
|
286
|
+
end
|
287
|
+
content
|
288
|
+
}
|
289
|
+
rescue NoCorrespondingPlugin
|
290
|
+
return c_nerror(_('Failed'))
|
291
|
+
rescue PageCollisionError
|
292
|
+
return mcomment_error(_('Page collision detected.'))
|
293
|
+
end
|
294
|
+
|
295
|
+
c_make_log('mcomment') # COMMENT
|
296
|
+
|
297
|
+
url = "#{@req.base}.html"
|
298
|
+
return c_notice(_('Add a comment.'), url){
|
299
|
+
[[:h2, _('Message has been added.')],
|
300
|
+
[:p, [:a, {:href=>url}, _('Go back')]]]
|
301
|
+
}
|
302
|
+
end
|
303
|
+
|
304
|
+
def mcomment_error(msg, url)
|
305
|
+
return c_nerror(msg){
|
306
|
+
[[:h2, msg],
|
307
|
+
[:p, msg],
|
308
|
+
[:p, _('Go back and input again.')],
|
309
|
+
[:dl,
|
310
|
+
[:dt, _('Name')], [:dd, user],
|
311
|
+
[:dt, _('Comment')], [:dd, msg],
|
312
|
+
[:p, [:a, {:href=>url}, _('Go back')]]]]
|
313
|
+
}
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
318
|
+
if $0 == __FILE__
|
319
|
+
require 'qwik/test-common'
|
320
|
+
$test = true
|
321
|
+
end
|
322
|
+
|
323
|
+
if defined?($test) && $test
|
324
|
+
class TestActComment < Test::Unit::TestCase
|
325
|
+
include TestSession
|
326
|
+
|
327
|
+
def test_plg_comment
|
328
|
+
t_add_user
|
329
|
+
ok_wi([:div, {:class=>'comment'},
|
330
|
+
[:form, {:action=>'1.comment'},
|
331
|
+
[:dl,
|
332
|
+
[:dt, 'User'],
|
333
|
+
[:dd, [:em, 'user@e.com']],
|
334
|
+
[:dt, 'Message'],
|
335
|
+
[:dd, [:textarea,
|
336
|
+
{:rows=>'7', :name=>'msg', :cols=>'40'}, '']],
|
337
|
+
[:dd, [:input, {:value=>'POST', :type=>'submit'}]]]]],
|
338
|
+
'{{comment}}')
|
339
|
+
end
|
340
|
+
|
341
|
+
def test_comment
|
342
|
+
t_add_user
|
343
|
+
|
344
|
+
page = @site.create_new
|
345
|
+
page.store '{{comment}}'
|
346
|
+
|
347
|
+
res = session('/test/1.html')
|
348
|
+
ok_xp([:textarea, {:cols=>'40', :rows=>'7', :name=>'msg'}, ''],
|
349
|
+
'//textarea')
|
350
|
+
|
351
|
+
# The 1st comment.
|
352
|
+
res = session('/test/1.comment?msg=Hi')
|
353
|
+
ok_title('Message has been added.')
|
354
|
+
|
355
|
+
res = session('/test/1.html')
|
356
|
+
ok_xp([:dl, [:dt, 'user@e... (1970-01-01 09:00:00)'], [:dd, [:br], 'Hi']],
|
357
|
+
"//div[@class='section']/dl[2]")
|
358
|
+
|
359
|
+
page = @site['_SiteChanged']
|
360
|
+
assert_match(/^,[.0-9]+,user@e.com,comment,1$/, page.load)
|
361
|
+
|
362
|
+
# The 2nd comment.
|
363
|
+
res = session('/test/1.comment?msg=hello%0aworld')
|
364
|
+
ok_title('Message has been added.')
|
365
|
+
|
366
|
+
res = session('/test/1.html')
|
367
|
+
ok_xp([:dl,
|
368
|
+
[:dt, 'user@e... (1970-01-01 09:00:00)'],
|
369
|
+
[:dd, [:br], 'Hi'],
|
370
|
+
[:dt, 'user@e... (1970-01-01 09:00:00)'],
|
371
|
+
[:dd, [:br], 'hello', [:br], 'world']],
|
372
|
+
'//div[@class="section"]/dl[2]')
|
373
|
+
|
374
|
+
page = @site['_SiteChanged']
|
375
|
+
assert_match(/^,[.0-9]+,user@e.com,comment,1$/, page.load)
|
376
|
+
end
|
377
|
+
|
378
|
+
def test_plg_hcomment
|
379
|
+
ok_wi([:div, {:class=>'hcomment'},
|
380
|
+
[:form, {:action=>'1.hcomment', :method=>'POST'},
|
381
|
+
'Name', ': ', [:input, {:size=>10, :name=>'name'}], ' ',
|
382
|
+
'Comment', ': ', [:input, {:size=>50, :name=>'msg'}], ' ',
|
383
|
+
[:input, {:value=>'Submit', :type=>'submit', :name=>'comment'}],
|
384
|
+
[:input, {:value=>1, :type=>'hidden', :name=>'comment_no'}],
|
385
|
+
[:input, {:value=>0, :type=>'hidden', :name=>'style'}]]],
|
386
|
+
'{{hcomment}}')
|
387
|
+
end
|
388
|
+
|
389
|
+
def test_ext_hcomment
|
390
|
+
t_add_user
|
391
|
+
|
392
|
+
page = @site.create_new
|
393
|
+
page.store("{{hcomment}}\n")
|
394
|
+
res = session('POST /test/1.hcomment?name=n&msg=m&comment_no=1&style=0')
|
395
|
+
ok_eq("- 1970-01-01 09:00:00 '''n''' : m\n{{hcomment}}\n",
|
396
|
+
page.load)
|
397
|
+
|
398
|
+
page.store("{{hcomment(1)}}\n")
|
399
|
+
res = session('POST /test/1.hcomment?name=n&msg=m&comment_no=1&style=1')
|
400
|
+
ok_eq("{{hcomment(1)}}\n- 1970-01-01 09:00:00 '''n''' : m\n",
|
401
|
+
page.load)
|
402
|
+
end
|
403
|
+
|
404
|
+
def test_plg_mcomment
|
405
|
+
ok_wi([:div, {:class=>'mcomment'},
|
406
|
+
[:form, {:method=>'POST', :action=>'1.1.0.mcomment'},
|
407
|
+
[:table,
|
408
|
+
[:tr, [:th, 'Name'],
|
409
|
+
[:td, [:input, {:size=>'30', :name=>'u'}]]],
|
410
|
+
[:tr,
|
411
|
+
[:th, 'Comment'],
|
412
|
+
[:td, [:textarea,
|
413
|
+
{:cols=>'50', :rows=>'4', :name=>'m'}, '']]],
|
414
|
+
[:tr, [:th, ''],
|
415
|
+
[:td, [:input, {:value=>'Submit', :type=>'submit'}]]]]]],
|
416
|
+
"{{mcomment}}")
|
417
|
+
ok_wi([:div, {:class=>'mcomment'},
|
418
|
+
[:div, {:class=>'msg'},
|
419
|
+
[:dl, [:dt,
|
420
|
+
[:span, {:class=>'date'}, '1970-01-01'],
|
421
|
+
[:span, {:class=>'user'}, 'u']],
|
422
|
+
[:dd, 'm', [:br]]]],
|
423
|
+
[:form, {:method=>'POST', :action=>'1.1.0.mcomment'},
|
424
|
+
[:table,
|
425
|
+
[:tr, [:th, 'Name'],
|
426
|
+
[:td, [:input, {:size=>'30', :name=>'u'}]]],
|
427
|
+
[:tr,[:th, 'Comment'],
|
428
|
+
[:td, [:textarea,
|
429
|
+
{:cols=>'50', :rows=>'4', :name=>'m'}, '']]],
|
430
|
+
[:tr, [:th, ''],
|
431
|
+
[:td, [:input, {:value=>'Submit', :type=>'submit'}]]]]]],
|
432
|
+
"{{mcomment
|
433
|
+
|0|u|m
|
434
|
+
}}")
|
435
|
+
ok_wi([:div, {:class=>'mcomment'},
|
436
|
+
[:form, {:method=>'POST', :action=>'1.1.1.mcomment'},
|
437
|
+
[:table,
|
438
|
+
[:tr, [:th, 'Name'],
|
439
|
+
[:td, [:input, {:size=>'30', :name=>'u'}]]],
|
440
|
+
[:tr, [:th, 'Comment'],
|
441
|
+
[:td, [:textarea,
|
442
|
+
{:cols=>'50', :rows=>'4', :name=>'m'}, '']]],
|
443
|
+
[:tr, [:th, ''],
|
444
|
+
[:td, [:input, {:value=>'Submit', :type=>'submit'}]]]]],
|
445
|
+
[:div, {:class=>'msg'},
|
446
|
+
[:dl, [:dt,
|
447
|
+
[:span, {:class=>'date'}, '1970-01-01'],
|
448
|
+
[:span, {:class=>'user'}, 'u']],
|
449
|
+
[:dd, 'm', [:br]]]]],
|
450
|
+
"{{mcomment(1)
|
451
|
+
|0|u|m
|
452
|
+
}}")
|
453
|
+
end
|
454
|
+
|
455
|
+
def test_ext_mcomment
|
456
|
+
t_add_user
|
457
|
+
|
458
|
+
page = @site.create_new
|
459
|
+
page.store("{{mcomment}}\n")
|
460
|
+
res = session('POST /test/1.html')
|
461
|
+
ok_xp([:div, {:class=>'mcomment'},
|
462
|
+
[:form, {:method=>'POST', :action=>'1.1.0.mcomment'},
|
463
|
+
[:table,
|
464
|
+
[:tr, [:th, 'Name'],
|
465
|
+
[:td, [:input, {:size=>'30', :name=>'u'}]]],
|
466
|
+
[:tr, [:th, 'Comment'],
|
467
|
+
[:td, [:textarea,
|
468
|
+
{:cols=>'50', :rows=>'4', :name=>'m'}, '']]],
|
469
|
+
[:tr, [:th, ''],
|
470
|
+
[:td, [:input, {:value=>'Submit', :type=>'submit'}]]]]]],
|
471
|
+
"//div[@class='mcomment']")
|
472
|
+
|
473
|
+
res = session("POST /test/1.1.0.mcomment?u=u&m=m")
|
474
|
+
eq "{{mcomment
|
475
|
+
|0|u|m
|
476
|
+
}}
|
477
|
+
", page.load
|
478
|
+
|
479
|
+
res = session("POST /test/1.1.0.mcomment?u=u2&m=m2")
|
480
|
+
eq "{{mcomment
|
481
|
+
|0|u|m
|
482
|
+
|0|u2|m2
|
483
|
+
}}
|
484
|
+
", page.load
|
485
|
+
|
486
|
+
page.store("{{mcomment(1)}}
|
487
|
+
")
|
488
|
+
res = session("POST /test/1.1.1.mcomment?u=u&m=m")
|
489
|
+
eq "{{mcomment(1)
|
490
|
+
|0|u|m
|
491
|
+
}}
|
492
|
+
", page.load
|
493
|
+
|
494
|
+
res = session("POST /test/1.1.1.mcomment?u=u2&m=m2")
|
495
|
+
eq "{{mcomment(1)
|
496
|
+
|0|u2|m2
|
497
|
+
|0|u|m
|
498
|
+
}}
|
499
|
+
", page.load
|
500
|
+
|
501
|
+
page.store("{{mcomment}}
|
502
|
+
{{mcomment}}
|
503
|
+
")
|
504
|
+
res = session("POST /test/1.1.0.mcomment?u=u&m=m")
|
505
|
+
eq "{{mcomment
|
506
|
+
|0|u|m
|
507
|
+
}}
|
508
|
+
{{mcomment}}
|
509
|
+
", page.load
|
510
|
+
|
511
|
+
res = session("POST /test/1.2.0.mcomment?u=u2&m=m2")
|
512
|
+
eq "{{mcomment
|
513
|
+
|0|u|m
|
514
|
+
}}
|
515
|
+
{{mcomment
|
516
|
+
|0|u2|m2
|
517
|
+
}}
|
518
|
+
", page.load
|
519
|
+
end
|
520
|
+
|
521
|
+
def test_ext_mcomment2
|
522
|
+
t_add_user
|
523
|
+
|
524
|
+
page = @site.create_new
|
525
|
+
page.store("{{mcomment}}\n")
|
526
|
+
res = session("POST /test/1.1.0.mcomment?u=u&m=m\n")
|
527
|
+
eq '{{mcomment
|
528
|
+
|0|u|m\n
|
529
|
+
}}
|
530
|
+
', page.load
|
531
|
+
|
532
|
+
page.store("{{mcomment}}\n")
|
533
|
+
res = session("POST /test/1.1.0.mcomment?u=u&m=m\r\n")
|
534
|
+
eq '{{mcomment
|
535
|
+
|0|u|m\n
|
536
|
+
}}
|
537
|
+
', page.load
|
538
|
+
|
539
|
+
page.store("{{mcomment}}\n")
|
540
|
+
res = session("POST /test/1.1.0.mcomment?u=u&m=m\r")
|
541
|
+
eq '{{mcomment
|
542
|
+
|0|u|m\n
|
543
|
+
}}
|
544
|
+
', page.load
|
545
|
+
|
546
|
+
page.store("{{mcomment}}\n")
|
547
|
+
res = session("POST /test/1.1.0.mcomment?u=u&m=m\n\r")
|
548
|
+
eq '{{mcomment
|
549
|
+
|0|u|m\n\n
|
550
|
+
}}
|
551
|
+
', page.load
|
552
|
+
end
|
553
|
+
end
|
554
|
+
end
|
@@ -0,0 +1,49 @@
|
|
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
|
+
NotYet_D_site_config = {
|
10
|
+
:dt => 'Site Config mode',
|
11
|
+
:dd => 'You can edit site configurations.',
|
12
|
+
:dc => "* Example
|
13
|
+
[[site.config]]
|
14
|
+
"
|
15
|
+
}
|
16
|
+
|
17
|
+
def notyet_ext_config
|
18
|
+
method = "config_#{@req.base}"
|
19
|
+
return c_nerror if ! self.respond_to?(method)
|
20
|
+
return self.send(method)
|
21
|
+
end
|
22
|
+
|
23
|
+
SITE_CONFIG = '_SiteConfig'
|
24
|
+
|
25
|
+
def config_site
|
26
|
+
@req.base = SITE_CONFIG # Fake.
|
27
|
+
w = []
|
28
|
+
w << [:h1, _('Site Configuration')]
|
29
|
+
w = c_res(content)
|
30
|
+
w = TDiaryResolver.resolve(@config, @site, self, w)
|
31
|
+
title = _('Function')+' | '+hash[:dt]
|
32
|
+
return c_surface(title, true) { w }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
if $0 == __FILE__
|
38
|
+
require 'qwik/test-common'
|
39
|
+
$test = true
|
40
|
+
end
|
41
|
+
|
42
|
+
if defined?($test) && $test
|
43
|
+
class TestAction < Test::Unit::TestCase
|
44
|
+
include TestSession
|
45
|
+
|
46
|
+
def test_config
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|