tdiary 3.2.2.20130507
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.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +16 -0
- data/.travis.yml +29 -0
- data/Capfile +2 -0
- data/ChangeLog +3173 -0
- data/Gemfile +58 -0
- data/Gemfile.lock +201 -0
- data/LICENSE +340 -0
- data/Procfile +1 -0
- data/README.md +33 -0
- data/Rakefile +26 -0
- data/bin/tdiary +7 -0
- data/config.ru +61 -0
- data/data/.htaccess +2 -0
- data/doc/HOWTO-authenticate-in-rack.md +89 -0
- data/doc/HOWTO-make-io.md +305 -0
- data/doc/HOWTO-make-plugin.md +279 -0
- data/doc/HOWTO-make-theme.md +67 -0
- data/doc/HOWTO-testing-tDiary.md +44 -0
- data/doc/HOWTO-use-plugin.md +148 -0
- data/doc/HOWTO-write-tDiary.en.md +131 -0
- data/doc/HOWTO-write-tDiary.md +136 -0
- data/doc/INSTALL-paas.md +202 -0
- data/doc/INSTALL.md +160 -0
- data/doc/README.en.md +174 -0
- data/doc/README.md +56 -0
- data/doc/UPGRADE.md +164 -0
- data/doc/doc.css +115 -0
- data/dot.htaccess +27 -0
- data/index.fcgi +45 -0
- data/index.rb +57 -0
- data/js/00default.js +60 -0
- data/js/01conf.js +62 -0
- data/js/02edit.coffee +5 -0
- data/js/02edit.js +15 -0
- data/js/amazon.js +43 -0
- data/js/calendar3.js +130 -0
- data/js/caretposition.js +170 -0
- data/js/category.js +29 -0
- data/js/category_autocomplete.js +96 -0
- data/js/comment_ajax.js +27 -0
- data/js/draft.js +149 -0
- data/js/highlight.js +36 -0
- data/js/image.js +181 -0
- data/misc/convert2.rb +123 -0
- data/misc/filter/antispamservice.rb +101 -0
- data/misc/filter/limitdays.rb +40 -0
- data/misc/filter/linkcheck.rb +81 -0
- data/misc/filter/plugin/antispamservice.rb +82 -0
- data/misc/filter/plugin/en/antispamservice.rb +21 -0
- data/misc/filter/plugin/ja/antispamservice.rb +20 -0
- data/misc/lib/README +4 -0
- data/misc/lib/compatible.rb +1 -0
- data/misc/lib/fcgi_patch.rb +90 -0
- data/misc/migrate.rb +157 -0
- data/misc/paas/cloudfoundry/Gemfile +26 -0
- data/misc/paas/cloudfoundry/Gemfile.lock +85 -0
- data/misc/paas/heroku/Gemfile +22 -0
- data/misc/paas/heroku/Gemfile.lock +85 -0
- data/misc/paas/sqale/Gemfile +19 -0
- data/misc/paas/sqale/Gemfile.lock +85 -0
- data/misc/paas/sqale/Procfile +1 -0
- data/misc/paas/sqale/dot.env +1 -0
- data/misc/plugin/ChangeLog.DO_NOT_UPDATE +2333 -0
- data/misc/plugin/a.rb +211 -0
- data/misc/plugin/amazon.rb +403 -0
- data/misc/plugin/amazon/README.en +17 -0
- data/misc/plugin/amazon/README.ja +29 -0
- data/misc/plugin/amazon/amazonimg.rb +113 -0
- data/misc/plugin/amazon/large.png +0 -0
- data/misc/plugin/amazon/medium.png +0 -0
- data/misc/plugin/amazon/small.png +0 -0
- data/misc/plugin/append-css.rb +51 -0
- data/misc/plugin/bq.rb +48 -0
- data/misc/plugin/calendar2.rb +184 -0
- data/misc/plugin/calendar3.rb +256 -0
- data/misc/plugin/category.rb +779 -0
- data/misc/plugin/category_autocomplete.rb +33 -0
- data/misc/plugin/comment_ajax.rb +11 -0
- data/misc/plugin/comment_mail-qmail.rb +57 -0
- data/misc/plugin/comment_mail-sendmail.rb +56 -0
- data/misc/plugin/comment_mail-smtp.rb +59 -0
- data/misc/plugin/comment_rank.rb +36 -0
- data/misc/plugin/counter.rb +631 -0
- data/misc/plugin/daily_theme.rb +55 -0
- data/misc/plugin/disp_referrer.rb +1486 -0
- data/misc/plugin/doctype-html401tr.rb +16 -0
- data/misc/plugin/draft.rb +20 -0
- data/misc/plugin/dropdown_calendar.rb +32 -0
- data/misc/plugin/edit_today.rb +50 -0
- data/misc/plugin/en/a.rb +10 -0
- data/misc/plugin/en/amazon.rb +71 -0
- data/misc/plugin/en/append-css.rb +17 -0
- data/misc/plugin/en/bq.rb +12 -0
- data/misc/plugin/en/calendar2.rb +12 -0
- data/misc/plugin/en/category.rb +204 -0
- data/misc/plugin/en/counter.rb +48 -0
- data/misc/plugin/en/daily_theme.rb +14 -0
- data/misc/plugin/en/disp_referrer.rb +387 -0
- data/misc/plugin/en/dropdown_calendar.rb +14 -0
- data/misc/plugin/en/edit_today.rb +22 -0
- data/misc/plugin/en/hide-mail-field.rb +19 -0
- data/misc/plugin/en/highlight.rb +29 -0
- data/misc/plugin/en/image.rb +54 -0
- data/misc/plugin/en/kw.rb +22 -0
- data/misc/plugin/en/makerss.rb +47 -0
- data/misc/plugin/en/pb-show.rb +21 -0
- data/misc/plugin/en/ping.rb +16 -0
- data/misc/plugin/en/recent_comment.rb +44 -0
- data/misc/plugin/en/recent_comment3.rb +56 -0
- data/misc/plugin/en/recent_rss.rb +33 -0
- data/misc/plugin/en/referer_scheme.rb +48 -0
- data/misc/plugin/en/search_control.rb +74 -0
- data/misc/plugin/en/search_form.rb +22 -0
- data/misc/plugin/en/speed_comment.rb +19 -0
- data/misc/plugin/en/tb-show.rb +37 -0
- data/misc/plugin/en/todo.rb +43 -0
- data/misc/plugin/en/weather.rb +185 -0
- data/misc/plugin/en/xmlrpc.rb +14 -0
- data/misc/plugin/footnote.rb +92 -0
- data/misc/plugin/gradation.rb +39 -0
- data/misc/plugin/gradient.rb +36 -0
- data/misc/plugin/hide-mail-field.rb +50 -0
- data/misc/plugin/highlight.rb +22 -0
- data/misc/plugin/html_anchor.rb +34 -0
- data/misc/plugin/image.rb +290 -0
- data/misc/plugin/ja/amazon.rb +89 -0
- data/misc/plugin/ja/bq.rb +13 -0
- data/misc/plugin/ja/calendar2.rb +12 -0
- data/misc/plugin/ja/category.rb +212 -0
- data/misc/plugin/ja/daily_theme.rb +15 -0
- data/misc/plugin/ja/disp_referrer.rb +644 -0
- data/misc/plugin/ja/edit_today.rb +23 -0
- data/misc/plugin/ja/hide-mail-field.rb +20 -0
- data/misc/plugin/ja/highlight.rb +30 -0
- data/misc/plugin/ja/makerss.rb +44 -0
- data/misc/plugin/ja/my-sequel.rb +52 -0
- data/misc/plugin/ja/pb-show.rb +23 -0
- data/misc/plugin/ja/ping.rb +17 -0
- data/misc/plugin/ja/recent_comment.rb +45 -0
- data/misc/plugin/ja/recent_comment3.rb +57 -0
- data/misc/plugin/ja/recent_rss.rb +34 -0
- data/misc/plugin/ja/referer_scheme.rb +86 -0
- data/misc/plugin/ja/search_control.rb +75 -0
- data/misc/plugin/ja/search_form.rb +32 -0
- data/misc/plugin/ja/tb-show.rb +38 -0
- data/misc/plugin/ja/todo.rb +46 -0
- data/misc/plugin/ja/weather.rb +402 -0
- data/misc/plugin/ja/xmlrpc.rb +15 -0
- data/misc/plugin/kw.rb +150 -0
- data/misc/plugin/list.rb +40 -0
- data/misc/plugin/makelirs.rb +89 -0
- data/misc/plugin/makerss.rb +744 -0
- data/misc/plugin/my-ex.rb +68 -0
- data/misc/plugin/my-sequel.rb +539 -0
- data/misc/plugin/navi_user.rb +19 -0
- data/misc/plugin/number_anchor.rb +47 -0
- data/misc/plugin/pb-show.rb +165 -0
- data/misc/plugin/ping.rb +99 -0
- data/misc/plugin/pre_wrap.rb +19 -0
- data/misc/plugin/random_google.rb +165 -0
- data/misc/plugin/recent_comment.rb +82 -0
- data/misc/plugin/recent_comment3.rb +192 -0
- data/misc/plugin/recent_list.rb +91 -0
- data/misc/plugin/recent_namazu.rb +50 -0
- data/misc/plugin/recent_rss.rb +305 -0
- data/misc/plugin/referer-antibot.rb +53 -0
- data/misc/plugin/referer-utf8.rb +12 -0
- data/misc/plugin/referer_scheme.rb +87 -0
- data/misc/plugin/search_control.rb +227 -0
- data/misc/plugin/search_form.rb +53 -0
- data/misc/plugin/sn.rb +107 -0
- data/misc/plugin/speed_comment.rb +68 -0
- data/misc/plugin/squeeze.rb +272 -0
- data/misc/plugin/src.rb +30 -0
- data/misc/plugin/tb-show.rb +212 -0
- data/misc/plugin/title_list.rb +41 -0
- data/misc/plugin/title_tag.rb +80 -0
- data/misc/plugin/tlink.rb +163 -0
- data/misc/plugin/todo.rb +182 -0
- data/misc/plugin/weather.rb +505 -0
- data/misc/plugin/whatsnew.rb +100 -0
- data/misc/plugin/xmlrpc.rb +80 -0
- data/misc/plugin/xmlrpc/README +20 -0
- data/misc/plugin/xmlrpc/xmlrpc.rb +575 -0
- data/misc/style/emptdiary/README.rd +83 -0
- data/misc/style/emptdiary/README.rd.en +78 -0
- data/misc/style/emptdiary/emptdiary_style.rb +199 -0
- data/misc/style/etdiary/README.rd +83 -0
- data/misc/style/etdiary/etdiary_style.rb +446 -0
- data/misc/style/gfm/gfm_style.rb +194 -0
- data/misc/style/rd/README.rd +71 -0
- data/misc/style/rd/rd_style.rb +366 -0
- data/misc/style/wiki/README +116 -0
- data/misc/style/wiki/README.en +101 -0
- data/misc/style/wiki/wiki_parser.rb +273 -0
- data/misc/style/wiki/wiki_style.rb +478 -0
- data/misc/theme_convert/Readme.rd +21 -0
- data/misc/theme_convert/append.rcss +150 -0
- data/misc/theme_convert/theme_convert.rb +453 -0
- data/plugin/00default.rb +1015 -0
- data/plugin/05referer.rb +298 -0
- data/plugin/10spamfilter.rb +183 -0
- data/plugin/50sp.rb +146 -0
- data/plugin/60sf.rb +152 -0
- data/plugin/90migrate.rb +109 -0
- data/plugin/en/00default.rb +390 -0
- data/plugin/en/05referer.rb +49 -0
- data/plugin/en/10spamfilter.rb +81 -0
- data/plugin/en/50sp.rb +56 -0
- data/plugin/en/60sf.rb +60 -0
- data/plugin/ja/00default.rb +401 -0
- data/plugin/ja/05referer.rb +47 -0
- data/plugin/ja/10spamfilter.rb +79 -0
- data/plugin/ja/50sp.rb +66 -0
- data/plugin/ja/60sf.rb +73 -0
- data/public/.gitkeep +0 -0
- data/public/images/.gitkeep +0 -0
- data/public/javascripts/.gitkeep +0 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/skel/category.rhtml +9 -0
- data/skel/conf.rhtml +23 -0
- data/skel/day.rhtml +33 -0
- data/skel/diary.rhtml +83 -0
- data/skel/footer.rhtml +8 -0
- data/skel/header.rhtml +10 -0
- data/skel/i.category.rhtml +6 -0
- data/skel/i.conf.rhtml +14 -0
- data/skel/i.day.rhtml +28 -0
- data/skel/i.diary.rhtml +17 -0
- data/skel/i.footer.rhtml +2 -0
- data/skel/i.header.rhtml +3 -0
- data/skel/i.latest.rhtml +24 -0
- data/skel/i.month.rhtml +39 -0
- data/skel/i.search.rhtml +5 -0
- data/skel/i.update.rhtml +40 -0
- data/skel/i.update.rhtml.en +40 -0
- data/skel/latest.rhtml +27 -0
- data/skel/mail.rtxt +18 -0
- data/skel/mail.rtxt.en +18 -0
- data/skel/month.rhtml +27 -0
- data/skel/plugin_error.rhtml +27 -0
- data/skel/preview.rhtml +85 -0
- data/skel/preview.rhtml.en +72 -0
- data/skel/referer.rhtml +24 -0
- data/skel/search.rhtml +14 -0
- data/skel/tdiary.rconf +76 -0
- data/skel/update.rhtml +103 -0
- data/skel/update.rhtml.en +83 -0
- data/spec/acceptance/append_comment_spec.rb +94 -0
- data/spec/acceptance/append_diary_spec.rb +98 -0
- data/spec/acceptance/bugfix/encoding_error_spec.rb +27 -0
- data/spec/acceptance/save_conf_comment_spec.rb +87 -0
- data/spec/acceptance/save_conf_default_spec.rb +169 -0
- data/spec/acceptance/save_conf_dnsbl_spec.rb +152 -0
- data/spec/acceptance/save_conf_filter_spec.rb +50 -0
- data/spec/acceptance/save_conf_plugin_spec.rb +69 -0
- data/spec/acceptance/save_conf_referer_spec.rb +60 -0
- data/spec/acceptance/save_conf_security_spec.rb +280 -0
- data/spec/acceptance/support/helpers.rb +49 -0
- data/spec/acceptance/support/paths.rb +7 -0
- data/spec/acceptance/update_diary_spec.rb +113 -0
- data/spec/acceptance/view_category_spec.rb +38 -0
- data/spec/acceptance/view_comment_spec.rb +67 -0
- data/spec/acceptance/view_diary_spec.rb +126 -0
- data/spec/acceptance/view_referer_spec.rb +31 -0
- data/spec/acceptance_helper.rb +101 -0
- data/spec/core/compatible_spec.rb +54 -0
- data/spec/core/core_ext_spec.rb +59 -0
- data/spec/core/plugin_spec.rb +389 -0
- data/spec/core/rack/assets/precompile_spec.rb +76 -0
- data/spec/core/rack/html_anchor_spec.rb +57 -0
- data/spec/core/rack/valid_request_path_spec.rb +67 -0
- data/spec/core/style/emptdiary_style_spec.rb +165 -0
- data/spec/core/style/etdiary_style_spec.rb +512 -0
- data/spec/core/style/gfm_style_spec.rb +334 -0
- data/spec/core/style/rd_style_spec.rb +202 -0
- data/spec/core/style/tdiary_style_spec.rb +240 -0
- data/spec/core/style/wiki_style_spec.rb +441 -0
- data/spec/fixtures/ascii8bit-pstore.db +0 -0
- data/spec/fixtures/invalid-sequence-volatile.tdr +9 -0
- data/spec/fixtures/just_installed.conf +1 -0
- data/spec/fixtures/plugin/ja/sample.rb +4 -0
- data/spec/fixtures/plugin/sample.rb +6 -0
- data/spec/fixtures/sample.rb +12 -0
- data/spec/fixtures/tdiary.conf.gem +212 -0
- data/spec/fixtures/tdiary.conf.rack +212 -0
- data/spec/fixtures/tdiary.conf.rdb +227 -0
- data/spec/fixtures/tdiary.conf.secure +204 -0
- data/spec/fixtures/tdiary.conf.webrick +212 -0
- data/spec/javascripts/00default_spec.js +35 -0
- data/spec/javascripts/fixtures/00default.html +1 -0
- data/spec/javascripts/support/jasmine.yml +76 -0
- data/spec/plugin/bq_spec.rb +24 -0
- data/spec/plugin/plugin_helper.rb +203 -0
- data/spec/spec_helper.rb +32 -0
- data/tdiary.conf.beginner +244 -0
- data/tdiary.conf.sample +345 -0
- data/tdiary.conf.sample-en +333 -0
- data/tdiary.gemspec +26 -0
- data/tdiary.rb +151 -0
- data/tdiary/admin.rb +236 -0
- data/tdiary/application.rb +57 -0
- data/tdiary/author_only_base.rb +171 -0
- data/tdiary/base.rb +220 -0
- data/tdiary/cli.rb +116 -0
- data/tdiary/comment.rb +40 -0
- data/tdiary/comment_manager.rb +94 -0
- data/tdiary/compatible.rb +72 -0
- data/tdiary/config.rb +270 -0
- data/tdiary/core_ext.rb +122 -0
- data/tdiary/deploy.rb +50 -0
- data/tdiary/dispatcher.rb +77 -0
- data/tdiary/dispatcher/index_main.rb +122 -0
- data/tdiary/dispatcher/update_main.rb +101 -0
- data/tdiary/environment.rb +15 -0
- data/tdiary/filter.rb +48 -0
- data/tdiary/filter/default.rb +54 -0
- data/tdiary/filter/spam.rb +304 -0
- data/tdiary/io/base.rb +70 -0
- data/tdiary/io/cache/file.rb +123 -0
- data/tdiary/io/cache/memcached.rb +88 -0
- data/tdiary/io/cache/redis.rb +100 -0
- data/tdiary/io/default.rb +297 -0
- data/tdiary/io/pstore.rb +252 -0
- data/tdiary/io/rdb.rb +213 -0
- data/tdiary/lang/en.rb +79 -0
- data/tdiary/lang/ja.rb +72 -0
- data/tdiary/plugin.rb +375 -0
- data/tdiary/rack/assets/precompile.rb +37 -0
- data/tdiary/rack/auth/basic.rb +38 -0
- data/tdiary/rack/auth/omniauth.rb +51 -0
- data/tdiary/rack/html_anchor.rb +31 -0
- data/tdiary/rack/valid_request_path.rb +36 -0
- data/tdiary/referer_manager.rb +80 -0
- data/tdiary/request.rb +217 -0
- data/tdiary/response.rb +29 -0
- data/tdiary/server.rb +85 -0
- data/tdiary/style.rb +194 -0
- data/tdiary/style/tdiary_style.rb +198 -0
- data/tdiary/style/wiki_style.rb +213 -0
- data/tdiary/tasks.rb +1 -0
- data/tdiary/tasks/assets.rake +31 -0
- data/tdiary/tasks/auth.rake +28 -0
- data/tdiary/tasks/db.rake +110 -0
- data/tdiary/tasks/doc.rake +31 -0
- data/tdiary/tasks/heroku.rake +37 -0
- data/tdiary/tasks/jasmine.rake +16 -0
- data/tdiary/tasks/rdoc.rake +24 -0
- data/tdiary/tasks/release.rake +122 -0
- data/tdiary/tasks/rspec.rake +51 -0
- data/tdiary/tasks/server.rake +33 -0
- data/tdiary/tasks/test.rake +17 -0
- data/tdiary/version.rb +3 -0
- data/tdiary/view.rb +468 -0
- data/tdiary/view_helper.rb +15 -0
- data/test/disp_referrer_test.rb +93 -0
- data/test/my-sequel_test.rb +238 -0
- data/test/test_helper.rb +7 -0
- data/test/test_plugin_helper.rb +64 -0
- data/test/test_plugin_helper_test.rb +28 -0
- data/test/weather_test.rb +33 -0
- data/theme/base.css +268 -0
- data/theme/conf.block.png +0 -0
- data/theme/conf.css +254 -0
- data/theme/default/README +11 -0
- data/theme/default/body.png +0 -0
- data/theme/default/default.css +743 -0
- data/theme/help.png +0 -0
- data/theme/loading.gif +0 -0
- data/theme/tdiary1/README +7 -0
- data/theme/tdiary1/tdiary1.css +394 -0
- data/theme/tdiary2/README +19 -0
- data/theme/tdiary2/tdiary2.css +624 -0
- data/update.fcgi +45 -0
- data/update.rb +57 -0
- data/vendor/hikidoc-0.0.6/COPYING +28 -0
- data/vendor/hikidoc-0.0.6/NEWS +30 -0
- data/vendor/hikidoc-0.0.6/NEWS.ja +30 -0
- data/vendor/hikidoc-0.0.6/README +86 -0
- data/vendor/hikidoc-0.0.6/README.ja +83 -0
- data/vendor/hikidoc-0.0.6/Rakefile +68 -0
- data/vendor/hikidoc-0.0.6/TextFormattingRules +320 -0
- data/vendor/hikidoc-0.0.6/TextFormattingRules.ja +318 -0
- data/vendor/hikidoc-0.0.6/bin/hikidoc +66 -0
- data/vendor/hikidoc-0.0.6/lib/hikidoc.rb +914 -0
- data/vendor/hikidoc-0.0.6/setup.rb +1360 -0
- data/vendor/hikidoc-0.0.6/test/run-test.rb +13 -0
- data/vendor/hikidoc-0.0.6/test/test_hikidoc.rb +506 -0
- data/vendor/imagesize-0.1.1/Manifest.txt +19 -0
- data/vendor/imagesize-0.1.1/README.txt +49 -0
- data/vendor/imagesize-0.1.1/lib/image_size.rb +305 -0
- data/vendor/imagesize-0.1.1/lib/image_size/version.rb +9 -0
- data/vendor/imagesize-0.1.1/setup.rb +1585 -0
- data/vendor/imagesize-0.1.1/test/2-4-7.png +0 -0
- data/vendor/imagesize-0.1.1/test/4_1_2.gif +0 -0
- data/vendor/imagesize-0.1.1/test/bmp.bmp +0 -0
- data/vendor/imagesize-0.1.1/test/cursor.xbm +6 -0
- data/vendor/imagesize-0.1.1/test/detect.swf +0 -0
- data/vendor/imagesize-0.1.1/test/pbm.pbm +0 -0
- data/vendor/imagesize-0.1.1/test/pcx.pcx +0 -0
- data/vendor/imagesize-0.1.1/test/pgm.pgm +5 -0
- data/vendor/imagesize-0.1.1/test/test.xpm +38 -0
- data/vendor/imagesize-0.1.1/test/test_helper.rb +2 -0
- data/vendor/imagesize-0.1.1/test/test_image_size.rb +71 -0
- data/vendor/imagesize-0.1.1/test/tiff.tiff +0 -0
- data/vendor/imagesize-0.1.1/test/tokyo_tower.jpg +0 -0
- data/vendor/imagesize-0.1.1/test/tower_e.gif.psd +0 -0
- data/vendor/jasmine-jquery-1.4.2/jasmine-jquery.js +548 -0
- data/vendor/jquery-1.8/jquery.js +9227 -0
- data/vendor/rdtool-0.6.38/COPYING.txt +339 -0
- data/vendor/rdtool-0.6.38/Gemfile +3 -0
- data/vendor/rdtool-0.6.38/HISTORY +318 -0
- data/vendor/rdtool-0.6.38/LGPL-2.1 +502 -0
- data/vendor/rdtool-0.6.38/LICENSE.txt +58 -0
- data/vendor/rdtool-0.6.38/README.html +66 -0
- data/vendor/rdtool-0.6.38/README.ja.html +73 -0
- data/vendor/rdtool-0.6.38/README.rd +76 -0
- data/vendor/rdtool-0.6.38/README.rd.ja +85 -0
- data/vendor/rdtool-0.6.38/Rakefile +152 -0
- data/vendor/rdtool-0.6.38/TODO +22 -0
- data/vendor/rdtool-0.6.38/bin/rd2 +283 -0
- data/vendor/rdtool-0.6.38/bin/rdswap.rb +207 -0
- data/vendor/rdtool-0.6.38/doc/rd-draft.html +456 -0
- data/vendor/rdtool-0.6.38/doc/rd-draft.ja.html +466 -0
- data/vendor/rdtool-0.6.38/doc/rd-draft.rd +479 -0
- data/vendor/rdtool-0.6.38/doc/rd-draft.rd.ja +487 -0
- data/vendor/rdtool-0.6.38/lib/rd/block-element.rb +114 -0
- data/vendor/rdtool-0.6.38/lib/rd/complex-list-item.rb +65 -0
- data/vendor/rdtool-0.6.38/lib/rd/desclist.rb +55 -0
- data/vendor/rdtool-0.6.38/lib/rd/document-struct.rb +46 -0
- data/vendor/rdtool-0.6.38/lib/rd/dot.rd2rc +18 -0
- data/vendor/rdtool-0.6.38/lib/rd/element.rb +160 -0
- data/vendor/rdtool-0.6.38/lib/rd/filter.rb +255 -0
- data/vendor/rdtool-0.6.38/lib/rd/head-filter.rb +14 -0
- data/vendor/rdtool-0.6.38/lib/rd/inline-element.rb +233 -0
- data/vendor/rdtool-0.6.38/lib/rd/labeled-element.rb +14 -0
- data/vendor/rdtool-0.6.38/lib/rd/list.rb +57 -0
- data/vendor/rdtool-0.6.38/lib/rd/loose-struct.rb +11 -0
- data/vendor/rdtool-0.6.38/lib/rd/methodlist.rb +57 -0
- data/vendor/rdtool-0.6.38/lib/rd/output-format-visitor.rb +30 -0
- data/vendor/rdtool-0.6.38/lib/rd/package.rb +4 -0
- data/vendor/rdtool-0.6.38/lib/rd/parser-util.rb +14 -0
- data/vendor/rdtool-0.6.38/lib/rd/post-install +1 -0
- data/vendor/rdtool-0.6.38/lib/rd/pre-setup.rb +18 -0
- data/vendor/rdtool-0.6.38/lib/rd/rbl-file.rb +69 -0
- data/vendor/rdtool-0.6.38/lib/rd/rbl-suite.rb +37 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd-struct.rb +86 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2html-ext-lib.rb +266 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2html-ext-opt.rb +34 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2html-lib.rb +490 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2html-opt.rb +67 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2man-lib.rb +251 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2rdo-lib.rb +19 -0
- data/vendor/rdtool-0.6.38/lib/rd/rd2rmi-lib.rb +32 -0
- data/vendor/rdtool-0.6.38/lib/rd/rdblockparser.ry +518 -0
- data/vendor/rdtool-0.6.38/lib/rd/rdblockparser.tab.rb +1061 -0
- data/vendor/rdtool-0.6.38/lib/rd/rdfmt.rb +15 -0
- data/vendor/rdtool-0.6.38/lib/rd/rdinlineparser.ry +503 -0
- data/vendor/rdtool-0.6.38/lib/rd/rdinlineparser.tab.rb +1243 -0
- data/vendor/rdtool-0.6.38/lib/rd/rdvisitor.rb +214 -0
- data/vendor/rdtool-0.6.38/lib/rd/reference-resolver.rb +114 -0
- data/vendor/rdtool-0.6.38/lib/rd/search-file.rb +14 -0
- data/vendor/rdtool-0.6.38/lib/rd/tree.rb +103 -0
- data/vendor/rdtool-0.6.38/lib/rd/version.rb +41 -0
- data/vendor/rdtool-0.6.38/lib/rd/visitor.rb +86 -0
- data/vendor/rdtool-0.6.38/rdtool.gemspec +125 -0
- data/vendor/rdtool-0.6.38/setup.rb +1596 -0
- data/vendor/rdtool-0.6.38/test/data/includee1.html +1 -0
- data/vendor/rdtool-0.6.38/test/data/includee2.html +1 -0
- data/vendor/rdtool-0.6.38/test/data/includee3.nothtml +1 -0
- data/vendor/rdtool-0.6.38/test/data/includee4.xhtml +0 -0
- data/vendor/rdtool-0.6.38/test/data/label.rbl +2 -0
- data/vendor/rdtool-0.6.38/test/data/label2.rbl +2 -0
- data/vendor/rdtool-0.6.38/test/data/sub/includee2.html +1 -0
- data/vendor/rdtool-0.6.38/test/data/sub/includee4.html +0 -0
- data/vendor/rdtool-0.6.38/test/dummy-observer.rb +6 -0
- data/vendor/rdtool-0.6.38/test/dummy.rb +33 -0
- data/vendor/rdtool-0.6.38/test/temp-dir.rb +19 -0
- data/vendor/rdtool-0.6.38/test/test-block-parser.rb +46 -0
- data/vendor/rdtool-0.6.38/test/test-desclist-item.rb +219 -0
- data/vendor/rdtool-0.6.38/test/test-document-element.rb +46 -0
- data/vendor/rdtool-0.6.38/test/test-document-struct.rb +66 -0
- data/vendor/rdtool-0.6.38/test/test-element.rb +46 -0
- data/vendor/rdtool-0.6.38/test/test-headline.rb +80 -0
- data/vendor/rdtool-0.6.38/test/test-inline-parser.rb +46 -0
- data/vendor/rdtool-0.6.38/test/test-list-item.rb +54 -0
- data/vendor/rdtool-0.6.38/test/test-list.rb +53 -0
- data/vendor/rdtool-0.6.38/test/test-methodlist-item.rb +73 -0
- data/vendor/rdtool-0.6.38/test/test-nonterminal-element.rb +170 -0
- data/vendor/rdtool-0.6.38/test/test-nonterminal-inline.rb +33 -0
- data/vendor/rdtool-0.6.38/test/test-output-format-visitor.rb +48 -0
- data/vendor/rdtool-0.6.38/test/test-parser-util.rb +41 -0
- data/vendor/rdtool-0.6.38/test/test-rbl-file.rb +156 -0
- data/vendor/rdtool-0.6.38/test/test-rbl-suite.rb +43 -0
- data/vendor/rdtool-0.6.38/test/test-rd2html-lib.rb +496 -0
- data/vendor/rdtool-0.6.38/test/test-rdtree.rb +17 -0
- data/vendor/rdtool-0.6.38/test/test-rdvisitor.rb +29 -0
- data/vendor/rdtool-0.6.38/test/test-reference-resolver.rb +202 -0
- data/vendor/rdtool-0.6.38/test/test-reference.rb +132 -0
- data/vendor/rdtool-0.6.38/test/test-search-file.rb +22 -0
- data/vendor/rdtool-0.6.38/test/test-terminal-inline.rb +41 -0
- data/vendor/rdtool-0.6.38/test/test-textblock.rb +44 -0
- data/vendor/rdtool-0.6.38/test/test-tree.rb +82 -0
- data/vendor/rdtool-0.6.38/test/test-version.rb +57 -0
- data/vendor/rdtool-0.6.38/test/test-visitor.rb +230 -0
- data/vendor/rdtool-0.6.38/utils/rd-mode.el +464 -0
- metadata +666 -0
data/tdiary.conf.sample
ADDED
@@ -0,0 +1,345 @@
|
|
1
|
+
#
|
2
|
+
# tDiary configuration file $Revision: 1.38 $
|
3
|
+
#
|
4
|
+
# For those who do not read Japanese: please read doc/README.en.html or
|
5
|
+
# misc/i18n/README-en.rd and use misc/i18n/tdiary.conf.sample-en.
|
6
|
+
#
|
7
|
+
|
8
|
+
#-------
|
9
|
+
# 設定画面から指定できない項目群
|
10
|
+
#-------
|
11
|
+
|
12
|
+
# 日記データベースを作成するディレクトリ【必須】
|
13
|
+
# 日記のデータを保存するディレクトリです。このディレクトリは通常、WWW
|
14
|
+
# 経由でアクセスできない(public_html配下でない)ディレクトリを指定しま
|
15
|
+
# す。このディレクトリは、WWWサーバの権限で書き込めるパーミッションに
|
16
|
+
# しておく必要があります。
|
17
|
+
@data_path = 'data'
|
18
|
+
|
19
|
+
# 日記保存形式の指定【オプション】
|
20
|
+
# 日記の保存形式を標準から変更する場合には、必要な設定をしなければなり
|
21
|
+
# ません。何も指定しない場合にはtDiary2形式(テキスト)になります。
|
22
|
+
# 何を指定するかは、その保存形式用プログラムの説明に従ってください。
|
23
|
+
# 以下の2行のコメント(#)をはずすと、tDiary1形式(バイナリ)になります。
|
24
|
+
#require 'tdiary/pstoreio'
|
25
|
+
#@io_class = TDiary::PStoreIO
|
26
|
+
|
27
|
+
# 日記記述形式の指定【オプション】
|
28
|
+
# 日記の記述形式(書き方のフォーマット)を指定できます。現在は'tDiary'
|
29
|
+
# のみがサポートされていますが、記述形式用プログラムを追加すればそれを
|
30
|
+
# 指定することも可能です。
|
31
|
+
#@style = 'tDiary'
|
32
|
+
|
33
|
+
# 参照・更新スクリプト名【オプション】
|
34
|
+
# @indexと@updateには、それぞれ参照用、更新用のスクリプトファイル名を
|
35
|
+
# 指定できます。通常これらは内部的にデフォルトの名前(「./」と「update.rb」)
|
36
|
+
# が設定されていますが、これを明示することで、ApacheのDirectoryIndexが
|
37
|
+
# 指定できない環境や、フレーム内に日記を入れたい場合に利用できます。行
|
38
|
+
# 頭の「#」を外してから値を書き換えて下さい。
|
39
|
+
#@index = './'
|
40
|
+
#@update = 'update.rb'
|
41
|
+
|
42
|
+
# マルチユーザモード【オプション】
|
43
|
+
# @multi_userは、日記を複数ユーザで記述するときに利用する変数です。こ
|
44
|
+
# の値をtrueにすると、マルチユーザモードになり、tDiaryは以下のように挙
|
45
|
+
# 動を変え、サブタイトルの先頭に、「[ユーザ名]サブタイトル」という形式
|
46
|
+
# で記入者の名前が入ります。
|
47
|
+
# マルチーユーザモードでの日記の編集は、とても危険です。なぜなら、複数
|
48
|
+
# の人が同時に編集作業をした場合、先に保存した人の日記が消えてしまうか
|
49
|
+
# らです。tDiaryをマルチユーザモードで利用する場合は十分に注意して運用
|
50
|
+
# しましょう。
|
51
|
+
# ここでいう「ユーザ名」は、ブラウザからログインする時に使ったものです。
|
52
|
+
# なお、.htaccessのRequire Userに、必要なだけユーザを追加するのを忘れ
|
53
|
+
# ないでください。
|
54
|
+
@multi_user = false
|
55
|
+
|
56
|
+
# プラグインのパス【オプション】
|
57
|
+
# 単一のインストールイメージで複数の日記を運用する場合に、プラグイン
|
58
|
+
# を分けたい場合があります。その場合、@plugin_pathでプラグインのディ
|
59
|
+
# レクトリを指定することで、日記ごとにことなるプラグインを指定できま
|
60
|
+
# す。なお、この指定がない場合には、インストール先のpluginディレクト
|
61
|
+
# リが使われます。
|
62
|
+
#@plugin_path = 'path of plugins'
|
63
|
+
|
64
|
+
# キャッシュファイルのパス【オプション】
|
65
|
+
# tDiaryは動作時にさまざまなキャッシュファイルを作成します。このディ
|
66
|
+
# レクトリは通常、@data_pathの下に作られますが、ここで別のディレクト
|
67
|
+
# リを指定することも可能です。
|
68
|
+
#@cache_path = 'path of cache'
|
69
|
+
|
70
|
+
# プラグインに渡すオプション【オプション】
|
71
|
+
# プラグインによっては、tdiary.conf経由でオプションを渡すことで挙動を
|
72
|
+
# 変更できるものがあります。@optionsはそのオプションを指定する時に使う
|
73
|
+
# 変数です。指定方法は以下のとおりです。詳しくは各プラグインの説明を参
|
74
|
+
# 照照して下さい。
|
75
|
+
# 例: sampleプラグインのhogeオプションを設定
|
76
|
+
# @options['sample.hoge'] = 'foobar'
|
77
|
+
|
78
|
+
# プラグイン適用後にもういちどプラグインを適用するかどうか(true/false)
|
79
|
+
@options['apply_plugin'] = true
|
80
|
+
|
81
|
+
# 編集画面でのアクセスキー
|
82
|
+
# true なら有効になります。Safari で Emacs と同じキーバインディングを
|
83
|
+
# 使いたい場合は false にするといいでしょう。
|
84
|
+
@accesskey_enabled = true
|
85
|
+
|
86
|
+
# tDiaryをproxyの内側に設置する場合(頭に「http://」を付けない)
|
87
|
+
# @options['proxy'] = 'proxy.example.com:8080'
|
88
|
+
|
89
|
+
# bot扱いすべきUser-Agentたち。Googlebotなどはデフォルトで対応している
|
90
|
+
@options['bot'] = [
|
91
|
+
'^BlogLines/',
|
92
|
+
'^blogmap',
|
93
|
+
'MI[CK]AN/',
|
94
|
+
'^NG/',
|
95
|
+
'^samidare',
|
96
|
+
'^TAMATEBAKO/'
|
97
|
+
]
|
98
|
+
|
99
|
+
# リンク元の記録制御(true/false)【オプション】
|
100
|
+
# 日付指定のアクセス時のリンク元だけを記録するかどうかを指定します。標
|
101
|
+
# 準ではtrue(日付指定のみ記録)です。これをfalseにすると最新ページへの
|
102
|
+
# アクセスが「本日のリンク元」に記録されるようになるので、リンク元表示
|
103
|
+
# のノイズが増えます。
|
104
|
+
@referer_day_only = true
|
105
|
+
|
106
|
+
#-------
|
107
|
+
# 設定画面から変更できる項目群。必要なら書き換えて使用してください。
|
108
|
+
# なお、一度設定画面から設定してしまうと、こちらのファイルを編集しても反
|
109
|
+
# 映されません。
|
110
|
+
#-------
|
111
|
+
|
112
|
+
# あなたの名前とメールアドレス
|
113
|
+
# @author_nameにはあなたの名前を、@author_mailにはあなたのメールアドレ
|
114
|
+
# スを指定します。この値は、HTML化された日記のヘッダ部分に埋め込まれま
|
115
|
+
# す。
|
116
|
+
@author_name = 'Your name'
|
117
|
+
@author_mail = 'foo@example.net'
|
118
|
+
|
119
|
+
# 日記より上位のコンテンツがある場合に指定
|
120
|
+
# @index_pageには、あなたの日記の表紙(またはホームページのトップページ)
|
121
|
+
# のURLを指定してください。日記のヘッダ部分および、ページの先頭に埋め
|
122
|
+
# 込まれます。
|
123
|
+
@index_page = 'http://www.example.net/~foo/'
|
124
|
+
|
125
|
+
# TITLEタグおよび携帯端末で使われる日記タイトル。
|
126
|
+
# HTMLタグは使えません。
|
127
|
+
@html_title = 'hogehoge diary'
|
128
|
+
|
129
|
+
# ヘッダ
|
130
|
+
# 日記ページの先頭部分に埋め込まれる文を指定します。「HEADER」に挟まれ
|
131
|
+
# た部分を書き換えて下さい。そのままの形で埋め込まれるので、HTMLタグが
|
132
|
+
# 使えます。また、文字列中にはeRubyタグが使用できます。eRubyを知らなく
|
133
|
+
# ても、以下の2つのタグはどこかに埋め込んでおかないと不便です。
|
134
|
+
#
|
135
|
+
# <%=calendar%>
|
136
|
+
# カレンダーを埋め込みます。このカレンダーは月ごとの日記へのリンク
|
137
|
+
# になっています。
|
138
|
+
# <%=navi%>
|
139
|
+
# 日記の更新などを行うためのメニューを埋め込みます。
|
140
|
+
#
|
141
|
+
@header = <<HEADER
|
142
|
+
<%= navi %>
|
143
|
+
<h1>ほげほげ日記</h1>
|
144
|
+
<%=calendar%>
|
145
|
+
HEADER
|
146
|
+
|
147
|
+
# フッタ
|
148
|
+
# ヘッダ同様、日記ページの末尾に挿入される文字列を指定できます。
|
149
|
+
# 「FOOTER」で挟まれた部分を書き換えてください。
|
150
|
+
@footer = <<FOOTER
|
151
|
+
<%= navi %>
|
152
|
+
<p>以下のメッセージを削除するには、「設定」画面から「フッタ」を編集してください。</p>
|
153
|
+
<p style="font-size: x-large;">あらかじめ<a href="doc/README.html">README</a>と<a href="doc/HOWTO-write-tDiary.html">日記の書き方</a>には目を通すようにしてください。</p>
|
154
|
+
FOOTER
|
155
|
+
|
156
|
+
# 日付のフォーマットの指定
|
157
|
+
# 日記の日付のフォーマットを指定できます。デフォルトでは「YYYY-MM-DD」
|
158
|
+
# になっています。RubyのTime::strftimeのパラメタがすべて使えますが、時
|
159
|
+
# 刻に関係する部分は指定しても意味がありません。主に使えるのは「%Y」
|
160
|
+
# (西暦年)、「%m」(月数値)、「%b」(短月名)、「%B」(長月名)、「%d」(日)、
|
161
|
+
# 「%a」(短曜日名)、「%A」(長曜日名)といったところでしょう。
|
162
|
+
@date_format = '%Y-%m-%d'
|
163
|
+
|
164
|
+
# セクションアンカーとツッコミアンカーの指定
|
165
|
+
# 日記のセクションアンカー(@section_anchor)および「ツッコミ」アンカー
|
166
|
+
# (@comment_anchor))に使う文字を指定します。
|
167
|
+
# それぞれの文字列が<a href="...">〜</a>に挟まれてHTMLに展開されます。
|
168
|
+
# なお、classがsanchor(セクションアンカーの場合)やcanchor(ツッコミアン
|
169
|
+
# カーの場合)のspanタグを使うと、テーマによっては自動的に画像によるア
|
170
|
+
# ンカーが付くようになります。
|
171
|
+
@section_anchor = '<span class="sanchor">_</span>'
|
172
|
+
@comment_anchor = '<span class="canchor">_</span>'
|
173
|
+
|
174
|
+
# 最新表示時に最大何日分の日記を表示するかの指定
|
175
|
+
# 最新日記を表示するページで、最大何日分の日記を出力するかを指定します。
|
176
|
+
# 指定した日数に達しない場合は、その月のすべての日記を出力します。また、
|
177
|
+
# 指定した日数に届かなかった場合には、前月以前まで遡ります。
|
178
|
+
@latest_limit = 10
|
179
|
+
|
180
|
+
# テーマ名(もしくはCSSのURL)の指定
|
181
|
+
# 日記のスタイルを決めるテーマ名もしくはCSSファイルのURLを指定します。
|
182
|
+
# @themeには添付の標準スタイルシートを指定してあります。これを書き換え
|
183
|
+
# て、好みのデザインにできます。themeディレクトリの下には、標準添付の
|
184
|
+
# テーマ(*.css)がいくつかありますので、好みに応じて変更してみてくださ
|
185
|
+
# い。
|
186
|
+
# もちろん、自分でスタイルシートを書いてもかまいません。その場合は@theme
|
187
|
+
# には''(空文字列)を指定し、@cssにCSSファイルのURLを記述します。
|
188
|
+
@theme = 'default'
|
189
|
+
@css = ''
|
190
|
+
|
191
|
+
# ツッコミを表示するかどうか(true or false)
|
192
|
+
# 「本日のツッコミ」を表示するかどうか指定します。ツッコミは@show_comment
|
193
|
+
# をfalseにすることで読者から隠すことができます。日記のオーナー(あなた)
|
194
|
+
# は、更新画面で日付を指定することでツッコミを見ることができます。
|
195
|
+
@show_comment = true
|
196
|
+
|
197
|
+
# 最新および月別表示でツッコミを最大何件表示するか
|
198
|
+
# 「本日のツッコミ」を表示する場合、最新及び月間表示時に最大いくつまで
|
199
|
+
# 表示するかを指定します。
|
200
|
+
@comment_limit = 3
|
201
|
+
|
202
|
+
# 1日あたりのツッコミ最大数
|
203
|
+
# 1日に最大何件までツッコミを受け付けるかを指定します。この数を超える
|
204
|
+
# と、ツッコミフォーム自体が表示されなくなります。
|
205
|
+
@comment_limit_per_day = 100
|
206
|
+
|
207
|
+
# リンク元リストを表示するかどうか(true or false)
|
208
|
+
# 「本日のリンク元」を表示するかどうか。リンク元は、日記を訪れてくれた
|
209
|
+
# 人がどのページにあるリンクをたどってきたかを示すURLです。これがわか
|
210
|
+
# ると、自分の日記をリンクしているページがわかるので、日記コミュニケー
|
211
|
+
# ションがとりやすくなります。tDiaryはこの情報を日記の読者にも公開する
|
212
|
+
# ようになっていますが、@show_refererをfalseにすることで、これを抑止で
|
213
|
+
# きます。非表示にしても、日記のオーナー(あなた)は更新画面で日付を指定
|
214
|
+
# することでリンク元を見ることが可能です。
|
215
|
+
@show_referer = true
|
216
|
+
|
217
|
+
# 更新時の時差調整
|
218
|
+
# 更新フォームに自動的に挿入される日付を調整します。単位は「時」で、小
|
219
|
+
# 数が指定できます。例えば午前2時までを前日として扱いたい場合には「-2」
|
220
|
+
# と指定することで、実際の時刻から2時間が引かれた日付が入ります。また、
|
221
|
+
# 海外サーバ上で運用している場合の時差調整にも利用できます。
|
222
|
+
@hour_offset = 0
|
223
|
+
|
224
|
+
# 長年日記を表示するためのリンクを表示するかどうか(true or false)
|
225
|
+
# 「長年日記」とは、前年以前の同じ日の日記を一度に参照できるページを生成
|
226
|
+
# する機能です。
|
227
|
+
@show_nyear = false
|
228
|
+
|
229
|
+
#-----
|
230
|
+
# 設定画面から追加設定できるが、ここに(設定画面からは変更できない)標準設
|
231
|
+
# 定を記述できる項目
|
232
|
+
#-----
|
233
|
+
|
234
|
+
# リンク元リストから除外するURL(正規表現)
|
235
|
+
# @no_refererは、リンク元として記録しないURLの配列を指定します。毎日定
|
236
|
+
# 期的にあるアンテナ経由の訪問者や、検索エンジンのロボットなど、本来の
|
237
|
+
# 目的(つまり自分の日記の話題に対してのリンク)を探り出すためのものでは
|
238
|
+
# ないリンク元はノイズになってしまい、けっこう邪魔です。そのようなリン
|
239
|
+
# ク元はここにURLを指定することで記録されなくなります。特に、自分の日
|
240
|
+
# 記のURLは必ずここに入れておくべきでしょう。書式はRubyの配列(Array)で、
|
241
|
+
# 中身は文字列です。比較時には正規表現として扱われますが、Regexpオブジ
|
242
|
+
# ェクトは指定しないでください。
|
243
|
+
@no_referer = [
|
244
|
+
'^' + Regexp.quote( base_url ), # 自分の日記
|
245
|
+
'^http://localhost[:/]',
|
246
|
+
'^http://192\.168\.',
|
247
|
+
'^http://172\.1[6789]',
|
248
|
+
'^http://172\.2[0-9]',
|
249
|
+
'^http://172\.3[01]',
|
250
|
+
'^http://10\.',
|
251
|
+
]
|
252
|
+
|
253
|
+
# 「本日のリンク元」にのみ記録するリンク元のURL(正規表現)
|
254
|
+
# @only_volatileは、「本日のリンク元」にのみ記録するリンク元URLの配列を
|
255
|
+
# 記述します。ここに含まれるURLは、たとえ過去の日記に対するアクセスであっ
|
256
|
+
# てもその日のリンク元には記録されず、一時的に記録されるだけになります。
|
257
|
+
# この記録は、新しい日記を記述すると消去されます。検索サイト経由でのア
|
258
|
+
# クセスなどはここに入れておくのが良いかもしれません。指定書式は@no_referer
|
259
|
+
# と同じです。
|
260
|
+
@only_volatile = [
|
261
|
+
]
|
262
|
+
|
263
|
+
# リンク元リストにURLでなく特定文字列を指定する場合の変換表(正規表現)
|
264
|
+
# @referer_tableは、「本日のリンク元」の一覧(一日単位で表示される方)に
|
265
|
+
# 味気ないURLが並ぶのを回避するための設定です。対象となるリンク元のURL
|
266
|
+
# の正規表現文字列と、置換後の文字列をペアにした配列をアイテムに持つ配
|
267
|
+
# 列として記述します。置換後の文字列には、URL中の「(〜)」で囲まれた文
|
268
|
+
# 字列を\1、\2……といった形で置き換えることができます。上の例では、tDiary
|
269
|
+
# で運用されている某作者の日記を日付指定、月指定、指定なしのそれぞれの
|
270
|
+
# 場合について、別々の文字列に置換しています。
|
271
|
+
@referer_table = [
|
272
|
+
['^http://www\.tdiary\.net/.*', 'tDiary.Net'],
|
273
|
+
['^http://sho\.tdiary\.net/(\d{4})(\d\d)(\d\d)\.html', 'ただのにっき(\1-\2-\3)'],
|
274
|
+
['^http://sho\.tdiary\.net/(\d{4})(\d\d)\.html', 'ただのにっき(\1-\2)'],
|
275
|
+
['^http://([^\.]*)\.tdiary\.net/(\d{4})(\d\d)(\d\d)\.html', 'tDiary.Net[\1](\2-\3-\4)'],
|
276
|
+
['^http://([^\.]*)\.tdiary\.net/(\d{4})(\d\d)\.html', 'tDiary.Net[\1](\2-\3)'],
|
277
|
+
['^http://([^\.]*)\.tdiary\.net/.*', 'tDiary.Net[\1]'],
|
278
|
+
['^http://www.google.(com|co\.jp)/(hws/search|search|ie|m).*?[^ao]q=([^&]*).*', 'google検索(\3)'],
|
279
|
+
['^http://blogsearch.google.(com|co\.jp)/blogsearch.*?q=([^&]*).*', 'googleブログ検索(\3)'],
|
280
|
+
['^http://(x\.)?search.(mobile\.)?yahoo.(com|co\.jp)/.*?p=([^&]*).*', 'Yahoo検索(\4)'],
|
281
|
+
['^http://(blog-search|blogsearch\.mobile)\.yahoo\.co\.jp/.*?p=([^&]*).*', 'Yahooブログ検索(\2)'],
|
282
|
+
['^http://search.www.infoseek.co.jp/.*?qt=([^&]*).*', 'Infoseek検索(\1)'],
|
283
|
+
['^http://(kotochu|search).fresheye.com/.*?kw=([^&]*).*', 'FreshEye検索(\2)'],
|
284
|
+
['^http://(www|search).goo.ne.jp/.*?MT=([^&]*).*', 'goo検索(\2)'],
|
285
|
+
['^http://(www|search).nifty.com/.*?(q|Text)=([^&]*).*', '@nifty検索(\3)'],
|
286
|
+
['^http://www.excite.co.jp/.*?(search|s)=([^&]*).*', 'excite検索(\2)'],
|
287
|
+
['^http://search.msn.co.jp/.*?(q|MT)=([^&]*).*', 'msn検索(\2)'],
|
288
|
+
['^http://search.live.com/.*?q=([^&]*).*', 'Live Search(\1)'],
|
289
|
+
['http://www.bing.com/.*?q=([^&]*).*', 'Bing(\1)'],
|
290
|
+
["^http://cgi.search.biglobe.ne.jp/cgi-bin/search.*?q=([^&]*).*", "BIGLOBE検索(\\1)"],
|
291
|
+
#
|
292
|
+
# 以下の設定は、上記の置換リストで変換されなかったリンク元URLのうち、
|
293
|
+
# 50文字を越えるものの後半を省略するという設定です。これはかならず
|
294
|
+
# @referer_tableの末尾に入っていないと意味がありません。@referer_table
|
295
|
+
# に新しい置換ルールを追加する場合は、この上に挿入してください。
|
296
|
+
#
|
297
|
+
['^(.{50}).*$', '\1...'],
|
298
|
+
]
|
299
|
+
|
300
|
+
# Cross-Site Request Forgery (CSRF)に対する防御の方法の指定。
|
301
|
+
#
|
302
|
+
# CSRF検査では、常にリクエスト方法と
|
303
|
+
# 不正なRefererが送信されていないことの検査は行なわれます。
|
304
|
+
# それに加えて、
|
305
|
+
# 1: 正しいRefererが存在することを検査する(キーは使わない)
|
306
|
+
# 2: 乗っ取り防止キーを検査する(Refererが空であることを許す)
|
307
|
+
# 3: 正しいRefererと乗っ取り防止キーの双方を検査する
|
308
|
+
# のいずれかの設定が可能です。
|
309
|
+
#
|
310
|
+
# 日記著者がRefererを送信しないブラウザを使用している場合、乗っ取り防止キーを
|
311
|
+
# 設定の上、2にしてください。Refererを送信しないブラウザを利用している
|
312
|
+
# 場合、1, 3にすると書き込み・設定変更ができなくなります。
|
313
|
+
#
|
314
|
+
# 通常のRefererを送信するブラウザを利用している場合は、
|
315
|
+
# 1か3にしてください。3にする場合、乗っ取り防止キーの設定も必要です。
|
316
|
+
#
|
317
|
+
# なお、2, 3にした場合、この機構に対応しない一部のプラグインが
|
318
|
+
# 動作しなくなることがあります。
|
319
|
+
#
|
320
|
+
@options['csrf_protection_method'] = 1
|
321
|
+
|
322
|
+
# 乗っ取り防止キーの指定。
|
323
|
+
# 任意の文字列を指定します。この鍵が盗まれると、CSRFにより大きな被害を
|
324
|
+
# 受ける可能性がありますので、気をつけて管理して下さい。
|
325
|
+
# csrf_protection_method が1の場合、鍵は使われません。
|
326
|
+
# csrf_protection_method が2または3の場合、鍵が空だと設定変更ができなくなります。
|
327
|
+
@options['csrf_protection_key'] = ''
|
328
|
+
|
329
|
+
# Refererの検査において、正しい参照元と見なすURLにマッチする正規表現。
|
330
|
+
# @updateに相当するページは自動的に追加されますが、
|
331
|
+
# 何らかの理由でこれらが適切でない場合、または特定のページ(例えば、
|
332
|
+
# 自分専用ポータルページ)を追加で指定したい場合に指定して下さい。
|
333
|
+
# nil、空文字列の場合は何もマッチしないものと扱われます。
|
334
|
+
# 信頼できないサイトにマッチしないよう十分留意して下さい。
|
335
|
+
@options['csrf_protection_allowed_referer_regexp_for_update'] = ''
|
336
|
+
|
337
|
+
#----
|
338
|
+
# CGIによる設定ファイルを読む指定【必須】
|
339
|
+
# セキュリティを強化したい場合(tDiaryで日記サービスを提供するなど)に
|
340
|
+
# は、@secureをtrueにして下さい。危険な変数操作や、ファイルの読み込み
|
341
|
+
# が制限されます。
|
342
|
+
#----
|
343
|
+
@secure = false
|
344
|
+
load_cgi_conf
|
345
|
+
|
@@ -0,0 +1,333 @@
|
|
1
|
+
#
|
2
|
+
# tDiary configuration file $Revision: 1.18 $
|
3
|
+
#
|
4
|
+
|
5
|
+
#-------
|
6
|
+
# The items which you can't configure with browser
|
7
|
+
#-------
|
8
|
+
|
9
|
+
# Language setting
|
10
|
+
# If you use tDiary in English mode, you have to set @lang to 'en'.
|
11
|
+
# Or 'zh' for Traditional-Chinese.
|
12
|
+
@lang = 'en'
|
13
|
+
# @lang = 'zh'
|
14
|
+
|
15
|
+
# The directory where the diary's data are stored.(must)
|
16
|
+
# tDiary stores your diary's data in this directory. You usually
|
17
|
+
# assign this item to the directory which can't be accessed through WWW.
|
18
|
+
# This directory's permission is set so that WWW server can
|
19
|
+
# write files in it.
|
20
|
+
@data_path = 'data'
|
21
|
+
|
22
|
+
# The format of the diary(optional)
|
23
|
+
# If you change the format of the diary from the default,
|
24
|
+
# you must add some items to your configuration file.
|
25
|
+
# In default, tDiary uses tDiary2 format.
|
26
|
+
# What you must configure depends on the format of diary.
|
27
|
+
# Please see the document of the program which enable tDiary to
|
28
|
+
# use other format.
|
29
|
+
# If "#" of the two lines below are removed, tDiary uses tDiary1 format.
|
30
|
+
#require 'tdiary/pstoreio'
|
31
|
+
#@io_class = TDiary::PStoreIO
|
32
|
+
|
33
|
+
# Script names for reading or updating your diary(optional)
|
34
|
+
# You can set @index and @update to the script filenames for
|
35
|
+
# reading or updating your diary. Normally, these variables have
|
36
|
+
# the default value("./" and "update.rb"). But, if you specify these
|
37
|
+
# variables, you can use tDiary in case that you can't use "DirectoryIndex"
|
38
|
+
# or you want to use frame.
|
39
|
+
#@index = './'
|
40
|
+
#@update = 'update.rb'
|
41
|
+
|
42
|
+
# Multi-user mode(optional)
|
43
|
+
# You use @multi_user when your diary is written by plural persons.
|
44
|
+
# If you set this variable to "true", the multi-user mode is enabled and
|
45
|
+
# tDiary change its behavior. In the beginning of the sub-title, writer's name
|
46
|
+
# is inserted. The style is like "[user name] sub-title".
|
47
|
+
# The editing in multi-uses mode is dangerous. If plural persons
|
48
|
+
# write diary at the same time, the change which is saved precedently
|
49
|
+
# is ignored. You must be careful when you use multi-user mode.
|
50
|
+
# The words, "user name", is the name which is used when you login with browser.
|
51
|
+
# Don't forget to add necessary user names to "Require User" of .htaccess.
|
52
|
+
@multi_user = false
|
53
|
+
|
54
|
+
# path of plugins. (optional)
|
55
|
+
# In default, plugins are find from "plugin" directory under install
|
56
|
+
# path. But, when @plugin_path is set, tDiary will load plugins
|
57
|
+
# from it.
|
58
|
+
#@plugin_path = 'path of plugins'
|
59
|
+
|
60
|
+
# path of cache files. (optional)
|
61
|
+
# tDiary makes some cache files under @data_path/cache. You may specify
|
62
|
+
# any directory for cache files by this variable.
|
63
|
+
#@cache_path = 'path of cache files'
|
64
|
+
|
65
|
+
# options for plugins. (optional)
|
66
|
+
# Some plugins can receive options from tdiary.conf.
|
67
|
+
# ex: a option "foo" of plugin "sample".
|
68
|
+
# @options[sample.foo] = 'foobar'
|
69
|
+
|
70
|
+
# apply plugins after 1st applyeds plugin (true/false)
|
71
|
+
@options['apply_plugin'] = true
|
72
|
+
|
73
|
+
# User-Agent list that is considered as bot.
|
74
|
+
@options['bot'] = [
|
75
|
+
'^(Naverbot|Cowbot)-',
|
76
|
+
'^BlogLines/',
|
77
|
+
'^blogmap',
|
78
|
+
'^FAST-WebCrawler/',
|
79
|
+
'^Hatena Antenna/',
|
80
|
+
'MI[CK]AN/',
|
81
|
+
'^msnbot/',
|
82
|
+
'^NG/',
|
83
|
+
'^Openbot/',
|
84
|
+
'^samidare',
|
85
|
+
'^TAMATEBAKO/',
|
86
|
+
'^TomSoftAntenna'
|
87
|
+
]
|
88
|
+
|
89
|
+
# Control Links saving [true or false] (optional)
|
90
|
+
# Specify which saving only day mode (default). It means reducing 'referer
|
91
|
+
# noise' by access from 'Link page'. If this value to false, Today's Link
|
92
|
+
# begin to save links to top page of your diary.
|
93
|
+
@referer_day_only = true
|
94
|
+
|
95
|
+
|
96
|
+
#-------
|
97
|
+
# Items which you can configure with browser
|
98
|
+
#
|
99
|
+
# If necessary, you change these items.
|
100
|
+
# Once you do setting with browser,
|
101
|
+
# these items' value is not reflected even if you edit "tdiary.conf" directly.
|
102
|
+
#-------
|
103
|
+
|
104
|
+
# your name and mail address
|
105
|
+
# you set @author_name to your name and @author_mail to your mail
|
106
|
+
# address. These values are embedded in the HTML header of your diary.
|
107
|
+
@author_name = 'Your name'
|
108
|
+
@author_mail = 'foo@example.net'
|
109
|
+
|
110
|
+
# your top-page
|
111
|
+
# if your website has contents other than diary, you
|
112
|
+
# set @index_page to URL of your other website page, for example,
|
113
|
+
# the front page of your diary or the top-page of your website.
|
114
|
+
# This is embedded in the HTML header and at the beginning of
|
115
|
+
# your diary page.
|
116
|
+
@index_page = 'http://www.example.net/~foo/'
|
117
|
+
|
118
|
+
# The title
|
119
|
+
# This is the title of your diary.
|
120
|
+
# This must not have the HTML tag.
|
121
|
+
@html_title = 'foobar diary'
|
122
|
+
|
123
|
+
# Diary header
|
124
|
+
# You specify sentences which are embedded at the beginning
|
125
|
+
# of your diary. Please change sentences enclosed by "HEADER".
|
126
|
+
# Because this value is embedded as it is, you can use HTML tag. You
|
127
|
+
# can also use eRuby tag. You feel inconvenient if "%calendar" and "%navi"
|
128
|
+
# are not in the diary header.
|
129
|
+
#
|
130
|
+
# <%=calendar%>
|
131
|
+
# This is replaced with a calendar. This calendar has the links to
|
132
|
+
# other monthly page.
|
133
|
+
# <%=navi%>
|
134
|
+
# This is replaced with menus through which you can update your diary,
|
135
|
+
# do setting and so on.
|
136
|
+
#
|
137
|
+
@header = <<HEADER
|
138
|
+
<%= navi %>
|
139
|
+
<h1>Foo's diary</h1>
|
140
|
+
<%=calendar%>
|
141
|
+
HEADER
|
142
|
+
|
143
|
+
# Diary footer
|
144
|
+
# Like the diary header, you can set @footer to sentences which
|
145
|
+
# are inserted into the end of your diary page.
|
146
|
+
# Please change sentences enclosed by "FOOTER".
|
147
|
+
@footer = <<FOOTER
|
148
|
+
<%= navi %>
|
149
|
+
<p>If you want to delete this message, you move to "preferences" page and
|
150
|
+
edit the footer.</p>
|
151
|
+
|
152
|
+
<p style="font-size: x-large;">
|
153
|
+
It is better to read
|
154
|
+
<a href="doc/README.en.html">README</a>
|
155
|
+
and
|
156
|
+
<a href="doc/HOWTO-write-tDiary.en.html">How to write diary</a>
|
157
|
+
before you write diary.
|
158
|
+
</p>
|
159
|
+
FOOTER
|
160
|
+
|
161
|
+
# The format of date
|
162
|
+
# You can set @date_format to the format of date. The default value
|
163
|
+
# is "YYYY-MM-DD". You can use all the parameters of Ruby's Time::strftime.
|
164
|
+
# The words which are often used are "%Y"(dominical year), "%m"(month),
|
165
|
+
# "%b"(abbreviated month name), "%B"(full month name), "%d"(day),
|
166
|
+
# "%a"(abbreviated weekday name) and "%A"(full weekday name).
|
167
|
+
@date_format = '%Y-%m-%d'
|
168
|
+
|
169
|
+
# The anchor of the section and TSUKKOMI
|
170
|
+
# You specify words which are used as the section anchor(@section_anchor)
|
171
|
+
# and the TSUKKOMI anchor(@comment_anchor).
|
172
|
+
# These are enclosed by <a href="...">...</a> in your diary page.
|
173
|
+
# If you use span tag whose attribute is sanchor(section anchor) or canchor
|
174
|
+
# (TSUKKOMI anchor), the image is shown at the anchor in some themes.
|
175
|
+
@section_anchor = '<span class="sanchor">_</span>'
|
176
|
+
@comment_anchor = '<span class="canchor">_</span>'
|
177
|
+
|
178
|
+
# How many daily diaries do "Latest" page have?
|
179
|
+
# You decide how many daily diaries are shown in "Latest" page.
|
180
|
+
# If the number of the diaries doesn't attain the specified number,
|
181
|
+
# diaries in the previous month are also shown.
|
182
|
+
@latest_limit = 10
|
183
|
+
|
184
|
+
# Theme(theme name or URL of the CSS)
|
185
|
+
# You specify a theme or URL of the CSS. This determines
|
186
|
+
# the style of your diary. @theme has the default cascading
|
187
|
+
# style sheet. You can change this value and the look of your diary.
|
188
|
+
# In the theme directory, there are some themes. If you are interested in
|
189
|
+
# other themes, you try them by changing this value.
|
190
|
+
#
|
191
|
+
# Of course, you can write your own CSS file. In that case,
|
192
|
+
# you set @theme to "" and @css to the URL of your CSS file.
|
193
|
+
@theme = 'default'
|
194
|
+
@css = ''
|
195
|
+
|
196
|
+
# Show TSUKKOMI(true or false)
|
197
|
+
# You can decide whether today's TSUKKOMI is shown or not.
|
198
|
+
# If you set @show_comment to false, you can hide the TSUKKOMIs and
|
199
|
+
# readers of your diary can't read them. The diary author can
|
200
|
+
# read them in the "Update" page if you specify date.
|
201
|
+
@show_comment = true
|
202
|
+
|
203
|
+
# How many TSUKKOMIs are shown in "Latest" page and "Daily" page?
|
204
|
+
# If today's TSUKKOMI is shown, you specify how many TSUKKOMIs are
|
205
|
+
# shown at most in "Latest" page and "Daily" page.
|
206
|
+
@comment_limit = 3
|
207
|
+
|
208
|
+
# TSUKKOMI limit per a day
|
209
|
+
# When numbers of TSUKKOMI over this value in a day, nobody can
|
210
|
+
# make new TSUKKOMI. If you use TrackBack plugin, this value means
|
211
|
+
# sum of TSUKKOMIs and TrackBacks.
|
212
|
+
@comment_limit_per_day = 100
|
213
|
+
|
214
|
+
# Show today's links(true or false)
|
215
|
+
# You can decide whether today's links are shown or not. The link
|
216
|
+
# is the URL from which your diary visitor jump to your diary.
|
217
|
+
# By this, you can find the page which has the link to your diary.
|
218
|
+
# This makes it easy for you to communicate with people through diary.
|
219
|
+
# In default, tDiary shows this information to diary readers. If you
|
220
|
+
# don't want diary readers to know it, you set @show_referer to false.
|
221
|
+
# Even if this value is set to false, the author can know it in "Update" page
|
222
|
+
# if you specify the date.
|
223
|
+
@show_referer = true
|
224
|
+
|
225
|
+
# Time difference adjustment
|
226
|
+
# This item adjusts the date which is automatically inserted into
|
227
|
+
# the page of "update" form. The unit is hour, and you can
|
228
|
+
# use demical number.
|
229
|
+
#
|
230
|
+
# For example, if you want to handle the time until 2 a.m. as the previous day,
|
231
|
+
# you set this to -2. tDiary inserts the date which is older by 2 hours than the actual
|
232
|
+
# time.
|
233
|
+
@hour_offset = 0
|
234
|
+
|
235
|
+
#-----
|
236
|
+
# The items to which you can add values with browser
|
237
|
+
#
|
238
|
+
# Though you can set the standard values here, you can't do so
|
239
|
+
# with browser.
|
240
|
+
#-----
|
241
|
+
|
242
|
+
# URLs which are excluded from today's link (Regular Expression)
|
243
|
+
# You set a list of URLs which are not recorded as today's links to @no_referer
|
244
|
+
# If all the access are recorded, today's links have some noisy URLs.
|
245
|
+
# Because the purpose of today's links is to find URL which is linked to
|
246
|
+
# your diary, these noisy accesses are annoying; a search engine's access,
|
247
|
+
# an access from your website and a website fetcher's access.
|
248
|
+
# They are excluded if you set their URLs to @no_referer.
|
249
|
+
# It is better to add your diary's URL to @no_referer.
|
250
|
+
# The value must be the Array of Ruby and Array's contents are String
|
251
|
+
# of Ruby. Though these Strings are converted to Regular Expression
|
252
|
+
# of Ruby when compared, you can't use Regexp of Ruby.
|
253
|
+
@no_referer = [
|
254
|
+
'^' + Regexp.quote( base_url ), # Your diary
|
255
|
+
'^http://localhost[:/]',
|
256
|
+
'^http://192.168.',
|
257
|
+
'^http://172.1[6789]',
|
258
|
+
'^http://172.2[0-9]',
|
259
|
+
'^http://172.3[01]',
|
260
|
+
'^http://10.',
|
261
|
+
]
|
262
|
+
|
263
|
+
# URLs which are only recorded into Today's Link (Regular Expression)
|
264
|
+
# @only_volatile is an array of URLs to record into only Today's Link.
|
265
|
+
# When a referer match to this list, it will be recoreded to volatile
|
266
|
+
# list. This list will be cleared when you make new text in new day.
|
267
|
+
# Specify @only_volatile same style of @no_referer.
|
268
|
+
@only_volatile = [
|
269
|
+
]
|
270
|
+
|
271
|
+
# The rules which convert the specified URL to the word (Regular Expression)
|
272
|
+
# @referer_table is configured so that readable URLs are shown in
|
273
|
+
# today's links when you read "daily" page. You add an array of
|
274
|
+
# a URL which will be converted to Regexp and a word which tDiary
|
275
|
+
# replaced the URL with to @referer_table. If a part of URL is
|
276
|
+
# enclosed by parentheses, "\1", "\2", ... in the word are replaced with
|
277
|
+
# the enclosed parts of URL.
|
278
|
+
#
|
279
|
+
# By the rules below, tDiary replaces URLs from google with "google...".
|
280
|
+
@referer_table = [
|
281
|
+
['^http://www.google.com/search.*?q=([^&]*).*', 'google(\1)'],
|
282
|
+
|
283
|
+
#
|
284
|
+
# You must add a new rule above here.
|
285
|
+
#
|
286
|
+
# This rule abbreviates URLs which are not converted by the rules
|
287
|
+
# above and have more than 50 characters.
|
288
|
+
#
|
289
|
+
['^(.{50}).*$', '\1...'],
|
290
|
+
]
|
291
|
+
|
292
|
+
# Cross-Site Request Forgery (CSRF) protection settings
|
293
|
+
#
|
294
|
+
# CSRF protection always checks request method and
|
295
|
+
# right referer value.
|
296
|
+
# Additional, you can specify protection method below:
|
297
|
+
# 1: Checking existens right referer value (no using protection key)
|
298
|
+
# 2: Checking protection key (allow null referer)
|
299
|
+
# 3: Checking both 1. and 2.
|
300
|
+
#
|
301
|
+
# If you use browsers don't send referer, set protection key
|
302
|
+
# and set this value to 2. When browsers don't send referer and set this
|
303
|
+
# value 1 or 3, you cannot update diary or change setting of tDiary.
|
304
|
+
#
|
305
|
+
# If you use normal browsers (these will send referer), set this value
|
306
|
+
# to 1 or 3. When you set to 3, you must set protection key.
|
307
|
+
#
|
308
|
+
# And if you set 2 or 3, a few plugins will not work good.
|
309
|
+
#
|
310
|
+
@options['csrf_protection_method'] = 1
|
311
|
+
|
312
|
+
# CSRF protection key
|
313
|
+
# You can set any string. If this key will be stolen, your diary will be
|
314
|
+
# attacked by CSRF.
|
315
|
+
# When csrf_protection_method is 1, this key is not used.
|
316
|
+
# When csrf_protection_method is 2 or 3 and key is null, you cannot change
|
317
|
+
# setting of tDiary.
|
318
|
+
@options['csrf_protection_key'] = ''
|
319
|
+
|
320
|
+
# Regexp of right referer checking
|
321
|
+
# tDiary add a URL of @update automatically. But if you want to use
|
322
|
+
# other URL (ex. your own portal site), specify this value.
|
323
|
+
# When this value has nil or null string, it has no match.
|
324
|
+
@options['csrf_protection_allowed_referer_regexp_for_update'] = ''
|
325
|
+
|
326
|
+
#----
|
327
|
+
# CGI configuration file(must)
|
328
|
+
# If you enforce security, you set @secure to true. This
|
329
|
+
# restricts dangerous operation, for example, variables and file loading.
|
330
|
+
#----
|
331
|
+
@secure = false
|
332
|
+
load_cgi_conf
|
333
|
+
|