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,198 @@
|
|
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
|
+
begin
|
7
|
+
require 'qwik/typekey'
|
8
|
+
$have_typekey = true
|
9
|
+
rescue LoadError
|
10
|
+
$have_typekey = false
|
11
|
+
end
|
12
|
+
|
13
|
+
module Qwik
|
14
|
+
class Action
|
15
|
+
def pre_act_typekey
|
16
|
+
if @req.query.length == 0
|
17
|
+
return typekey_redirect_to_typekey
|
18
|
+
end
|
19
|
+
|
20
|
+
sitetoken = typekey_get_sitetoken
|
21
|
+
return typekey_error_no_sitetoken if sitetoken.nil?
|
22
|
+
|
23
|
+
tk = TypeKey.new(sitetoken, '1.1')
|
24
|
+
key = typekey_get_publickey(tk)
|
25
|
+
|
26
|
+
email = @req.query['email']
|
27
|
+
name = @req.query['name']
|
28
|
+
nick = @req.query['nick']
|
29
|
+
ts = @req.query['ts'] # time stamp
|
30
|
+
sig = @req.query['sig']
|
31
|
+
# <email>::<name>::<nick>::<ts>::<site-token>
|
32
|
+
begin
|
33
|
+
tk.verify(email, name, nick, ts, sig)
|
34
|
+
rescue VerifyFailed
|
35
|
+
return c_notice(_('Verify failed.')) {
|
36
|
+
_('Verify failed.')
|
37
|
+
}
|
38
|
+
rescue TimeOutError
|
39
|
+
return c_notice(_('Time out.')) {
|
40
|
+
_('Time out.')
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
sid = session_store(email)
|
45
|
+
@res.set_cookie('sid', sid) # Set Session id by cookie
|
46
|
+
|
47
|
+
return c_notice(_('Login')+' '+_('Success'), 'FrontPage.html') {
|
48
|
+
[:p, [:a, {:href=>'FrontPage.html'}, _('Go next')]]
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
def typekey_error_no_sitetoken
|
53
|
+
return c_nerror(_('Cannot use.')) {
|
54
|
+
[:p, _('There is no site token for TypeKey.')]
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
def typekey_redirect_to_typekey
|
59
|
+
sitetoken = typekey_get_sitetoken
|
60
|
+
return typekey_error_no_sitetoken if sitetoken.nil?
|
61
|
+
|
62
|
+
tk = TypeKey.new(sitetoken, '1.1')
|
63
|
+
|
64
|
+
# http://example.com/test/.typekey
|
65
|
+
ret_url = c_relative_to_absolute('.typekey')
|
66
|
+
url = tk.get_login_url(ret_url, true)
|
67
|
+
return c_nredirect('Go TypeKey', url) # Redirect to TypeKey
|
68
|
+
end
|
69
|
+
|
70
|
+
TYPEKEY_SITETOKEN_FILE = 'typekey-sitetoken.txt'
|
71
|
+
|
72
|
+
def typekey_get_sitetoken
|
73
|
+
file = @config.etc_dir.path+TYPEKEY_SITETOKEN_FILE
|
74
|
+
return nil if ! file.exist?
|
75
|
+
return file.read.chomp
|
76
|
+
end
|
77
|
+
|
78
|
+
def typekey_get_publickey(tk)
|
79
|
+
# Make cache timeout to 100 years. Only for test.
|
80
|
+
#tk.key_cache_timeout = 60 * 60 * 24 * 365 * 100 # 100 years
|
81
|
+
tk.key_cache_timeout = 60 * 60 * 24 * 365 * 2 # 2 years
|
82
|
+
cache_path = @config.cache_dir.path+'typekey-publickey.txt'
|
83
|
+
tk.key_cache_path = cache_path.to_s
|
84
|
+
return tk.get_key
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
if $0 == __FILE__
|
90
|
+
require 'qwik/test-common'
|
91
|
+
$test = true
|
92
|
+
end
|
93
|
+
|
94
|
+
if defined?($test) && $test
|
95
|
+
class TestActTypekey < Test::Unit::TestCase
|
96
|
+
include TestSession
|
97
|
+
|
98
|
+
def test_act_typekey
|
99
|
+
t_add_user
|
100
|
+
t_site_open # OPEN site
|
101
|
+
|
102
|
+
res = session
|
103
|
+
|
104
|
+
# test_get_sitetoken
|
105
|
+
sitetoken = @action.typekey_get_sitetoken
|
106
|
+
return if sitetoken.nil? # Stop test here.
|
107
|
+
eq 20, sitetoken.length
|
108
|
+
|
109
|
+
# See the FrontPage.
|
110
|
+
res = session '/test/'
|
111
|
+
ok_title('FrontPage')
|
112
|
+
|
113
|
+
# See the Login page.
|
114
|
+
res = session('/test/.login') {|req|
|
115
|
+
req.cookies.clear
|
116
|
+
}
|
117
|
+
ok_title('Login')
|
118
|
+
|
119
|
+
# Redirect to TypeKey login page.
|
120
|
+
res = session '/test/.typekey'
|
121
|
+
eq 302, @res.status
|
122
|
+
assert_match(%r|\Ahttps://www.typekey.com/t/typekey/login|,
|
123
|
+
@res['Location'])
|
124
|
+
meta = @res.body.get_path('//meta[2]')
|
125
|
+
assert_match(%r|url=https://www.typekey.com/t/typekey/login|,
|
126
|
+
meta[1][:content])
|
127
|
+
|
128
|
+
# The client returned from the TypeKey login page.
|
129
|
+
begin
|
130
|
+
res = session '/test/.typekey?&ts=1111111111&email=guest@example.com&name=guestexample&nick=guest&sig=ttttttttttttttttttttttttttt=:LLLLLLLLLLLLLLLLLLLLLLLLLLL='
|
131
|
+
ok_title('Verify failed.')
|
132
|
+
rescue => e
|
133
|
+
p 'failed.', e
|
134
|
+
end
|
135
|
+
|
136
|
+
begin
|
137
|
+
res = session '/test/.typekey?&ts=1110026410&email=2005@eto.com&name=etocom&nick=eto&sig=tRUcIO6haAHv/vQSguPk2EijTrc=:LCUvoHCXFLaeO8SoldCKmFr2Guo='
|
138
|
+
ok_title('Time out.')
|
139
|
+
rescue => e
|
140
|
+
p 'failed.', e
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
def nutypekey_get_sitetoken
|
145
|
+
file = @config.etc_dir.path+Qwik::Action::TYPEKEY_SITETOKEN_FILE
|
146
|
+
return file.read.chomp
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_typekey
|
150
|
+
return if $0 != __FILE__ # just only for unit test.
|
151
|
+
return if ! $have_typekey
|
152
|
+
|
153
|
+
res = session
|
154
|
+
|
155
|
+
sitetoken = 't'
|
156
|
+
tk = TypeKey.new(sitetoken, '1.1')
|
157
|
+
tk.key_cache_timeout = 60 * 60 * 24 * 365 * 100 # 100years
|
158
|
+
tk.key_cache_path = (@config.cache_dir.path+'typekey-publickey.txt').to_s
|
159
|
+
|
160
|
+
return_url = 'http://example.com/.typekey'
|
161
|
+
eq 'https://www.typekey.com/t/typekey/login?t=t&_return=http://example.com/.typekey&v=1.1', tk.get_login_url(return_url)
|
162
|
+
eq 'https://www.typekey.com/t/typekey/login?t=t&need_email=1&_return=http://example.com/.typekey&v=1.1', tk.get_login_url(return_url, true)
|
163
|
+
eq 'https://www.typekey.com/t/typekey/logout?_return=http://example.com/.typekey', tk.get_logout_url(return_url)
|
164
|
+
|
165
|
+
begin
|
166
|
+
key = tk.get_key
|
167
|
+
eq ['p', 'q', 'pub_key', 'g'], key.keys
|
168
|
+
rescue
|
169
|
+
p 'failed'
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
def test_verify
|
174
|
+
return if $0 != __FILE__ # just only for unit test.
|
175
|
+
return if ! $have_typekey
|
176
|
+
|
177
|
+
res = session
|
178
|
+
sitetoken = @action.typekey_get_sitetoken
|
179
|
+
tk = TypeKey.new(sitetoken, '1.1')
|
180
|
+
tk.key_cache_timeout = 60 * 60 * 24 * 365 * 100 # 100years
|
181
|
+
tk.key_cache_path = (@config.cache_dir.path+'typekey-publickey.txt').to_s
|
182
|
+
|
183
|
+
ts = '1111111111'
|
184
|
+
email = 'guest@example.com'
|
185
|
+
name = 'guestexample'
|
186
|
+
nick = 'guest'
|
187
|
+
sig = 'ttttttttttttttttttttttttttt=:LLLLLLLLLLLLLLLLLLLLLLLLLLL='
|
188
|
+
|
189
|
+
begin
|
190
|
+
assert_raise(VerifyFailed){
|
191
|
+
result = tk.verify(email, name, nick, ts, sig)
|
192
|
+
}
|
193
|
+
rescue => e
|
194
|
+
p 'failed', e
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
@@ -0,0 +1,94 @@
|
|
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
|
+
# Under construction.
|
6
|
+
|
7
|
+
$LOAD_PATH.unshift '..' unless $LOAD_PATH.include? '..'
|
8
|
+
|
9
|
+
module Qwik
|
10
|
+
class Action
|
11
|
+
# ==============================
|
12
|
+
def notyet_plg_calendar
|
13
|
+
return 'calendar'
|
14
|
+
end
|
15
|
+
|
16
|
+
# ==============================
|
17
|
+
def notyet_plg_draw
|
18
|
+
return [:div,
|
19
|
+
[:'v:line', {:from=>'0, 100', :to=>'200, 200'}, '']]
|
20
|
+
end
|
21
|
+
|
22
|
+
# ==============================
|
23
|
+
def notyet_plg_extlink
|
24
|
+
w = []
|
25
|
+
w << [:script, {:type=>'text/javascript',
|
26
|
+
:src=>'.theme/ap/ArekorePopup.js'}, '']
|
27
|
+
w << [:script, {:type=>'text/javascript'}, '
|
28
|
+
AP.launch;
|
29
|
+
']
|
30
|
+
return []
|
31
|
+
end
|
32
|
+
|
33
|
+
# ==============================
|
34
|
+
# 'Go Back to Work.' plugin
|
35
|
+
# Inspired from http://www.marktaw.com/getbacktowork.htm
|
36
|
+
def notyet_plg_go_back_to_work
|
37
|
+
return [:strong, 'hello, world!']
|
38
|
+
end
|
39
|
+
|
40
|
+
def notyet_ext_go_back_to_work
|
41
|
+
c_notice('hello, world!'){'hi, there.'}
|
42
|
+
end
|
43
|
+
|
44
|
+
# ==============================
|
45
|
+
def notyet_ext_print
|
46
|
+
ext_html # call this first.
|
47
|
+
return c_nerror('not yet')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
if $0 == __FILE__
|
53
|
+
require 'qwik/test-common'
|
54
|
+
$test = true
|
55
|
+
end
|
56
|
+
|
57
|
+
if defined?($test) && $test
|
58
|
+
class TestActTmp < Test::Unit::TestCase
|
59
|
+
include TestSession
|
60
|
+
|
61
|
+
def notyet_test_plg_calendar
|
62
|
+
end
|
63
|
+
|
64
|
+
def notyet_test_plg_draw
|
65
|
+
end
|
66
|
+
|
67
|
+
def notyet_test_extlink
|
68
|
+
ok_wi([], '{{extlink}}')
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_gbtw
|
72
|
+
t_add_user
|
73
|
+
|
74
|
+
res = session
|
75
|
+
|
76
|
+
page = @site.create_new
|
77
|
+
page.store('{{go_back_to_work}}')
|
78
|
+
res = session('/test/1.html')
|
79
|
+
#ok_xp({:action=>'1.go_back_to_work', :method=>'POST'}, 'div[@class='main']')
|
80
|
+
|
81
|
+
res = session('POST /test/1.go_back_to_work?work=n&style=0')
|
82
|
+
#assert_match(/ ''\[\[n\]\]'' : m\n\{\{hcomment\}\}/, page.load)
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_ext_print
|
86
|
+
t_add_user
|
87
|
+
page = @site.create_new
|
88
|
+
page.store('t')
|
89
|
+
res = session('/test/1.html')
|
90
|
+
ok_xp([:div, {:class=>'body'}, [:div, {:class=>'section'}, [[:p, 't']]]],
|
91
|
+
"//div[@class='body']")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,321 @@
|
|
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
|
+
D_PluginWebService = {
|
10
|
+
:dt => 'Web service plugins',
|
11
|
+
:dd => 'You can use several external Web services.',
|
12
|
+
:dc => '
|
13
|
+
* Hatena Point plugin
|
14
|
+
{{hatena_point(eto)}}
|
15
|
+
You can embed hatena point tag.
|
16
|
+
* Trackfeed plugin
|
17
|
+
You can use trackfeed by this plugin.
|
18
|
+
{{trackfeed(yourid)}}
|
19
|
+
* Subscribe Bloglines plugin
|
20
|
+
You can show subscribe bloglines button.
|
21
|
+
{{sub_bloglines}}
|
22
|
+
{{sub_bloglines}}
|
23
|
+
|
24
|
+
You can write a specific URL in the argument.
|
25
|
+
{{sub_bloglines("http://www.ruby-lang.org/")}}
|
26
|
+
{{sub_bloglines("http://www.ruby-lang.org/")}}
|
27
|
+
* E Words plugin
|
28
|
+
You can show words description.
|
29
|
+
{{e_words}}
|
30
|
+
{{e_words}}
|
31
|
+
* Google AdSense plugin
|
32
|
+
You can show an ad by Google AdSense.
|
33
|
+
{{google_ad}}
|
34
|
+
{{google_ad}}
|
35
|
+
{{google_ad_button}}
|
36
|
+
{{google_ad_button}}
|
37
|
+
You can select from the two sizes.
|
38
|
+
There is no way to use another size for now.
|
39
|
+
* Show translate link plugin
|
40
|
+
You can show an translation link.
|
41
|
+
{{translate_ej}}
|
42
|
+
Specify translate English to Japanese link.
|
43
|
+
{{translate_je}}
|
44
|
+
Specify translate Japanese to English link.
|
45
|
+
'
|
46
|
+
}
|
47
|
+
|
48
|
+
D_PluginWebService_ja = {
|
49
|
+
:dt => 'Webサービス・プラグイン',
|
50
|
+
:dd => 'Web上の各種サービスを利用するプラグインです。',
|
51
|
+
:dc => '
|
52
|
+
* はてなポイント・プラグイン
|
53
|
+
{{hatena_point(eto)}}
|
54
|
+
はてなポイント(投げ銭)のタグを埋込めます。
|
55
|
+
* Trackfeedプラグイン
|
56
|
+
トラックフィードを埋込めます。
|
57
|
+
{{trackfeed(yourid)}}
|
58
|
+
* Bloglines講読プラグイン
|
59
|
+
Bloglinesで講読するリンクを表示します。
|
60
|
+
{{sub_bloglines}}
|
61
|
+
{{sub_bloglines}}
|
62
|
+
|
63
|
+
特定のURLを指定することもできます。
|
64
|
+
{{sub_bloglines("http://www.ruby-lang.org/")}}
|
65
|
+
{{sub_bloglines("http://www.ruby-lang.org/")}}
|
66
|
+
* E Wordsプラグイン
|
67
|
+
用語定義を表示させることができます。
|
68
|
+
{{e_words}}
|
69
|
+
{{e_words}}
|
70
|
+
* Google AdSenseプラグイン
|
71
|
+
Google AdSenseを埋込めます。
|
72
|
+
{{google_ad}}
|
73
|
+
{{google_ad}}
|
74
|
+
{{google_ad_button}}
|
75
|
+
{{google_ad_button}}
|
76
|
+
二種類のサイズから選べます。
|
77
|
+
それ以外のサイズは、現在は未対応となっています。
|
78
|
+
* 翻訳プラグイン
|
79
|
+
翻訳ページに飛ぶリンクを表示します。
|
80
|
+
You can show an translation link.
|
81
|
+
{{translate_ej}}
|
82
|
+
英語から日本語へ翻訳する。
|
83
|
+
{{translate_je}}
|
84
|
+
日本語から英語へ翻訳する。
|
85
|
+
'
|
86
|
+
}
|
87
|
+
|
88
|
+
# ========== hatena point
|
89
|
+
def plg_hatena_point(hatena_account)
|
90
|
+
page = @site[@req.base]
|
91
|
+
url = c_relative_to_absolute(page.url)
|
92
|
+
rdf =[:'rdf:RDF',
|
93
|
+
{:'xmlns:rdf'=>'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
94
|
+
:'xmlns:foaf'=>'http://xmlns.com/foaf/0.1/'},
|
95
|
+
[:'rdf:Description',
|
96
|
+
{:'rdf:about'=>url},
|
97
|
+
[:'foaf:maker',
|
98
|
+
{:'rdf:parseType'=>'Resource'},
|
99
|
+
[:'foaf:holdsAccount',
|
100
|
+
[:'foaf:OnlineAccount',
|
101
|
+
{:'foaf:accountName'=>hatena_account},
|
102
|
+
[:'foaf:accountServiceHomepage',
|
103
|
+
{:'rdf:resource'=>'http://www.hatena.ne.jp/'}]]]]]]
|
104
|
+
return [:span, {:class=>'hatena_point'}, rdf]
|
105
|
+
end
|
106
|
+
|
107
|
+
# ========== trackfeed
|
108
|
+
def plg_trackfeed(id)
|
109
|
+
return unless /\A[0-9a-f]+\z/ =~ id
|
110
|
+
script = [:script, {:src=>"http://trackfeed.com/usr/#{id}.js"}, '']
|
111
|
+
return script
|
112
|
+
end
|
113
|
+
|
114
|
+
# ========== Bloglines
|
115
|
+
def plg_sub_bloglines(url=nil, icon='modern4')
|
116
|
+
return unless /\A[a-z0-9]+\z/ =~ icon
|
117
|
+
url = @site.site_url if url.nil?
|
118
|
+
button = [:a, {:href=>"http://www.bloglines.com/sub/#{url}"},
|
119
|
+
[:img, {:src=>"http://www.bloglines.com/images/sub_#{icon}.gif",
|
120
|
+
:border=>'0', :alt=>'subscribe Bloglines'}]]
|
121
|
+
return button
|
122
|
+
end
|
123
|
+
|
124
|
+
# ========== E Words
|
125
|
+
def plg_e_words
|
126
|
+
return [:script, {:type=>'text/javascript',
|
127
|
+
:src=>'http://e-words.jp/embed.x'}, '']
|
128
|
+
end
|
129
|
+
|
130
|
+
# ========== Google AdSense
|
131
|
+
def plg_google_ad(id=nil)
|
132
|
+
id ||= 'pub-5746941487859743'
|
133
|
+
str = <<'EOT'
|
134
|
+
|
135
|
+
google_ad_client = "#{id}";
|
136
|
+
google_alternate_color = 'eeeeee';
|
137
|
+
google_ad_width = 120;
|
138
|
+
google_ad_height = 240;
|
139
|
+
google_ad_format = '120x240_as';
|
140
|
+
google_ad_channel ='2257701812';
|
141
|
+
google_ad_type = 'text_image';
|
142
|
+
google_color_border = 'ffffff';
|
143
|
+
google_color_bg = 'ffffff';
|
144
|
+
google_color_link = '00cccc';
|
145
|
+
google_color_url = '00cc66';
|
146
|
+
google_color_text = '000000';
|
147
|
+
EOT
|
148
|
+
return google_ad(str)
|
149
|
+
end
|
150
|
+
|
151
|
+
def plg_google_ad_button(id=nil)
|
152
|
+
id ||= 'pub-5746941487859743'
|
153
|
+
str = <<'EOT'
|
154
|
+
|
155
|
+
google_ad_client = "#{id}";
|
156
|
+
google_alternate_color = 'eeeeee';
|
157
|
+
google_ad_width = 125;
|
158
|
+
google_ad_height = 125;
|
159
|
+
google_ad_format = '125x125_as';
|
160
|
+
google_ad_channel ='2257701812';
|
161
|
+
google_ad_type = 'text_image';
|
162
|
+
google_color_border = 'ffffff';
|
163
|
+
google_color_bg = 'ffffff';
|
164
|
+
google_color_link = '00cccc';
|
165
|
+
google_color_url = '00cc66';
|
166
|
+
google_color_text = '000000';
|
167
|
+
EOT
|
168
|
+
return google_ad(str)
|
169
|
+
end
|
170
|
+
|
171
|
+
def google_ad(str)
|
172
|
+
str << '//'
|
173
|
+
return [:div, {:style=>'text-align: center;'},
|
174
|
+
[:script, {:type=>'text/javascript'}, [:'!--', str]],
|
175
|
+
[:script, {:type=>'text/javascript',
|
176
|
+
:src=>'http://pagead2.googlesyndication.com/pagead/show_ads.js'},
|
177
|
+
'']]
|
178
|
+
end
|
179
|
+
|
180
|
+
# ========== Excite Translate
|
181
|
+
def plg_translate_ej(msg=nil)
|
182
|
+
return plg_translate('ej', msg)
|
183
|
+
end
|
184
|
+
|
185
|
+
def plg_translate_je(msg=nil)
|
186
|
+
return plg_translate('je', msg)
|
187
|
+
end
|
188
|
+
|
189
|
+
def plg_translate(lang, message=nil)
|
190
|
+
if lang == 'ej'
|
191
|
+
lp = 'ENJA'
|
192
|
+
elsif lang == 'je'
|
193
|
+
lp = 'JAEN'
|
194
|
+
else
|
195
|
+
return nil
|
196
|
+
end
|
197
|
+
|
198
|
+
page = @site[@req.base]
|
199
|
+
return if page.nil?
|
200
|
+
full_url = c_relative_to_absolute(page.url)
|
201
|
+
#base = 'http://www.excite.co.jp/world/english/web/'
|
202
|
+
base = 'http://www.excite.co.jp/world/english/web/proceeding/'
|
203
|
+
url = "#{base}?wb_lp=#{lp}&wb_url=#{full_url}"
|
204
|
+
|
205
|
+
if message.nil?
|
206
|
+
message = 'translate'
|
207
|
+
if lang == 'ej'
|
208
|
+
message += ' (e->j)'
|
209
|
+
elsif lang == 'je'
|
210
|
+
message += ' (j->e)'
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
e = [:a, {:href=>url}, message]
|
215
|
+
return e
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
if $0 == __FILE__
|
221
|
+
require 'qwik/test-common'
|
222
|
+
require 'qwik/wabisabi-format-xml'
|
223
|
+
$test = true
|
224
|
+
end
|
225
|
+
|
226
|
+
if defined?($test) && $test
|
227
|
+
class TestActWebService < Test::Unit::TestCase
|
228
|
+
include TestSession
|
229
|
+
|
230
|
+
def test_plg_hatena_point
|
231
|
+
t_add_user
|
232
|
+
page = @site.create_new
|
233
|
+
page.store('{{hatena_point(a)}}')
|
234
|
+
res = session('/test/1.html')
|
235
|
+
span = res.body.get_path("//span[@class='hatena_point']")
|
236
|
+
rdf = span[2]
|
237
|
+
ok_eq([:'rdf:RDF',
|
238
|
+
{:'xmlns:rdf'=>'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
239
|
+
:'xmlns:foaf'=>'http://xmlns.com/foaf/0.1/'},
|
240
|
+
[:'rdf:Description',
|
241
|
+
{:'rdf:about'=>'http://example.com/test/1.html'},
|
242
|
+
[:'foaf:maker',
|
243
|
+
{:'rdf:parseType'=>'Resource'},
|
244
|
+
[:'foaf:holdsAccount',
|
245
|
+
[:'foaf:OnlineAccount',
|
246
|
+
{:'foaf:accountName'=>'a'},
|
247
|
+
[:'foaf:accountServiceHomepage',
|
248
|
+
{:'rdf:resource'=>'http://www.hatena.ne.jp/'}]]]]]],
|
249
|
+
rdf)
|
250
|
+
|
251
|
+
=begin
|
252
|
+
<rdf:RDF
|
253
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
254
|
+
xmlns:foaf='http://xmlns.com/foaf/0.1/'>
|
255
|
+
<rdf:Description
|
256
|
+
rdf:about="エントリーのPermalink あるいはウェブサイトのURL">
|
257
|
+
<foaf:maker rdf:parseType='Resource'>
|
258
|
+
<foaf:holdsAccount>
|
259
|
+
<foaf:OnlineAccount
|
260
|
+
foaf:accountName="あなたのはてなアカウント名">
|
261
|
+
<foaf:accountServiceHomepage
|
262
|
+
rdf:resource='http://www.hatena.ne.jp/' />
|
263
|
+
</foaf:OnlineAccount>
|
264
|
+
</foaf:holdsAccount>
|
265
|
+
</foaf:maker>
|
266
|
+
</rdf:Description>
|
267
|
+
</rdf:RDF>
|
268
|
+
=end
|
269
|
+
str = rdf.rb_format_xml
|
270
|
+
#puts str
|
271
|
+
|
272
|
+
ok_eq(
|
273
|
+
"<rdf:RDF xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"
|
274
|
+
><rdf:Description rdf:about=\"http://example.com/test/1.html\"
|
275
|
+
><foaf:maker rdf:parseType=\"Resource\"
|
276
|
+
><foaf:holdsAccount
|
277
|
+
><foaf:OnlineAccount foaf:accountName=\"a\"
|
278
|
+
><foaf:accountServiceHomepage rdf:resource=\"http://www.hatena.ne.jp/\"
|
279
|
+
/></foaf:OnlineAccount
|
280
|
+
></foaf:holdsAccount
|
281
|
+
></foaf:maker
|
282
|
+
></rdf:Description
|
283
|
+
></rdf:RDF
|
284
|
+
>",
|
285
|
+
str)
|
286
|
+
end
|
287
|
+
|
288
|
+
def test_trackfeed
|
289
|
+
ok_wi([:script, {:src=>'http://trackfeed.com/usr/1.js'}, ''],
|
290
|
+
'{{trackfeed(1)}}')
|
291
|
+
end
|
292
|
+
|
293
|
+
def test_sub_bloglines
|
294
|
+
ok_wi([:a, {:href=>'http://www.bloglines.com/sub/http://example.com/test/'}, [:img, {:src=>'http://www.bloglines.com/images/sub_modern4.gif', :border=>'0', :alt=>'subscribe Bloglines'}]], '{{sub_bloglines}}')
|
295
|
+
ok_wi([:a, {:href=>'http://www.bloglines.com/sub/http://e.com/'}, [:img, {:src=>'http://www.bloglines.com/images/sub_modern4.gif', :border=>'0', :alt=>'subscribe Bloglines'}]], '{{sub_bloglines(http://e.com/)}}')
|
296
|
+
ok_wi([:a, {:href=>'http://www.bloglines.com/sub/http://e.com/'}, [:img, {:src=>'http://www.bloglines.com/images/sub_modern3.gif', :border=>'0', :alt=>'subscribe Bloglines'}]], '{{sub_bloglines(http://e.com/,modern3)}}')
|
297
|
+
end
|
298
|
+
|
299
|
+
def test_e_words
|
300
|
+
ok_wi([:script, {:src=>'http://e-words.jp/embed.x',
|
301
|
+
:type=>'text/javascript'}, ''], '{{e_words}}')
|
302
|
+
end
|
303
|
+
|
304
|
+
def test_google_ad
|
305
|
+
t_add_user
|
306
|
+
page = @site.create_new
|
307
|
+
page.store('{{google_ad}}')
|
308
|
+
res = session('/test/1.html')
|
309
|
+
ok_wi(/pagead2.googlesyndication.com/, '{{google_ad}}')
|
310
|
+
end
|
311
|
+
|
312
|
+
def test_translate
|
313
|
+
ok_wi([:a, {:href=>'http://www.excite.co.jp/world/english/web/proceeding/?wb_lp=JAEN&wb_url=http://example.com/test/1.html'}, 'translate (j->e)'],
|
314
|
+
'{{translate_je}}')
|
315
|
+
ok_wi([:a, {:href=>'http://www.excite.co.jp/world/english/web/proceeding/?wb_lp=JAEN&wb_url=http://example.com/test/1.html'}, 'English'],
|
316
|
+
'{{translate_je(English)}}')
|
317
|
+
ok_wi([:a, {:href=>'http://www.excite.co.jp/world/english/web/proceeding/?wb_lp=ENJA&wb_url=http://example.com/test/1.html'}, 'translate (e->j)'],
|
318
|
+
'{{translate_ej}}')
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|