ptomato-ramaze 2009.02
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.
- data/README.md +481 -0
- data/Rakefile +248 -0
- data/benchmark/results.txt +131 -0
- data/benchmark/run.rb +362 -0
- data/benchmark/suite/minimal.rb +13 -0
- data/benchmark/suite/no_informer.rb +9 -0
- data/benchmark/suite/no_sessions.rb +10 -0
- data/benchmark/suite/no_template.rb +9 -0
- data/benchmark/suite/simple.rb +7 -0
- data/benchmark/suite/template_amrita2.rb +17 -0
- data/benchmark/suite/template_builder.rb +12 -0
- data/benchmark/suite/template_erubis.rb +10 -0
- data/benchmark/suite/template_ezamar.rb +10 -0
- data/benchmark/suite/template_haml.rb +15 -0
- data/benchmark/suite/template_liquid.rb +13 -0
- data/benchmark/suite/template_markaby.rb +11 -0
- data/benchmark/suite/template_nagoro.rb +10 -0
- data/benchmark/suite/template_redcloth.rb +15 -0
- data/benchmark/suite/template_tenjin.rb +10 -0
- data/benchmark/test.rb +35 -0
- data/bin/ramaze +80 -0
- data/doc/AUTHORS +29 -0
- data/doc/CHANGELOG +19530 -0
- data/doc/COPYING +56 -0
- data/doc/FAQ +92 -0
- data/doc/GPL +339 -0
- data/doc/INSTALL +92 -0
- data/doc/LEGAL +26 -0
- data/doc/TODO +29 -0
- data/doc/meta/announcement.txt +99 -0
- data/doc/meta/configuration.txt +163 -0
- data/doc/meta/internals.txt +278 -0
- data/doc/meta/users.kml +64 -0
- data/doc/readme_chunks/appendix.txt +10 -0
- data/doc/readme_chunks/examples.txt +38 -0
- data/doc/readme_chunks/features.txt +148 -0
- data/doc/readme_chunks/getting_help.txt +5 -0
- data/doc/readme_chunks/getting_started.txt +18 -0
- data/doc/readme_chunks/installing.txt +92 -0
- data/doc/readme_chunks/introduction.txt +18 -0
- data/doc/readme_chunks/principles.txt +56 -0
- data/doc/readme_chunks/thanks.txt +59 -0
- data/doc/tutorial/todolist.html +742 -0
- data/doc/tutorial/todolist.mkd +787 -0
- data/examples/app/auth/auth.rb +54 -0
- data/examples/app/auth/template/layout.haml +20 -0
- data/examples/app/auth/template/login.haml +16 -0
- data/examples/app/blog/README +3 -0
- data/examples/app/blog/controller/main.rb +29 -0
- data/examples/app/blog/model/entry.rb +30 -0
- data/examples/app/blog/public/styles/blog.css +132 -0
- data/examples/app/blog/spec/blog.rb +87 -0
- data/examples/app/blog/start.rb +7 -0
- data/examples/app/blog/view/edit.xhtml +17 -0
- data/examples/app/blog/view/index.xhtml +17 -0
- data/examples/app/blog/view/layout.xhtml +11 -0
- data/examples/app/blog/view/new.xhtml +16 -0
- data/examples/app/chat/model/history.rb +36 -0
- data/examples/app/chat/model/message.rb +7 -0
- data/examples/app/chat/public/css/chat.css +13 -0
- data/examples/app/chat/public/js/chat.js +22 -0
- data/examples/app/chat/public/js/jquery.js +3436 -0
- data/examples/app/chat/start.rb +40 -0
- data/examples/app/chat/view/chat.xhtml +9 -0
- data/examples/app/chat/view/index.xhtml +7 -0
- data/examples/app/chat/view/layout.xhtml +13 -0
- data/examples/app/localization/start.rb +35 -0
- data/examples/app/rapaste/Rakefile +34 -0
- data/examples/app/rapaste/controller/paste.rb +101 -0
- data/examples/app/rapaste/model/paste.rb +58 -0
- data/examples/app/rapaste/public/css/active4d.css +114 -0
- data/examples/app/rapaste/public/css/all_hallows_eve.css +72 -0
- data/examples/app/rapaste/public/css/amy.css +147 -0
- data/examples/app/rapaste/public/css/blackboard.css +88 -0
- data/examples/app/rapaste/public/css/brilliance_black.css +605 -0
- data/examples/app/rapaste/public/css/brilliance_dull.css +599 -0
- data/examples/app/rapaste/public/css/cobalt.css +149 -0
- data/examples/app/rapaste/public/css/dawn.css +121 -0
- data/examples/app/rapaste/public/css/display.css +197 -0
- data/examples/app/rapaste/public/css/eiffel.css +121 -0
- data/examples/app/rapaste/public/css/espresso_libre.css +109 -0
- data/examples/app/rapaste/public/css/idle.css +62 -0
- data/examples/app/rapaste/public/css/iplastic.css +80 -0
- data/examples/app/rapaste/public/css/lazy.css +73 -0
- data/examples/app/rapaste/public/css/mac_classic.css +123 -0
- data/examples/app/rapaste/public/css/magicwb_amiga.css +104 -0
- data/examples/app/rapaste/public/css/pastels_on_dark.css +188 -0
- data/examples/app/rapaste/public/css/slush_poppies.css +85 -0
- data/examples/app/rapaste/public/css/spacecadet.css +51 -0
- data/examples/app/rapaste/public/css/sunburst.css +180 -0
- data/examples/app/rapaste/public/css/twilight.css +137 -0
- data/examples/app/rapaste/public/css/zenburnesque.css +91 -0
- data/examples/app/rapaste/public/js/jquery.js +11 -0
- data/examples/app/rapaste/spec/rapaste.rb +51 -0
- data/examples/app/rapaste/start.rb +25 -0
- data/examples/app/rapaste/view/copy.xhtml +10 -0
- data/examples/app/rapaste/view/index.xhtml +9 -0
- data/examples/app/rapaste/view/layout.xhtml +25 -0
- data/examples/app/rapaste/view/list.xhtml +29 -0
- data/examples/app/rapaste/view/search.xhtml +41 -0
- data/examples/app/rapaste/view/view.xhtml +40 -0
- data/examples/app/sourceview/public/coderay.css +104 -0
- data/examples/app/sourceview/public/images/file.gif +0 -0
- data/examples/app/sourceview/public/images/folder.gif +0 -0
- data/examples/app/sourceview/public/images/tv-collapsable-last.gif +0 -0
- data/examples/app/sourceview/public/images/tv-collapsable.gif +0 -0
- data/examples/app/sourceview/public/images/tv-expandable-last.gif +0 -0
- data/examples/app/sourceview/public/images/tv-expandable.gif +0 -0
- data/examples/app/sourceview/public/images/tv-item-last.gif +0 -0
- data/examples/app/sourceview/public/images/tv-item.gif +0 -0
- data/examples/app/sourceview/public/jquery.js +11 -0
- data/examples/app/sourceview/public/jquery.treeview.css +48 -0
- data/examples/app/sourceview/public/jquery.treeview.js +223 -0
- data/examples/app/sourceview/public/sourceview.js +52 -0
- data/examples/app/sourceview/sourceview.rb +77 -0
- data/examples/app/sourceview/template/index.haml +59 -0
- data/examples/app/todolist/README +1 -0
- data/examples/app/todolist/public/favicon.ico +0 -0
- data/examples/app/todolist/public/js/jquery.js +1923 -0
- data/examples/app/todolist/public/ramaze.png +0 -0
- data/examples/app/todolist/spec/todolist.rb +132 -0
- data/examples/app/todolist/src/controller/main.rb +70 -0
- data/examples/app/todolist/src/element/page.rb +31 -0
- data/examples/app/todolist/src/model.rb +14 -0
- data/examples/app/todolist/start.rb +11 -0
- data/examples/app/todolist/template/index.xhtml +17 -0
- data/examples/app/todolist/template/new.xhtml +7 -0
- data/examples/app/upload/start.rb +19 -0
- data/examples/app/upload/view/index.xhtml +25 -0
- data/examples/app/whywiki/spec/whywiki.rb +58 -0
- data/examples/app/whywiki/start.rb +46 -0
- data/examples/app/whywiki/template/edit.xhtml +14 -0
- data/examples/app/whywiki/template/show.xhtml +18 -0
- data/examples/app/wikore/spec/wikore.rb +111 -0
- data/examples/app/wikore/src/controller.rb +80 -0
- data/examples/app/wikore/src/model.rb +53 -0
- data/examples/app/wikore/start.rb +9 -0
- data/examples/app/wikore/template/index.xhtml +8 -0
- data/examples/app/wiktacular/README +2 -0
- data/examples/app/wiktacular/mkd/link/2007-07-20_19-45-51.mkd +1 -0
- data/examples/app/wiktacular/mkd/link/current.mkd +1 -0
- data/examples/app/wiktacular/mkd/main/2007-07-20_16-31-33.mkd +1 -0
- data/examples/app/wiktacular/mkd/main/2007-07-20_19-21-12.mkd +1 -0
- data/examples/app/wiktacular/mkd/main/2007-07-20_19-23-10.mkd +2 -0
- data/examples/app/wiktacular/mkd/main/2007-07-20_19-45-07.mkd +2 -0
- data/examples/app/wiktacular/mkd/main/current.mkd +2 -0
- data/examples/app/wiktacular/mkd/markdown/current.mkd +3 -0
- data/examples/app/wiktacular/mkd/testing/2007-07-20_16-43-46.mkd +2 -0
- data/examples/app/wiktacular/mkd/testing/2007-07-20_19-43-50.mkd +3 -0
- data/examples/app/wiktacular/mkd/testing/2007-07-21_18-46-01.mkd +11 -0
- data/examples/app/wiktacular/mkd/testing/2007-07-21_18-46-32.mkd +13 -0
- data/examples/app/wiktacular/mkd/testing/2007-07-21_18-47-08.mkd +17 -0
- data/examples/app/wiktacular/mkd/testing/2007-07-21_18-47-54.mkd +17 -0
- data/examples/app/wiktacular/mkd/testing/current.mkd +17 -0
- data/examples/app/wiktacular/public/favicon.ico +0 -0
- data/examples/app/wiktacular/public/screen.css +72 -0
- data/examples/app/wiktacular/spec/wiktacular.rb +157 -0
- data/examples/app/wiktacular/src/controller.rb +55 -0
- data/examples/app/wiktacular/src/model.rb +102 -0
- data/examples/app/wiktacular/start.rb +8 -0
- data/examples/app/wiktacular/template/edit.xhtml +6 -0
- data/examples/app/wiktacular/template/html_layout.xhtml +27 -0
- data/examples/app/wiktacular/template/index.xhtml +9 -0
- data/examples/app/wiktacular/template/new.xhtml +6 -0
- data/examples/basic/element.rb +45 -0
- data/examples/basic/gestalt.rb +27 -0
- data/examples/basic/hello.rb +15 -0
- data/examples/basic/layout.rb +28 -0
- data/examples/basic/linking.rb +29 -0
- data/examples/basic/partial.rb +28 -0
- data/examples/basic/simple.rb +56 -0
- data/examples/helpers/cache.rb +31 -0
- data/examples/helpers/form_with_sequel.rb +24 -0
- data/examples/helpers/httpdigest.rb +108 -0
- data/examples/helpers/identity.rb +18 -0
- data/examples/helpers/nitro_form.rb +23 -0
- data/examples/helpers/paginate.rb +71 -0
- data/examples/helpers/provide.rb +23 -0
- data/examples/helpers/rest.rb +28 -0
- data/examples/helpers/simple_captcha.rb +29 -0
- data/examples/misc/css.rb +37 -0
- data/examples/misc/facebook.rb +159 -0
- data/examples/misc/memleak_detector.rb +32 -0
- data/examples/misc/nagoro_element.rb +43 -0
- data/examples/misc/ramaise.rb +132 -0
- data/examples/misc/rapp.rb +45 -0
- data/examples/misc/sequel_scaffolding.rb +34 -0
- data/examples/misc/simple_auth.rb +35 -0
- data/examples/templates/template/external.amrita +19 -0
- data/examples/templates/template/external.haml +22 -0
- data/examples/templates/template/external.liquid +28 -0
- data/examples/templates/template/external.mab +30 -0
- data/examples/templates/template/external.nag +28 -0
- data/examples/templates/template/external.redcloth +19 -0
- data/examples/templates/template/external.rem +30 -0
- data/examples/templates/template/external.rhtml +28 -0
- data/examples/templates/template/external.tenjin +28 -0
- data/examples/templates/template/external.xsl +57 -0
- data/examples/templates/template/external.zmr +28 -0
- data/examples/templates/template_amrita2.rb +74 -0
- data/examples/templates/template_erubis.rb +53 -0
- data/examples/templates/template_ezamar.rb +50 -0
- data/examples/templates/template_haml.rb +50 -0
- data/examples/templates/template_liquid.rb +65 -0
- data/examples/templates/template_markaby.rb +58 -0
- data/examples/templates/template_nagoro.rb +51 -0
- data/examples/templates/template_redcloth.rb +59 -0
- data/examples/templates/template_remarkably.rb +55 -0
- data/examples/templates/template_tenjin.rb +53 -0
- data/examples/templates/template_xslt.rb +49 -0
- data/lib/proto/controller/init.rb +11 -0
- data/lib/proto/controller/main.rb +20 -0
- data/lib/proto/model/init.rb +4 -0
- data/lib/proto/public/.htaccess +24 -0
- data/lib/proto/public/css/ramaze_error.css +90 -0
- data/lib/proto/public/dispatch.fcgi +11 -0
- data/lib/proto/public/favicon.ico +0 -0
- data/lib/proto/public/js/jquery.js +3549 -0
- data/lib/proto/public/ramaze.png +0 -0
- data/lib/proto/spec/main.rb +25 -0
- data/lib/proto/start.rb +12 -0
- data/lib/proto/start.ru +16 -0
- data/lib/proto/view/error.xhtml +64 -0
- data/lib/proto/view/index.xhtml +34 -0
- data/lib/proto/view/page.xhtml +27 -0
- data/lib/ramaze/action/render.rb +192 -0
- data/lib/ramaze/action.rb +159 -0
- data/lib/ramaze/adapter/base.rb +128 -0
- data/lib/ramaze/adapter/cgi.rb +20 -0
- data/lib/ramaze/adapter/ebb.rb +18 -0
- data/lib/ramaze/adapter/evented_mongrel.rb +7 -0
- data/lib/ramaze/adapter/fake.rb +12 -0
- data/lib/ramaze/adapter/fcgi.rb +18 -0
- data/lib/ramaze/adapter/lsws.rb +19 -0
- data/lib/ramaze/adapter/mongrel.rb +21 -0
- data/lib/ramaze/adapter/scgi.rb +18 -0
- data/lib/ramaze/adapter/swiftiplied_mongrel.rb +7 -0
- data/lib/ramaze/adapter/thin.rb +17 -0
- data/lib/ramaze/adapter/webrick.rb +43 -0
- data/lib/ramaze/adapter.rb +97 -0
- data/lib/ramaze/cache/file.rb +71 -0
- data/lib/ramaze/cache/memcached.rb +69 -0
- data/lib/ramaze/cache/memory.rb +6 -0
- data/lib/ramaze/cache/yaml_store.rb +68 -0
- data/lib/ramaze/cache.rb +114 -0
- data/lib/ramaze/contrib/email.rb +86 -0
- data/lib/ramaze/contrib/facebook/facebook.rb +171 -0
- data/lib/ramaze/contrib/facebook.rb +23 -0
- data/lib/ramaze/contrib/file_cache.rb +3 -0
- data/lib/ramaze/contrib/gems.rb +78 -0
- data/lib/ramaze/contrib/gettext/mo.rb +155 -0
- data/lib/ramaze/contrib/gettext/parser.rb +46 -0
- data/lib/ramaze/contrib/gettext/po.rb +109 -0
- data/lib/ramaze/contrib/gettext.rb +113 -0
- data/lib/ramaze/contrib/gzip_filter.rb +69 -0
- data/lib/ramaze/contrib/maruku_uv.rb +59 -0
- data/lib/ramaze/contrib/profiling.rb +36 -0
- data/lib/ramaze/contrib/rest.rb +17 -0
- data/lib/ramaze/contrib/sequel/create_join.rb +25 -0
- data/lib/ramaze/contrib/sequel/fill.rb +12 -0
- data/lib/ramaze/contrib/sequel/form_field.rb +129 -0
- data/lib/ramaze/contrib/sequel/image.rb +198 -0
- data/lib/ramaze/contrib/sequel/relation.rb +82 -0
- data/lib/ramaze/contrib/sequel_cache.rb +92 -0
- data/lib/ramaze/contrib.rb +82 -0
- data/lib/ramaze/controller/error.rb +46 -0
- data/lib/ramaze/controller/main.rb +2 -0
- data/lib/ramaze/controller/resolve.rb +278 -0
- data/lib/ramaze/controller.rb +288 -0
- data/lib/ramaze/current/request.rb +231 -0
- data/lib/ramaze/current/response.rb +37 -0
- data/lib/ramaze/current/session/flash.rb +88 -0
- data/lib/ramaze/current/session/hash.rb +62 -0
- data/lib/ramaze/current/session.rb +179 -0
- data/lib/ramaze/current.rb +51 -0
- data/lib/ramaze/dispatcher/action.rb +50 -0
- data/lib/ramaze/dispatcher/directory.rb +119 -0
- data/lib/ramaze/dispatcher/error.rb +108 -0
- data/lib/ramaze/dispatcher/file.rb +100 -0
- data/lib/ramaze/dispatcher.rb +145 -0
- data/lib/ramaze/error.rb +24 -0
- data/lib/ramaze/gestalt.rb +124 -0
- data/lib/ramaze/helper/aspect.rb +106 -0
- data/lib/ramaze/helper/auth.rb +125 -0
- data/lib/ramaze/helper/bench.rb +43 -0
- data/lib/ramaze/helper/cache.rb +140 -0
- data/lib/ramaze/helper/cgi.rb +39 -0
- data/lib/ramaze/helper/flash.rb +74 -0
- data/lib/ramaze/helper/form.rb +284 -0
- data/lib/ramaze/helper/formatting.rb +162 -0
- data/lib/ramaze/helper/gestalt.rb +15 -0
- data/lib/ramaze/helper/gravatar.rb +32 -0
- data/lib/ramaze/helper/httpdigest.rb +88 -0
- data/lib/ramaze/helper/identity.rb +119 -0
- data/lib/ramaze/helper/link.rb +122 -0
- data/lib/ramaze/helper/markaby.rb +31 -0
- data/lib/ramaze/helper/maruku.rb +9 -0
- data/lib/ramaze/helper/nitroform.rb +14 -0
- data/lib/ramaze/helper/pager.rb +366 -0
- data/lib/ramaze/helper/paginate.rb +233 -0
- data/lib/ramaze/helper/partial.rb +105 -0
- data/lib/ramaze/helper/redirect.rb +100 -0
- data/lib/ramaze/helper/rest.rb +43 -0
- data/lib/ramaze/helper/sendfile.rb +16 -0
- data/lib/ramaze/helper/sequel.rb +55 -0
- data/lib/ramaze/helper/simple_captcha.rb +31 -0
- data/lib/ramaze/helper/stack.rb +77 -0
- data/lib/ramaze/helper/tagz.rb +19 -0
- data/lib/ramaze/helper/thread.rb +17 -0
- data/lib/ramaze/helper/ultraviolet.rb +44 -0
- data/lib/ramaze/helper/user.rb +110 -0
- data/lib/ramaze/helper/xhtml.rb +23 -0
- data/lib/ramaze/helper.rb +87 -0
- data/lib/ramaze/log/analogger.rb +40 -0
- data/lib/ramaze/log/growl.rb +38 -0
- data/lib/ramaze/log/hub.rb +41 -0
- data/lib/ramaze/log/informer.rb +128 -0
- data/lib/ramaze/log/knotify.rb +28 -0
- data/lib/ramaze/log/logger.rb +26 -0
- data/lib/ramaze/log/logging.rb +89 -0
- data/lib/ramaze/log/rotatinginformer.rb +168 -0
- data/lib/ramaze/log/syslog.rb +51 -0
- data/lib/ramaze/log/xosd.rb +92 -0
- data/lib/ramaze/log.rb +27 -0
- data/lib/ramaze/option/dsl.rb +45 -0
- data/lib/ramaze/option/holder.rb +131 -0
- data/lib/ramaze/option/merger.rb +108 -0
- data/lib/ramaze/option.rb +156 -0
- data/lib/ramaze/reloader/watch_inotify.rb +85 -0
- data/lib/ramaze/reloader/watch_stat.rb +58 -0
- data/lib/ramaze/reloader.rb +170 -0
- data/lib/ramaze/route.rb +97 -0
- data/lib/ramaze/setup.rb +50 -0
- data/lib/ramaze/snippets/array/put_within.rb +44 -0
- data/lib/ramaze/snippets/binding/locals.rb +25 -0
- data/lib/ramaze/snippets/blankslate.rb +7 -0
- data/lib/ramaze/snippets/dictionary.rb +504 -0
- data/lib/ramaze/snippets/divide.rb +22 -0
- data/lib/ramaze/snippets/fiber.rb +63 -0
- data/lib/ramaze/snippets/kernel/constant.rb +41 -0
- data/lib/ramaze/snippets/kernel/pretty_inspect.rb +21 -0
- data/lib/ramaze/snippets/metaid.rb +17 -0
- data/lib/ramaze/snippets/numeric/filesize_format.rb +32 -0
- data/lib/ramaze/snippets/numeric/time.rb +63 -0
- data/lib/ramaze/snippets/object/__dir__.rb +29 -0
- data/lib/ramaze/snippets/object/acquire.rb +37 -0
- data/lib/ramaze/snippets/object/instance_variable_defined.rb +19 -0
- data/lib/ramaze/snippets/object/pretty.rb +16 -0
- data/lib/ramaze/snippets/object/scope.rb +18 -0
- data/lib/ramaze/snippets/object/traits.rb +76 -0
- data/lib/ramaze/snippets/ordered_set.rb +51 -0
- data/lib/ramaze/snippets/proc/locals.rb +19 -0
- data/lib/ramaze/snippets/ramaze/acquire.rb +31 -0
- data/lib/ramaze/snippets/ramaze/caller_info.rb +30 -0
- data/lib/ramaze/snippets/ramaze/caller_lines.rb +51 -0
- data/lib/ramaze/snippets/ramaze/deprecated.rb +21 -0
- data/lib/ramaze/snippets/ramaze/fiber.rb +24 -0
- data/lib/ramaze/snippets/ramaze/state.rb +86 -0
- data/lib/ramaze/snippets/ramaze/struct.rb +45 -0
- data/lib/ramaze/snippets/string/camel_case.rb +21 -0
- data/lib/ramaze/snippets/string/color.rb +31 -0
- data/lib/ramaze/snippets/string/each.rb +19 -0
- data/lib/ramaze/snippets/string/end_with.rb +20 -0
- data/lib/ramaze/snippets/string/esc.rb +34 -0
- data/lib/ramaze/snippets/string/ord.rb +21 -0
- data/lib/ramaze/snippets/string/snake_case.rb +21 -0
- data/lib/ramaze/snippets/string/start_with.rb +19 -0
- data/lib/ramaze/snippets/string/unindent.rb +28 -0
- data/lib/ramaze/snippets/thread/into.rb +18 -0
- data/lib/ramaze/snippets.rb +22 -0
- data/lib/ramaze/spec/helper/bacon.rb +7 -0
- data/lib/ramaze/spec/helper/browser.rb +88 -0
- data/lib/ramaze/spec/helper/mock_http.rb +64 -0
- data/lib/ramaze/spec/helper/pretty_output.rb +82 -0
- data/lib/ramaze/spec/helper/requester.rb +63 -0
- data/lib/ramaze/spec/helper/simple_http.rb +434 -0
- data/lib/ramaze/spec/helper/snippets.rb +14 -0
- data/lib/ramaze/spec/helper.rb +135 -0
- data/lib/ramaze/spec.rb +1 -0
- data/lib/ramaze/store/default.rb +109 -0
- data/lib/ramaze/template/amrita2.rb +49 -0
- data/lib/ramaze/template/builder.rb +28 -0
- data/lib/ramaze/template/erubis.rb +41 -0
- data/lib/ramaze/template/ezamar/element.rb +169 -0
- data/lib/ramaze/template/ezamar/engine.rb +76 -0
- data/lib/ramaze/template/ezamar/morpher.rb +135 -0
- data/lib/ramaze/template/ezamar/render_partial.rb +39 -0
- data/lib/ramaze/template/ezamar/textpow.syntax +34 -0
- data/lib/ramaze/template/ezamar.rb +42 -0
- data/lib/ramaze/template/haml.rb +37 -0
- data/lib/ramaze/template/liquid.rb +36 -0
- data/lib/ramaze/template/markaby.rb +52 -0
- data/lib/ramaze/template/maruku.rb +34 -0
- data/lib/ramaze/template/nagoro.rb +52 -0
- data/lib/ramaze/template/none.rb +14 -0
- data/lib/ramaze/template/redcloth.rb +25 -0
- data/lib/ramaze/template/remarkably.rb +38 -0
- data/lib/ramaze/template/sass.rb +38 -0
- data/lib/ramaze/template/tagz.rb +79 -0
- data/lib/ramaze/template/tenjin.rb +74 -0
- data/lib/ramaze/template/xslt.rb +100 -0
- data/lib/ramaze/template.rb +87 -0
- data/lib/ramaze/tool/create.rb +48 -0
- data/lib/ramaze/tool/daemonize.rb +37 -0
- data/lib/ramaze/tool/localize.rb +202 -0
- data/lib/ramaze/tool/mime.rb +35 -0
- data/lib/ramaze/tool/mime_types.yaml +615 -0
- data/lib/ramaze/tool/project_creator.rb +111 -0
- data/lib/ramaze/tool/record.rb +6 -0
- data/lib/ramaze/tool.rb +9 -0
- data/lib/ramaze/trinity.rb +16 -0
- data/lib/ramaze/version.rb +6 -0
- data/lib/ramaze.rb +139 -0
- data/lib/vendor/bacon.rb +323 -0
- data/rake_tasks/conf.rake +71 -0
- data/rake_tasks/coverage.rake +45 -0
- data/rake_tasks/gem.rake +74 -0
- data/rake_tasks/git.rake +41 -0
- data/rake_tasks/maintenance.rake +386 -0
- data/rake_tasks/metric.rake +24 -0
- data/rake_tasks/release.rake +76 -0
- data/rake_tasks/spec.rake +61 -0
- data/ramaze.gemspec +611 -0
- data/spec/contrib/profiling.rb +29 -0
- data/spec/contrib/sequel/fill.rb +47 -0
- data/spec/examples/caching.rb +19 -0
- data/spec/examples/css.rb +15 -0
- data/spec/examples/element.rb +15 -0
- data/spec/examples/hello.rb +11 -0
- data/spec/examples/linking.rb +18 -0
- data/spec/examples/simple.rb +45 -0
- data/spec/examples/simple_auth.rb +32 -0
- data/spec/examples/templates/template_amrita2.rb +16 -0
- data/spec/examples/templates/template_erubis.rb +23 -0
- data/spec/examples/templates/template_ezamar.rb +23 -0
- data/spec/examples/templates/template_haml.rb +23 -0
- data/spec/examples/templates/template_liquid.rb +29 -0
- data/spec/examples/templates/template_markaby.rb +23 -0
- data/spec/examples/templates/template_redcloth.rb +28 -0
- data/spec/examples/templates/template_remarkably.rb +23 -0
- data/spec/examples/templates/template_tenjin.rb +28 -0
- data/spec/helper.rb +3 -0
- data/spec/ramaze/action/basics.rb +36 -0
- data/spec/ramaze/action/cache.rb +87 -0
- data/spec/ramaze/action/file_cache.rb +70 -0
- data/spec/ramaze/action/layout.rb +190 -0
- data/spec/ramaze/action/render.rb +31 -0
- data/spec/ramaze/action/view/bar.xhtml +1 -0
- data/spec/ramaze/action/view/instancevars/layout.xhtml +1 -0
- data/spec/ramaze/action/view/other_wrapper.xhtml +1 -0
- data/spec/ramaze/action/view/single_wrapper.xhtml +1 -0
- data/spec/ramaze/action/view/sub/sub_wrapper.xhtml +1 -0
- data/spec/ramaze/adapter/ebb.rb +12 -0
- data/spec/ramaze/adapter/mongrel.rb +12 -0
- data/spec/ramaze/adapter/record.rb +31 -0
- data/spec/ramaze/adapter/webrick.rb +12 -0
- data/spec/ramaze/adapter.rb +49 -0
- data/spec/ramaze/cache.rb +140 -0
- data/spec/ramaze/controller/actionless_templates.rb +32 -0
- data/spec/ramaze/controller/resolve.rb +32 -0
- data/spec/ramaze/controller/subclass.rb +36 -0
- data/spec/ramaze/controller/template_resolving.rb +113 -0
- data/spec/ramaze/controller/view/bar.xhtml +1 -0
- data/spec/ramaze/controller/view/base/another.xhtml +1 -0
- data/spec/ramaze/controller/view/greet.xhtml +1 -0
- data/spec/ramaze/controller/view/list.xhtml +1 -0
- data/spec/ramaze/controller/view/other/greet/other.xhtml +1 -0
- data/spec/ramaze/controller/view/other_wrapper.xhtml +1 -0
- data/spec/ramaze/controller.rb +180 -0
- data/spec/ramaze/current/request.rb +30 -0
- data/spec/ramaze/current/session.rb +97 -0
- data/spec/ramaze/dispatcher/directory.rb +55 -0
- data/spec/ramaze/dispatcher/file.rb +60 -0
- data/spec/ramaze/dispatcher/public/favicon.ico +0 -0
- data/spec/ramaze/dispatcher/public/file name.txt +1 -0
- data/spec/ramaze/dispatcher/public/test_download.css +141 -0
- data/spec/ramaze/dispatcher.rb +31 -0
- data/spec/ramaze/element.rb +107 -0
- data/spec/ramaze/error.rb +94 -0
- data/spec/ramaze/gestalt.rb +131 -0
- data/spec/ramaze/helper/aspect.rb +101 -0
- data/spec/ramaze/helper/auth.rb +66 -0
- data/spec/ramaze/helper/cache.rb +160 -0
- data/spec/ramaze/helper/cgi.rb +43 -0
- data/spec/ramaze/helper/file.rb +18 -0
- data/spec/ramaze/helper/flash.rb +133 -0
- data/spec/ramaze/helper/form.rb +118 -0
- data/spec/ramaze/helper/formatting.rb +54 -0
- data/spec/ramaze/helper/link.rb +124 -0
- data/spec/ramaze/helper/pager.rb +99 -0
- data/spec/ramaze/helper/partial.rb +88 -0
- data/spec/ramaze/helper/redirect.rb +112 -0
- data/spec/ramaze/helper/simple_captcha.rb +22 -0
- data/spec/ramaze/helper/stack.rb +73 -0
- data/spec/ramaze/helper/user.rb +43 -0
- data/spec/ramaze/helper/view/locals.xhtml +1 -0
- data/spec/ramaze/helper/view/loop.xhtml +4 -0
- data/spec/ramaze/helper/view/num.xhtml +1 -0
- data/spec/ramaze/helper/view/partial.xhtml +1 -0
- data/spec/ramaze/helper/view/recursive.xhtml +8 -0
- data/spec/ramaze/helper/view/recursive_local_ivars.xhtml +7 -0
- data/spec/ramaze/helper/view/recursive_locals.xhtml +7 -0
- data/spec/ramaze/helper/view/test_template.xhtml +1 -0
- data/spec/ramaze/localize.rb +89 -0
- data/spec/ramaze/log/informer.rb +72 -0
- data/spec/ramaze/log/syslog.rb +76 -0
- data/spec/ramaze/morpher.rb +111 -0
- data/spec/ramaze/params.rb +157 -0
- data/spec/ramaze/public/error404.xhtml +1 -0
- data/spec/ramaze/public/favicon.ico +0 -0
- data/spec/ramaze/public/ramaze.png +0 -0
- data/spec/ramaze/public/test_download.css +141 -0
- data/spec/ramaze/request/ebb.rb +9 -0
- data/spec/ramaze/request/mongrel.rb +9 -0
- data/spec/ramaze/request/thin.rb +9 -0
- data/spec/ramaze/request/webrick.rb +5 -0
- data/spec/ramaze/request.rb +185 -0
- data/spec/ramaze/rewrite/file.css +1 -0
- data/spec/ramaze/rewrite.rb +36 -0
- data/spec/ramaze/route.rb +131 -0
- data/spec/ramaze/session.rb +94 -0
- data/spec/ramaze/store/default.rb +71 -0
- data/spec/ramaze/struct.rb +47 -0
- data/spec/ramaze/template/amrita2/external.amrita +6 -0
- data/spec/ramaze/template/amrita2/sum.amrita +1 -0
- data/spec/ramaze/template/amrita2.rb +50 -0
- data/spec/ramaze/template/builder/external.rxml +3 -0
- data/spec/ramaze/template/builder.rb +51 -0
- data/spec/ramaze/template/erubis/sum.rhtml +1 -0
- data/spec/ramaze/template/erubis.rb +41 -0
- data/spec/ramaze/template/ezamar/another/long/action.zmr +1 -0
- data/spec/ramaze/template/ezamar/combined.zmr +1 -0
- data/spec/ramaze/template/ezamar/file_only.zmr +1 -0
- data/spec/ramaze/template/ezamar/index.zmr +1 -0
- data/spec/ramaze/template/ezamar/nested.zmr +1 -0
- data/spec/ramaze/template/ezamar/other__index.xhtml +1 -0
- data/spec/ramaze/template/ezamar/some__long__action.zmr +1 -0
- data/spec/ramaze/template/ezamar/sum.zmr +1 -0
- data/spec/ramaze/template/ezamar.rb +63 -0
- data/spec/ramaze/template/haml/index.haml +5 -0
- data/spec/ramaze/template/haml/locals.haml +2 -0
- data/spec/ramaze/template/haml/with_vars.haml +4 -0
- data/spec/ramaze/template/haml.rb +66 -0
- data/spec/ramaze/template/liquid/index.liquid +1 -0
- data/spec/ramaze/template/liquid/products.liquid +45 -0
- data/spec/ramaze/template/liquid.rb +99 -0
- data/spec/ramaze/template/markaby/external.mab +8 -0
- data/spec/ramaze/template/markaby/sum.mab +1 -0
- data/spec/ramaze/template/markaby.rb +61 -0
- data/spec/ramaze/template/nagoro/another/long/action.nag +1 -0
- data/spec/ramaze/template/nagoro/combined.nag +1 -0
- data/spec/ramaze/template/nagoro/file_only.nag +1 -0
- data/spec/ramaze/template/nagoro/index.nag +1 -0
- data/spec/ramaze/template/nagoro/nested.nag +1 -0
- data/spec/ramaze/template/nagoro/some__long__action.nag +1 -0
- data/spec/ramaze/template/nagoro/sum.nag +1 -0
- data/spec/ramaze/template/nagoro.rb +64 -0
- data/spec/ramaze/template/ramaze/external.test +1 -0
- data/spec/ramaze/template/redcloth/external.redcloth +1 -0
- data/spec/ramaze/template/redcloth.rb +38 -0
- data/spec/ramaze/template/remarkably/external.rem +8 -0
- data/spec/ramaze/template/remarkably/sum.rem +1 -0
- data/spec/ramaze/template/remarkably.rb +58 -0
- data/spec/ramaze/template/sass/file.css.sass +5 -0
- data/spec/ramaze/template/sass.rb +70 -0
- data/spec/ramaze/template/tagz/external.tagz +8 -0
- data/spec/ramaze/template/tagz/sum.tagz +1 -0
- data/spec/ramaze/template/tagz.rb +62 -0
- data/spec/ramaze/template/tenjin/external.tenjin +1 -0
- data/spec/ramaze/template/tenjin.rb +47 -0
- data/spec/ramaze/template/xslt/concat_words.xsl +16 -0
- data/spec/ramaze/template/xslt/index.xsl +14 -0
- data/spec/ramaze/template/xslt/products.xsl +32 -0
- data/spec/ramaze/template/xslt/ruby_version.xsl +14 -0
- data/spec/ramaze/template/xslt.rb +90 -0
- data/spec/ramaze/template.rb +128 -0
- data/spec/snippets/array/put_within.rb +33 -0
- data/spec/snippets/binding/locals.rb +9 -0
- data/spec/snippets/kernel/constant.rb +23 -0
- data/spec/snippets/numeric/filesize_format.rb +12 -0
- data/spec/snippets/numeric/time.rb +12 -0
- data/spec/snippets/object/__dir__.rb +14 -0
- data/spec/snippets/ordered_set.rb +63 -0
- data/spec/snippets/ramaze/acquire.rb +77 -0
- data/spec/snippets/ramaze/caller_info.rb +39 -0
- data/spec/snippets/ramaze/caller_lines.rb +30 -0
- data/spec/snippets/string/camel_case.rb +25 -0
- data/spec/snippets/string/color.rb +11 -0
- data/spec/snippets/string/snake_case.rb +24 -0
- data/spec/snippets/string/unindent.rb +43 -0
- data/spec/snippets/thread/into.rb +20 -0
- metadata +661 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
|
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
|
3
|
+
|
|
4
|
+
require 'ramaze/tool/project_creator'
|
|
5
|
+
|
|
6
|
+
module Ramaze
|
|
7
|
+
module Tool
|
|
8
|
+
|
|
9
|
+
# Create is a simple class used to create new projects based on the proto
|
|
10
|
+
# directory.
|
|
11
|
+
#
|
|
12
|
+
# It is primarly used for this command:
|
|
13
|
+
#
|
|
14
|
+
# ramaze --create project
|
|
15
|
+
#
|
|
16
|
+
# where project is the directory you want the content put into.
|
|
17
|
+
|
|
18
|
+
class Create
|
|
19
|
+
|
|
20
|
+
# Default options passed to Create::create
|
|
21
|
+
# :proto is the directory to duplicate
|
|
22
|
+
# :amend no files may be overwritten but missing files will be added
|
|
23
|
+
# :force will overwrite existing files
|
|
24
|
+
# :layout copy one subdirectory in +proto+
|
|
25
|
+
|
|
26
|
+
DEFAULT = {
|
|
27
|
+
:proto => File.join(::Ramaze::BASEDIR, 'proto'),
|
|
28
|
+
:amend => false,
|
|
29
|
+
:force => false,
|
|
30
|
+
:layout => '/',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Using ProjectCreator to copy all files and directories from lib/proto
|
|
34
|
+
# to another location.
|
|
35
|
+
# +options+ are described in the DEFAULT constant and should be:
|
|
36
|
+
# :force => (true|false|nil)
|
|
37
|
+
# :amend => (true|false|nil)
|
|
38
|
+
# :layout => (String|nil)
|
|
39
|
+
# :proto => String
|
|
40
|
+
|
|
41
|
+
def self.create(project, options = {})
|
|
42
|
+
options = DEFAULT.merge(options)
|
|
43
|
+
creator = ProjectCreator.new(project, options)
|
|
44
|
+
creator.create
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require 'tmpdir'
|
|
2
|
+
|
|
3
|
+
module Ramaze
|
|
4
|
+
def self.daemonize(runner, instruction, options = {})
|
|
5
|
+
puts "Instructing daemonize to: #{instruction}"
|
|
6
|
+
require 'daemons'
|
|
7
|
+
|
|
8
|
+
pids = File.join(Dir.tmpdir, 'ramaze.pids')
|
|
9
|
+
FileUtils.mkdir_p(pids)
|
|
10
|
+
|
|
11
|
+
# FIXME: there's a much better way, gotta search irc logs.
|
|
12
|
+
unless File.executable?(runner)
|
|
13
|
+
mode = File.stat(runner).mode.to_s(8)
|
|
14
|
+
mode[3,1] = '7'
|
|
15
|
+
File.chmod(mode.to_i(8), runner)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
content = File.readlines(runner)
|
|
19
|
+
content.unshift('#!/usr/bin/env ruby') unless content[0] =~ /#!/
|
|
20
|
+
File.open(runner, 'w+'){|io| io.puts(content) }
|
|
21
|
+
|
|
22
|
+
options = {
|
|
23
|
+
:app_name => File.basename(File.dirname(runner)),
|
|
24
|
+
:ARGV => [instruction],
|
|
25
|
+
:script => runner,
|
|
26
|
+
:dir_mode => :normal,
|
|
27
|
+
:dir => pids,
|
|
28
|
+
:multiple => false,
|
|
29
|
+
:ontop => false,
|
|
30
|
+
:mode => :exec,
|
|
31
|
+
:backtrace => true,
|
|
32
|
+
:monitor => true,
|
|
33
|
+
}.merge(options)
|
|
34
|
+
|
|
35
|
+
Daemons.run(runner, options)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
|
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
|
3
|
+
|
|
4
|
+
$KCODE = 'UTF-8'
|
|
5
|
+
require 'ya2yaml'
|
|
6
|
+
|
|
7
|
+
# Localize helps transforming arbitrary text into localized forms using
|
|
8
|
+
# a simple regular expression and substituting occurences with predefined
|
|
9
|
+
# snippets stored in YAML files.
|
|
10
|
+
#
|
|
11
|
+
# == Usage:
|
|
12
|
+
#
|
|
13
|
+
# Ramaze::Dispatcher::Action::FILTER << Ramaze::Tool::Localize
|
|
14
|
+
|
|
15
|
+
module Ramaze
|
|
16
|
+
module Tool
|
|
17
|
+
class Localize
|
|
18
|
+
|
|
19
|
+
# Enable Localization
|
|
20
|
+
trait :enable => true
|
|
21
|
+
|
|
22
|
+
# Default language that is used if the browser don't suggests otherwise or
|
|
23
|
+
# the language requested is not available.
|
|
24
|
+
trait :default_language => 'en'
|
|
25
|
+
|
|
26
|
+
# languages supported
|
|
27
|
+
trait :languages => %w[ en ]
|
|
28
|
+
|
|
29
|
+
# This block should respond with the correct location of the yaml file
|
|
30
|
+
# for the given locale.
|
|
31
|
+
# Alternative is setting the value as a string that used by String#% with
|
|
32
|
+
# the locale as argument.
|
|
33
|
+
# The YAML file is used for saving and loading the localization.
|
|
34
|
+
#
|
|
35
|
+
# Example:
|
|
36
|
+
# trait :file => "locale/%s.yaml"
|
|
37
|
+
#
|
|
38
|
+
# Please note that giving a relative String can lead to issues when the
|
|
39
|
+
# application is started from another pwd.
|
|
40
|
+
# That is why we, by default, use a dynamic lambda and set the path
|
|
41
|
+
# relative to Global.root.
|
|
42
|
+
trait :file => lambda{|locale|
|
|
43
|
+
Ramaze::Global.root/"conf/locale_#{locale}.yaml"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
# The pattern that is substituted with the translation of the current locale.
|
|
47
|
+
trait :regex => /\[\[(.*?)\]\]/
|
|
48
|
+
|
|
49
|
+
# Browsers may send different keys for the same language, this allows you to
|
|
50
|
+
# do some coercion between what you use as keys and what the browser sends.
|
|
51
|
+
trait :mapping => { /^en-/ => 'en', 'ja' => 'jp'}
|
|
52
|
+
|
|
53
|
+
# When this is set to false, it will not save newly collected translatable
|
|
54
|
+
# strings to disk. Disable this for production use, as it slows the
|
|
55
|
+
# application down.
|
|
56
|
+
trait :collect => true
|
|
57
|
+
|
|
58
|
+
class << self
|
|
59
|
+
|
|
60
|
+
include Trinity
|
|
61
|
+
|
|
62
|
+
# Enables being plugged into Dispatcher::Action::FILTER
|
|
63
|
+
|
|
64
|
+
def call(response, options = {})
|
|
65
|
+
return response unless trait[:enable]
|
|
66
|
+
|
|
67
|
+
body = []
|
|
68
|
+
|
|
69
|
+
response.body.each do |chunk|
|
|
70
|
+
body << localize_body(chunk, options)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
response.body = body.join
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Localizes a response body. It reacts to a regular expression as given
|
|
77
|
+
# in trait[:regex]. Every 'entity' in it will be translated, see
|
|
78
|
+
# `localize` for more information.
|
|
79
|
+
|
|
80
|
+
def localize_body(body, options)
|
|
81
|
+
locale =
|
|
82
|
+
if languages.include?(response["Content-Language"])
|
|
83
|
+
response["Content-Language"]
|
|
84
|
+
else
|
|
85
|
+
(session[:LOCALE] || set_session_locale).to_s
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
body.gsub!(trait[:regex]) do
|
|
89
|
+
localize($1, locale) unless $1.to_s.empty?
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
store(locale, default_language) if trait[:collect]
|
|
93
|
+
|
|
94
|
+
body
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Localizes a single 'entity'. If a translation in the chosen language is
|
|
98
|
+
# not available, it falls back to the default language.
|
|
99
|
+
|
|
100
|
+
def localize(str, locale)
|
|
101
|
+
dict = dictionary
|
|
102
|
+
dict[locale] ||= {}
|
|
103
|
+
dict[default_language] ||= {}
|
|
104
|
+
|
|
105
|
+
trans = dict[locale][str] ||= dict[default_language][str] ||= str
|
|
106
|
+
rescue Object => ex
|
|
107
|
+
Log.error(ex)
|
|
108
|
+
str
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Sets session[:LOCALE] to one of the languages defined in the dictionary.
|
|
112
|
+
# It first tries to honor the browsers accepted languages and then falls
|
|
113
|
+
# back to the default language.
|
|
114
|
+
|
|
115
|
+
def set_session_locale
|
|
116
|
+
session[:LOCALE] = default_language
|
|
117
|
+
accepted_langs = request.locales << default_language
|
|
118
|
+
|
|
119
|
+
mapping = trait[:mapping]
|
|
120
|
+
dict = dictionary
|
|
121
|
+
|
|
122
|
+
accepted_langs.each do |language|
|
|
123
|
+
if mapped = mapping.find{|k,v| k === language }
|
|
124
|
+
language = mapped[1]
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if dict.key?(language)
|
|
128
|
+
session[:LOCALE] = language
|
|
129
|
+
break
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
session[:LOCALE]
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Returns the dictionary used for translation.
|
|
137
|
+
|
|
138
|
+
def dictionary
|
|
139
|
+
trait[:languages].map! {|x| x.to_s }.uniq!
|
|
140
|
+
trait[:dictionary] || load(*languages)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Load given locales from disk and save it into the dictionary.
|
|
144
|
+
|
|
145
|
+
def load(*locales)
|
|
146
|
+
Log.debug "loading locales: #{locales.inspect}"
|
|
147
|
+
|
|
148
|
+
dict = trait[:dictionary] || {}
|
|
149
|
+
|
|
150
|
+
locales.each do |locale|
|
|
151
|
+
begin
|
|
152
|
+
dict[locale] = YAML.load_file(file_for(locale))
|
|
153
|
+
rescue Errno::ENOENT
|
|
154
|
+
dict[locale] = {}
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
trait[:dictionary] = dict
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Stores given locales from the dictionary to disk.
|
|
162
|
+
|
|
163
|
+
def store(*locales)
|
|
164
|
+
locales.uniq.compact.each do |locale|
|
|
165
|
+
file = file_for(locale)
|
|
166
|
+
data = dictionary[locale].ya2yaml
|
|
167
|
+
|
|
168
|
+
Log.dev "saving localized to: #{file}"
|
|
169
|
+
File.open(file, 'w+'){|fd| fd << data }
|
|
170
|
+
end
|
|
171
|
+
rescue Errno::ENOENT => e
|
|
172
|
+
Log.error e
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Call trait[:file] with the passed locale if it reponds to that,
|
|
176
|
+
# otherwise we call #to_s and % with the locale on it.
|
|
177
|
+
|
|
178
|
+
def file_for(locale)
|
|
179
|
+
file_source = trait[:file]
|
|
180
|
+
|
|
181
|
+
if file_source.respond_to?(:call)
|
|
182
|
+
file = file_source.call(locale)
|
|
183
|
+
else
|
|
184
|
+
file = file_source.to_s % locale
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# alias for trait[:languages]
|
|
189
|
+
|
|
190
|
+
def languages
|
|
191
|
+
trait[:languages]
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# alias for trait[:default_language]
|
|
195
|
+
|
|
196
|
+
def default_language
|
|
197
|
+
trait[:default_language]
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
|
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
|
3
|
+
|
|
4
|
+
module Ramaze
|
|
5
|
+
module Tool
|
|
6
|
+
|
|
7
|
+
# Responsible for lookup of MIME info for filetypes based on extension.
|
|
8
|
+
|
|
9
|
+
module MIME
|
|
10
|
+
|
|
11
|
+
# the mime_types.yaml as full path, we use a copy of mongrels.
|
|
12
|
+
trait :types => YAML.load_file(File.join(BASEDIR, 'ramaze/tool/mime_types.yaml'))
|
|
13
|
+
|
|
14
|
+
class << self
|
|
15
|
+
|
|
16
|
+
# Get MIME-type for the given filename based on extension.
|
|
17
|
+
# Answers with an empty string if none is found.
|
|
18
|
+
def type_for(file)
|
|
19
|
+
ext = File.extname(file)
|
|
20
|
+
trait[:types][ext].to_s
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def ext_for(mime)
|
|
24
|
+
exts = []
|
|
25
|
+
|
|
26
|
+
trait[:types].each do |ext, mime_type|
|
|
27
|
+
exts << ext if mime == mime_type
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
exts.sort_by{|e| e.size }.first
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
---
|
|
2
|
+
.a: application/octet-stream
|
|
3
|
+
.abc: text/vnd.abc
|
|
4
|
+
.acgi: text/html
|
|
5
|
+
.afl: video/animaflex
|
|
6
|
+
.ai: application/postscript
|
|
7
|
+
.aif: audio/aiff
|
|
8
|
+
.aifc: audio/aiff
|
|
9
|
+
.aiff: audio/aiff
|
|
10
|
+
.aip: text/x-audiosoft-intra
|
|
11
|
+
.ani: application/x-navi-animation
|
|
12
|
+
.aps: application/mime
|
|
13
|
+
.arc: application/octet-stream
|
|
14
|
+
.arj: application/octet-stream
|
|
15
|
+
.art: image/x-jg
|
|
16
|
+
.asf: video/x-ms-asf
|
|
17
|
+
.asm: text/x-asm
|
|
18
|
+
.asp: text/asp
|
|
19
|
+
.asr: video/x-ms-asf
|
|
20
|
+
.asx: video/x-ms-asf
|
|
21
|
+
.atom: application/xml+atom
|
|
22
|
+
.au: audio/basic
|
|
23
|
+
.au: audio/x-au
|
|
24
|
+
.avi: video/avi
|
|
25
|
+
.avs: video/avs-video
|
|
26
|
+
.axs: application/olescript
|
|
27
|
+
.bas: text/plain
|
|
28
|
+
.bcpio: application/x-bcpio
|
|
29
|
+
.bin: application/octet-stream
|
|
30
|
+
.bm: image/bmp
|
|
31
|
+
.bmp: image/bmp
|
|
32
|
+
.boo: application/book
|
|
33
|
+
.book: application/book
|
|
34
|
+
.boz: application/x-bzip2
|
|
35
|
+
.bsh: application/x-bsh
|
|
36
|
+
.bz2: application/x-bzip2
|
|
37
|
+
.bz: application/x-bzip
|
|
38
|
+
.c: text/plain
|
|
39
|
+
.cat: application/octet-stream
|
|
40
|
+
.cc: text/plain
|
|
41
|
+
.ccad: application/clariscad
|
|
42
|
+
.cco: application/x-cocoa
|
|
43
|
+
.cdf: application/cdf
|
|
44
|
+
.cer: application/x-x509-ca-cert
|
|
45
|
+
.cha: application/x-chat
|
|
46
|
+
.chat: application/x-chat
|
|
47
|
+
.class: application/java
|
|
48
|
+
.class: application/octet-stream
|
|
49
|
+
.clp: application/x-msclip
|
|
50
|
+
.cmx: image/x-cmx
|
|
51
|
+
.cod: image/cis-cod
|
|
52
|
+
.com: application/octet-stream
|
|
53
|
+
.com: text/plain
|
|
54
|
+
.conf: text/plain
|
|
55
|
+
.cpio: application/x-cpio
|
|
56
|
+
.cpp: text/x-c
|
|
57
|
+
.cpt: application/x-cpt
|
|
58
|
+
.crd: application/x-mscardfile
|
|
59
|
+
.crl: application/pkcs-crl
|
|
60
|
+
.crl: application/pkix-crl
|
|
61
|
+
.crt: application/x-x509-ca-cert
|
|
62
|
+
.csh: application/x-csh
|
|
63
|
+
.csh: text/x-script.csh
|
|
64
|
+
.css: text/css
|
|
65
|
+
.cxx: text/plain
|
|
66
|
+
.dcr: application/x-director
|
|
67
|
+
.deb: application/octet-stream
|
|
68
|
+
.deepv: application/x-deepv
|
|
69
|
+
.def: text/plain
|
|
70
|
+
.der: application/x-x509-ca-cert
|
|
71
|
+
.dhh: application/david-heinemeier-hansson
|
|
72
|
+
.dif: video/x-dv
|
|
73
|
+
.dir: application/x-director
|
|
74
|
+
.dl: video/dl
|
|
75
|
+
.dll: application/octet-stream
|
|
76
|
+
.dmg: application/octet-stream
|
|
77
|
+
.dms: application/octet-stream
|
|
78
|
+
.doc: application/msword
|
|
79
|
+
.dp: application/commonground
|
|
80
|
+
.drw: application/drafting
|
|
81
|
+
.dump: application/octet-stream
|
|
82
|
+
.dv: video/x-dv
|
|
83
|
+
.dvi: application/x-dvi
|
|
84
|
+
.dwg: application/acad
|
|
85
|
+
.dwg: image/x-dwg
|
|
86
|
+
.dxf: application/dxf
|
|
87
|
+
.dxf: image/x-dwg
|
|
88
|
+
.dxr: application/x-director
|
|
89
|
+
.ear: application/java-archive
|
|
90
|
+
.el: text/x-script.elisp
|
|
91
|
+
.elc: application/x-bytecode.elisp (compiled elisp)
|
|
92
|
+
.elc: application/x-elc
|
|
93
|
+
.env: application/x-envoy
|
|
94
|
+
.eot: application/octet-stream
|
|
95
|
+
.eps: application/postscript
|
|
96
|
+
.es: application/x-esrehber
|
|
97
|
+
.etx: text/x-setext
|
|
98
|
+
.evy: application/envoy
|
|
99
|
+
.evy: application/x-envoy
|
|
100
|
+
.exe: application/octet-stream
|
|
101
|
+
.f77: text/x-fortran
|
|
102
|
+
.f90: text/plain
|
|
103
|
+
.f90: text/x-fortran
|
|
104
|
+
.f: text/x-fortran
|
|
105
|
+
.fdf: application/vnd.fdf
|
|
106
|
+
.fif: application/fractals
|
|
107
|
+
.fif: image/fif
|
|
108
|
+
.fli: video/fli
|
|
109
|
+
.fli: video/x-fli
|
|
110
|
+
.flo: image/florian
|
|
111
|
+
.flr: x-world/x-vrml
|
|
112
|
+
.flv: video/x-flv
|
|
113
|
+
.flx: text/vnd.fmi.flexstor
|
|
114
|
+
.fmf: video/x-atomic3d-feature
|
|
115
|
+
.for: text/plain
|
|
116
|
+
.for: text/x-fortran
|
|
117
|
+
.fpx: image/vnd.fpx
|
|
118
|
+
.fpx: image/vnd.net-fpx
|
|
119
|
+
.frl: application/freeloader
|
|
120
|
+
.funk: audio/make
|
|
121
|
+
.g3: image/g3fax
|
|
122
|
+
.g: text/plain
|
|
123
|
+
.gif: image/gif
|
|
124
|
+
.gl: video/gl
|
|
125
|
+
.gl: video/x-gl
|
|
126
|
+
.gsd: audio/x-gsm
|
|
127
|
+
.gsm: audio/x-gsm
|
|
128
|
+
.gsp: application/x-gsp
|
|
129
|
+
.gss: application/x-gss
|
|
130
|
+
.gtar: application/x-gtar
|
|
131
|
+
.gz: application/x-compressed
|
|
132
|
+
.gzip: application/x-gzip
|
|
133
|
+
.h: text/plain
|
|
134
|
+
.hdf: application/x-hdf
|
|
135
|
+
.help: application/x-helpfile
|
|
136
|
+
.hgl: application/vnd.hp-hpgl
|
|
137
|
+
.hh: text/plain
|
|
138
|
+
.hlb: text/x-script
|
|
139
|
+
.hlp: application/hlp
|
|
140
|
+
.hpg: application/vnd.hp-hpgl
|
|
141
|
+
.hpgl: application/vnd.hp-hpgl
|
|
142
|
+
.hqx: application/binhex
|
|
143
|
+
.hta: application/hta
|
|
144
|
+
.htc: text/x-component
|
|
145
|
+
.htm: text/html
|
|
146
|
+
.html: text/html
|
|
147
|
+
.htmls: text/html
|
|
148
|
+
.htt: text/webviewhtml
|
|
149
|
+
.htx: text/html
|
|
150
|
+
.ico: image/x-icon
|
|
151
|
+
.idc: text/plain
|
|
152
|
+
.ief: image/ief
|
|
153
|
+
.iefs: image/ief
|
|
154
|
+
.iges: application/iges
|
|
155
|
+
.igs: application/iges
|
|
156
|
+
.iii: application/x-iphone
|
|
157
|
+
.ima: application/x-ima
|
|
158
|
+
.imap: application/x-httpd-imap
|
|
159
|
+
.img: application/octet-stream
|
|
160
|
+
.inf: application/inf
|
|
161
|
+
.ins: application/x-internet-signup
|
|
162
|
+
.ins: application/x-internett-signup
|
|
163
|
+
.ip: application/x-ip2
|
|
164
|
+
.iso: application/octet-stream
|
|
165
|
+
.isp: application/x-internet-signup
|
|
166
|
+
.isu: video/x-isvideo
|
|
167
|
+
.it: audio/it
|
|
168
|
+
.iv: application/x-inventor
|
|
169
|
+
.ivr: i-world/i-vrml
|
|
170
|
+
.ivy: application/x-livescreen
|
|
171
|
+
.jam: audio/x-jam
|
|
172
|
+
.jar: application/java-archive
|
|
173
|
+
.jardiff: application/x-java-archive-diff
|
|
174
|
+
.jav: text/plain
|
|
175
|
+
.jav: text/x-java-source
|
|
176
|
+
.java: text/plain
|
|
177
|
+
.java: text/x-java-source
|
|
178
|
+
.jcm: application/x-java-commerce
|
|
179
|
+
.jfif-tbnl: image/jpeg
|
|
180
|
+
.jfif: image/jpeg
|
|
181
|
+
.jfif: image/pipeg
|
|
182
|
+
.jfif: image/pjpeg
|
|
183
|
+
.jng: image/x-jng
|
|
184
|
+
.jnlp: application/x-java-jnlp-file
|
|
185
|
+
.jpe: image/jpeg
|
|
186
|
+
.jpeg: image/jpeg
|
|
187
|
+
.jpg: image/jpeg
|
|
188
|
+
.jps: image/x-jps
|
|
189
|
+
.js: application/x-javascript
|
|
190
|
+
.js: text/javascript
|
|
191
|
+
.jut: image/jutvision
|
|
192
|
+
.kar: audio/midi
|
|
193
|
+
.kar: music/x-karaoke
|
|
194
|
+
.ksh: application/x-ksh
|
|
195
|
+
.ksh: text/x-script.ksh
|
|
196
|
+
.la: audio/nspaudio
|
|
197
|
+
.la: audio/x-nspaudio
|
|
198
|
+
.lam: audio/x-liveaudio
|
|
199
|
+
.latex: application/x-latex
|
|
200
|
+
.lha: application/lha
|
|
201
|
+
.lha: application/octet-stream
|
|
202
|
+
.lha: application/x-lha
|
|
203
|
+
.lhx: application/octet-stream
|
|
204
|
+
.list: text/plain
|
|
205
|
+
.lma: audio/nspaudio
|
|
206
|
+
.lma: audio/x-nspaudio
|
|
207
|
+
.log: text/plain
|
|
208
|
+
.lsf: video/x-la-asf
|
|
209
|
+
.lsp: application/x-lisp
|
|
210
|
+
.lsp: text/x-script.lisp
|
|
211
|
+
.lst: text/plain
|
|
212
|
+
.lsx: text/x-la-asf
|
|
213
|
+
.lsx: video/x-la-asf
|
|
214
|
+
.ltx: application/x-latex
|
|
215
|
+
.lzh: application/octet-stream
|
|
216
|
+
.lzh: application/x-lzh
|
|
217
|
+
.lzx: application/lzx
|
|
218
|
+
.lzx: application/octet-stream
|
|
219
|
+
.lzx: application/x-lzx
|
|
220
|
+
.m13: application/x-msmediaview
|
|
221
|
+
.m14: application/x-msmediaview
|
|
222
|
+
.m1v: video/mpeg
|
|
223
|
+
.m2a: audio/mpeg
|
|
224
|
+
.m2v: video/mpeg
|
|
225
|
+
.m3u: audio/x-mpegurl
|
|
226
|
+
.m: text/x-m
|
|
227
|
+
.man: application/x-troff-man
|
|
228
|
+
.map: application/x-navimap
|
|
229
|
+
.mar: text/plain
|
|
230
|
+
.mbd: application/mbedlet
|
|
231
|
+
.mc: application/x-magic-cap-package-1.0
|
|
232
|
+
.mcd: application/mcad
|
|
233
|
+
.mcd: application/x-mathcad
|
|
234
|
+
.mcf: image/vasa
|
|
235
|
+
.mcf: text/mcf
|
|
236
|
+
.mcp: application/netmc
|
|
237
|
+
.mdb: application/x-msaccess
|
|
238
|
+
.me: application/x-troff-me
|
|
239
|
+
.mht: message/rfc822
|
|
240
|
+
.mhtml: message/rfc822
|
|
241
|
+
.mid: audio/mid
|
|
242
|
+
.mid: audio/midi
|
|
243
|
+
.mid: audio/x-mid
|
|
244
|
+
.mid: audio/x-midi
|
|
245
|
+
.midi: audio/midi
|
|
246
|
+
.midi: audio/x-mid
|
|
247
|
+
.midi: audio/x-midi
|
|
248
|
+
.mif: application/x-frame
|
|
249
|
+
.mif: application/x-mif
|
|
250
|
+
.mime: message/rfc822
|
|
251
|
+
.mime: www/mime
|
|
252
|
+
.mjf: audio/x-vnd.audioexplosion.mjuicemediafile
|
|
253
|
+
.mjpg: video/x-motion-jpeg
|
|
254
|
+
.mm: application/base64
|
|
255
|
+
.mm: application/x-meme
|
|
256
|
+
.mme: application/base64
|
|
257
|
+
.mml: text/mathml
|
|
258
|
+
.mng: video/x-mng
|
|
259
|
+
.mod: audio/mod
|
|
260
|
+
.moov: video/quicktime
|
|
261
|
+
.mov: video/quicktime
|
|
262
|
+
.movie: video/x-sgi-movie
|
|
263
|
+
.mp2: audio/mpeg
|
|
264
|
+
.mp3: audio/mpeg
|
|
265
|
+
.mpa: audio/mpeg
|
|
266
|
+
.mpc: application/x-project
|
|
267
|
+
.mpe: video/mpeg
|
|
268
|
+
.mpeg: video/mpeg
|
|
269
|
+
.mpg: video/mpeg
|
|
270
|
+
.mpga: audio/mpeg
|
|
271
|
+
.mpp: application/vnd.ms-project
|
|
272
|
+
.mpt: application/x-project
|
|
273
|
+
.mpv2: video/mpeg
|
|
274
|
+
.mpv: application/x-project
|
|
275
|
+
.mpx: application/x-project
|
|
276
|
+
.mrc: application/marc
|
|
277
|
+
.ms: application/x-troff-ms
|
|
278
|
+
.msi: application/octet-stream
|
|
279
|
+
.msm: application/octet-stream
|
|
280
|
+
.msp: application/octet-stream
|
|
281
|
+
.mv: video/x-sgi-movie
|
|
282
|
+
.mvb: application/x-msmediaview
|
|
283
|
+
.my: audio/make
|
|
284
|
+
.mzz: application/x-vnd.audioexplosion.mzz
|
|
285
|
+
.nap: image/naplps
|
|
286
|
+
.naplps: image/naplps
|
|
287
|
+
.nc: application/x-netcdf
|
|
288
|
+
.ncm: application/vnd.nokia.configuration-message
|
|
289
|
+
.nif: image/x-niff
|
|
290
|
+
.niff: image/x-niff
|
|
291
|
+
.nix: application/x-mix-transfer
|
|
292
|
+
.nsc: application/x-conference
|
|
293
|
+
.nvd: application/x-navidoc
|
|
294
|
+
.nws: message/rfc822
|
|
295
|
+
.o: application/octet-stream
|
|
296
|
+
.oda: application/oda
|
|
297
|
+
.omc: application/x-omc
|
|
298
|
+
.omcd: application/x-omcdatamaker
|
|
299
|
+
.omcr: application/x-omcregerator
|
|
300
|
+
.p10: application/pkcs10
|
|
301
|
+
.p10: application/x-pkcs10
|
|
302
|
+
.p12: application/pkcs-12
|
|
303
|
+
.p12: application/x-pkcs12
|
|
304
|
+
.p7a: application/x-pkcs7-signature
|
|
305
|
+
.p7b: application/x-pkcs7-certificates
|
|
306
|
+
.p7c: application/pkcs7-mime
|
|
307
|
+
.p7c: application/x-pkcs7-mime
|
|
308
|
+
.p7m: application/pkcs7-mime
|
|
309
|
+
.p7m: application/x-pkcs7-mime
|
|
310
|
+
.p7r: application/x-pkcs7-certreqresp
|
|
311
|
+
.p7s: application/pkcs7-signature
|
|
312
|
+
.p7s: application/x-pkcs7-signature
|
|
313
|
+
.p: text/x-pascal
|
|
314
|
+
.part: application/pro_eng
|
|
315
|
+
.pas: text/pascal
|
|
316
|
+
.pbm: image/x-portable-bitmap
|
|
317
|
+
.pcl: application/vnd.hp-pcl
|
|
318
|
+
.pcl: application/x-pcl
|
|
319
|
+
.pct: image/x-pict
|
|
320
|
+
.pcx: image/x-pcx
|
|
321
|
+
.pdb: application/x-pilot
|
|
322
|
+
.pdf: application/pdf
|
|
323
|
+
.pem: application/x-x509-ca-cert
|
|
324
|
+
.pfunk: audio/make
|
|
325
|
+
.pfunk: audio/make.my.funk
|
|
326
|
+
.pfx: application/x-pkcs12
|
|
327
|
+
.pgm: image/x-portable-graymap
|
|
328
|
+
.pgm: image/x-portable-greymap
|
|
329
|
+
.pic: image/pict
|
|
330
|
+
.pict: image/pict
|
|
331
|
+
.pkg: application/x-newton-compatible-pkg
|
|
332
|
+
.pko: application/vnd.ms-pki.pko
|
|
333
|
+
.pko: application/ynd.ms-pkipko
|
|
334
|
+
.pl: application/x-perl
|
|
335
|
+
.pl: text/plain
|
|
336
|
+
.pl: text/x-script.perl
|
|
337
|
+
.plx: application/x-pixclscript
|
|
338
|
+
.pm4: application/x-pagemaker
|
|
339
|
+
.pm5: application/x-pagemaker
|
|
340
|
+
.pm: application/x-perl
|
|
341
|
+
.pm: image/x-xpixmap
|
|
342
|
+
.pm: text/x-script.perl-module
|
|
343
|
+
.pma: application/x-perfmon
|
|
344
|
+
.pmc: application/x-perfmon
|
|
345
|
+
.pml: application/x-perfmon
|
|
346
|
+
.pmr: application/x-perfmon
|
|
347
|
+
.pmw: application/x-perfmon
|
|
348
|
+
.png: image/png
|
|
349
|
+
.pnm: application/x-portable-anymap
|
|
350
|
+
.pnm: image/x-portable-anymap
|
|
351
|
+
.pot,: application/vnd.ms-powerpoint
|
|
352
|
+
.pot: application/mspowerpoint
|
|
353
|
+
.pot: application/vnd.ms-powerpoint
|
|
354
|
+
.pov: model/x-pov
|
|
355
|
+
.ppa: application/vnd.ms-powerpoint
|
|
356
|
+
.ppm: image/x-portable-pixmap
|
|
357
|
+
.pps: application/mspowerpoint
|
|
358
|
+
.ppt: application/mspowerpoint
|
|
359
|
+
.ppz: application/mspowerpoint
|
|
360
|
+
.prc: application/x-pilot
|
|
361
|
+
.pre: application/x-freelance
|
|
362
|
+
.prf: application/pics-rules
|
|
363
|
+
.prt: application/pro_eng
|
|
364
|
+
.ps: application/postscript
|
|
365
|
+
.psd: application/octet-stream
|
|
366
|
+
.pub: application/x-mspublisher
|
|
367
|
+
.pvu: paleovu/x-pv
|
|
368
|
+
.pwz: application/vnd.ms-powerpoint
|
|
369
|
+
.py: text/x-script.phyton
|
|
370
|
+
.pyc: applicaiton/x-bytecode.python
|
|
371
|
+
.qcp: audio/vnd.qcelp
|
|
372
|
+
.qd3: x-world/x-3dmf
|
|
373
|
+
.qd3d: x-world/x-3dmf
|
|
374
|
+
.qif: image/x-quicktime
|
|
375
|
+
.qt: video/quicktime
|
|
376
|
+
.qtc: video/x-qtc
|
|
377
|
+
.qti: image/x-quicktime
|
|
378
|
+
.qtif: image/x-quicktime
|
|
379
|
+
.ra: audio/x-pn-realaudio
|
|
380
|
+
.ra: audio/x-pn-realaudio-plugin
|
|
381
|
+
.ra: audio/x-realaudio
|
|
382
|
+
.ram: audio/x-pn-realaudio
|
|
383
|
+
.rar: application/x-rar-compressed
|
|
384
|
+
.ras: application/x-cmu-raster
|
|
385
|
+
.ras: image/cmu-raster
|
|
386
|
+
.ras: image/x-cmu-raster
|
|
387
|
+
.rast: image/cmu-raster
|
|
388
|
+
.rexx: text/x-script.rexx
|
|
389
|
+
.rf: image/vnd.rn-realflash
|
|
390
|
+
.rgb: image/x-rgb
|
|
391
|
+
.rm: application/vnd.rn-realmedia
|
|
392
|
+
.rm: audio/x-pn-realaudio
|
|
393
|
+
.rmi: audio/mid
|
|
394
|
+
.rmm: audio/x-pn-realaudio
|
|
395
|
+
.rmp: audio/x-pn-realaudio
|
|
396
|
+
.rmp: audio/x-pn-realaudio-plugin
|
|
397
|
+
.rng: application/ringing-tones
|
|
398
|
+
.rng: application/vnd.nokia.ringing-tone
|
|
399
|
+
.rnx: application/vnd.rn-realplayer
|
|
400
|
+
.roff: application/x-troff
|
|
401
|
+
.rp: image/vnd.rn-realpix
|
|
402
|
+
.rpm: application/x-redhat-package-manager
|
|
403
|
+
.rpm: audio/x-pn-realaudio-plugin
|
|
404
|
+
.rss: text/xml
|
|
405
|
+
.rt: text/richtext
|
|
406
|
+
.rt: text/vnd.rn-realtext
|
|
407
|
+
.rtf: application/rtf
|
|
408
|
+
.rtf: application/x-rtf
|
|
409
|
+
.rtf: text/richtext
|
|
410
|
+
.rtx: application/rtf
|
|
411
|
+
.rtx: text/richtext
|
|
412
|
+
.run: application/x-makeself
|
|
413
|
+
.rv: video/vnd.rn-realvideo
|
|
414
|
+
.s3m: audio/s3m
|
|
415
|
+
.s: text/x-asm
|
|
416
|
+
.saveme: application/octet-stream
|
|
417
|
+
.sbk: application/x-tbook
|
|
418
|
+
.scd: application/x-msschedule
|
|
419
|
+
.scm: application/x-lotusscreencam
|
|
420
|
+
.scm: text/x-script.guile
|
|
421
|
+
.scm: text/x-script.scheme
|
|
422
|
+
.scm: video/x-scm
|
|
423
|
+
.sct: text/scriptlet
|
|
424
|
+
.sdml: text/plain
|
|
425
|
+
.sdp: application/sdp
|
|
426
|
+
.sdp: application/x-sdp
|
|
427
|
+
.sdr: application/sounder
|
|
428
|
+
.sea: application/sea
|
|
429
|
+
.sea: application/x-sea
|
|
430
|
+
.set: application/set
|
|
431
|
+
.setpay: application/set-payment-initiation
|
|
432
|
+
.setreg: application/set-registration-initiation
|
|
433
|
+
.sgm: text/sgml
|
|
434
|
+
.sgm: text/x-sgml
|
|
435
|
+
.sgml: text/sgml
|
|
436
|
+
.sgml: text/x-sgml
|
|
437
|
+
.sh: application/x-bsh
|
|
438
|
+
.sh: application/x-sh
|
|
439
|
+
.sh: application/x-shar
|
|
440
|
+
.sh: text/x-script.sh
|
|
441
|
+
.shar: application/x-bsh
|
|
442
|
+
.shar: application/x-shar
|
|
443
|
+
.shtml: text/html
|
|
444
|
+
.shtml: text/x-server-parsed-html
|
|
445
|
+
.sid: audio/x-psid
|
|
446
|
+
.sit: application/x-sit
|
|
447
|
+
.sit: application/x-stuffit
|
|
448
|
+
.skd: application/x-koan
|
|
449
|
+
.skm: application/x-koan
|
|
450
|
+
.skp: application/x-koan
|
|
451
|
+
.skt: application/x-koan
|
|
452
|
+
.sl: application/x-seelogo
|
|
453
|
+
.smi: application/smil
|
|
454
|
+
.smil: application/smil
|
|
455
|
+
.snd: audio/basic
|
|
456
|
+
.snd: audio/x-adpcm
|
|
457
|
+
.sol: application/solids
|
|
458
|
+
.spc: application/x-pkcs7-certificates
|
|
459
|
+
.spc: text/x-speech
|
|
460
|
+
.spl: application/futuresplash
|
|
461
|
+
.spr: application/x-sprite
|
|
462
|
+
.sprite: application/x-sprite
|
|
463
|
+
.src: application/x-wais-source
|
|
464
|
+
.ssi: text/x-server-parsed-html
|
|
465
|
+
.ssm: application/streamingmedia
|
|
466
|
+
.sst: application/vnd.ms-pki.certstore
|
|
467
|
+
.sst: application/vnd.ms-pkicertstore
|
|
468
|
+
.step: application/step
|
|
469
|
+
.stl: application/sla
|
|
470
|
+
.stl: application/vnd.ms-pki.stl
|
|
471
|
+
.stl: application/vnd.ms-pkistl
|
|
472
|
+
.stl: application/x-navistyle
|
|
473
|
+
.stm: text/html
|
|
474
|
+
.stp: application/step
|
|
475
|
+
.sv4cpio: application/x-sv4cpio
|
|
476
|
+
.sv4crc: application/x-sv4crc
|
|
477
|
+
.svf: image/vnd.dwg
|
|
478
|
+
.svf: image/x-dwg
|
|
479
|
+
.svg: image/svg+xml
|
|
480
|
+
.svr: application/x-world
|
|
481
|
+
.svr: x-world/x-svr
|
|
482
|
+
.swf: application/x-shockwave-flash
|
|
483
|
+
.t: application/x-troff
|
|
484
|
+
.talk: text/x-speech
|
|
485
|
+
.tar: application/x-tar
|
|
486
|
+
.tbk: application/toolbook
|
|
487
|
+
.tbk: application/x-tbook
|
|
488
|
+
.tcl: application/x-tcl
|
|
489
|
+
.tcl: text/x-script.tcl
|
|
490
|
+
.tcsh: text/x-script.tcsh
|
|
491
|
+
.tex: application/x-tex
|
|
492
|
+
.texi: application/x-texinfo
|
|
493
|
+
.texinfo: application/x-texinfo
|
|
494
|
+
.text: application/plain
|
|
495
|
+
.text: text/plain
|
|
496
|
+
.tgz: application/gnutar
|
|
497
|
+
.tgz: application/x-compressed
|
|
498
|
+
.tif: image/tiff
|
|
499
|
+
.tiff: image/tiff
|
|
500
|
+
.tk: application/x-tcl
|
|
501
|
+
.tr: application/x-troff
|
|
502
|
+
.trm: application/x-msterminal
|
|
503
|
+
.tsi: audio/tsp-audio
|
|
504
|
+
.tsp: application/dsptype
|
|
505
|
+
.tsp: audio/tsplayer
|
|
506
|
+
.tsv: text/tab-separated-values
|
|
507
|
+
.turbot: image/florian
|
|
508
|
+
.txt: text/plain
|
|
509
|
+
.uil: text/x-uil
|
|
510
|
+
.uls: text/iuls
|
|
511
|
+
.uni: text/uri-list
|
|
512
|
+
.unis: text/uri-list
|
|
513
|
+
.unv: application/i-deas
|
|
514
|
+
.uri: text/uri-list
|
|
515
|
+
.uris: text/uri-list
|
|
516
|
+
.ustar: application/x-ustar
|
|
517
|
+
.ustar: multipart/x-ustar
|
|
518
|
+
.uu: application/octet-stream
|
|
519
|
+
.uu: text/x-uuencode
|
|
520
|
+
.uue: text/x-uuencode
|
|
521
|
+
.vcd: application/x-cdlink
|
|
522
|
+
.vcf: text/x-vcard
|
|
523
|
+
.vcs: text/x-vcalendar
|
|
524
|
+
.vda: application/vda
|
|
525
|
+
.vdo: video/vdo
|
|
526
|
+
.vew: application/groupwise
|
|
527
|
+
.viv: video/vivo
|
|
528
|
+
.viv: video/vnd.vivo
|
|
529
|
+
.vivo: video/vivo
|
|
530
|
+
.vivo: video/vnd.vivo
|
|
531
|
+
.vmd: application/vocaltec-media-desc
|
|
532
|
+
.vmf: application/vocaltec-media-file
|
|
533
|
+
.voc: audio/voc
|
|
534
|
+
.voc: audio/x-voc
|
|
535
|
+
.vos: video/vosaic
|
|
536
|
+
.vox: audio/voxware
|
|
537
|
+
.vqe: audio/x-twinvq-plugin
|
|
538
|
+
.vqf: audio/x-twinvq
|
|
539
|
+
.vql: audio/x-twinvq-plugin
|
|
540
|
+
.vrml: application/x-vrml
|
|
541
|
+
.vrml: model/vrml
|
|
542
|
+
.vrml: x-world/x-vrml
|
|
543
|
+
.vrt: x-world/x-vrt
|
|
544
|
+
.vsd: application/x-visio
|
|
545
|
+
.vst: application/x-visio
|
|
546
|
+
.vsw: application/x-visio
|
|
547
|
+
.w60: application/wordperfect6.0
|
|
548
|
+
.w61: application/wordperfect6.1
|
|
549
|
+
.w6w: application/msword
|
|
550
|
+
.war: application/java-archive
|
|
551
|
+
.wav: audio/wav
|
|
552
|
+
.wav: audio/x-wav
|
|
553
|
+
.wb1: application/x-qpro
|
|
554
|
+
.wbmp: image/vnd.wap.wbmp
|
|
555
|
+
.wbmp: image/vnd.wap.wbmp
|
|
556
|
+
.wcm: application/vnd.ms-works
|
|
557
|
+
.wdb: application/vnd.ms-works
|
|
558
|
+
.web: application/vnd.xara
|
|
559
|
+
.wiz: application/msword
|
|
560
|
+
.wk1: application/x-123
|
|
561
|
+
.wks: application/vnd.ms-works
|
|
562
|
+
.wmf: application/x-msmetafile
|
|
563
|
+
.wmf: windows/metafile
|
|
564
|
+
.wml: text/vnd.wap.wml
|
|
565
|
+
.wmlc: application/vnd.wap.wmlc
|
|
566
|
+
.wmls: text/vnd.wap.wmlscript
|
|
567
|
+
.wmlsc: application/vnd.wap.wmlscriptc
|
|
568
|
+
.wmv: video/x-ms-wmv
|
|
569
|
+
.word: application/msword
|
|
570
|
+
.wp5: application/wordperfect
|
|
571
|
+
.wp6: application/wordperfect
|
|
572
|
+
.wp: application/wordperfect
|
|
573
|
+
.wpd: application/wordperfect
|
|
574
|
+
.wps: application/vnd.ms-works
|
|
575
|
+
.wq1: application/x-lotus
|
|
576
|
+
.wri: application/mswrite
|
|
577
|
+
.wrl: application/x-world
|
|
578
|
+
.wsc: text/scriplet
|
|
579
|
+
.wsrc: application/x-wais-source
|
|
580
|
+
.wtk: application/x-wintalk
|
|
581
|
+
.x-png: image/png
|
|
582
|
+
.xaf: x-world/x-vrml
|
|
583
|
+
.xbm: image/xbm
|
|
584
|
+
.xdr: video/x-amt-demorun
|
|
585
|
+
.xgz: xgl/drawing
|
|
586
|
+
.xhtml: application/xhtml+xml
|
|
587
|
+
.xif: image/vnd.xiff
|
|
588
|
+
.xl: application/excel
|
|
589
|
+
.xla: application/excel
|
|
590
|
+
.xlb: application/excel
|
|
591
|
+
.xlc: application/excel
|
|
592
|
+
.xld: application/excel
|
|
593
|
+
.xlk: application/excel
|
|
594
|
+
.xll: application/excel
|
|
595
|
+
.xlm: application/excel
|
|
596
|
+
.xls: application/excel
|
|
597
|
+
.xlt: application/excel
|
|
598
|
+
.xlv: application/excel
|
|
599
|
+
.xlw: application/excel
|
|
600
|
+
.xm: audio/xm
|
|
601
|
+
.xml: text/xml
|
|
602
|
+
.xmz: xgl/movie
|
|
603
|
+
.xof: x-world/x-vrml
|
|
604
|
+
.xpi: application/x-xpinstall
|
|
605
|
+
.xpix: application/x-vnd.ls-xpix
|
|
606
|
+
.xpm: image/x-xpixmap
|
|
607
|
+
.xpm: image/xpm
|
|
608
|
+
.xsr: video/x-amt-showrun
|
|
609
|
+
.xwd: image/x-xwd
|
|
610
|
+
.xwd: image/x-xwindowdump
|
|
611
|
+
.xyz: chemical/x-pdb
|
|
612
|
+
.z: application/x-compressed
|
|
613
|
+
.zip: application/zip
|
|
614
|
+
.zoo: application/octet-stream
|
|
615
|
+
.zsh: text/x-script.zsh
|