ramaze 0.3.9.1 → 2008.06
Sign up to get free protection for your applications and to get access to all the features.
- data/{doc/README → README.markdown} +78 -32
- data/Rakefile +53 -50
- 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 +32 -122
- data/cache.yaml +7 -0
- data/doc/AUTHORS +26 -22
- data/doc/CHANGELOG +16720 -3907
- data/doc/INSTALL +77 -19
- data/doc/LEGAL +0 -4
- data/doc/meta/announcement.txt +43 -54
- data/doc/meta/configuration.txt +3 -2
- data/doc/readme_chunks/examples.txt +2 -2
- data/doc/readme_chunks/installing.txt +66 -20
- data/doc/tutorial/todolist.html +338 -520
- data/doc/tutorial/todolist.mkd +36 -2
- data/examples/{auth → app/auth}/auth.rb +0 -0
- data/examples/{auth → app/auth}/template/layout.haml +0 -0
- data/examples/{auth → app/auth}/template/login.haml +0 -0
- data/examples/{blog → app/blog}/README +0 -0
- data/examples/{blog → app/blog}/controller/main.rb +1 -1
- data/examples/{blog → app/blog}/model/entry.rb +1 -1
- data/examples/{blog → app/blog}/public/styles/blog.css +0 -0
- data/examples/{blog → app/blog}/spec/blog.rb +2 -2
- data/examples/{blog → app/blog}/start.rb +0 -0
- data/examples/{blog → app/blog}/view/edit.xhtml +0 -0
- data/examples/{blog → app/blog}/view/index.xhtml +0 -0
- data/examples/{blog → app/blog}/view/layout.xhtml +0 -0
- data/examples/{blog → app/blog}/view/new.xhtml +0 -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/{rammit → app/rammit}/spec/rammit.rb +2 -1
- data/examples/{rammit → app/rammit}/src/controller/main.rb +0 -0
- data/examples/{rammit → app/rammit}/src/controller/page.rb +0 -0
- data/examples/{rammit → app/rammit}/src/model.rb +0 -0
- data/examples/{rammit → app/rammit}/start.rb +0 -0
- data/examples/{rammit → app/rammit}/template/index.xhtml +0 -0
- data/examples/{rammit → app/rammit}/template/page/view.xhtml +0 -0
- data/examples/{rapaste → app/rapaste}/Rakefile +0 -1
- data/examples/{rapaste → app/rapaste}/controller/paste.rb +3 -3
- data/examples/{rapaste → app/rapaste}/model/paste.rb +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/active4d.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/all_hallows_eve.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/amy.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/blackboard.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/brilliance_black.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/brilliance_dull.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/cobalt.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/dawn.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/display.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/eiffel.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/espresso_libre.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/idle.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/iplastic.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/lazy.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/mac_classic.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/magicwb_amiga.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/pastels_on_dark.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/slush_poppies.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/spacecadet.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/sunburst.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/twilight.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/css/zenburnesque.css +0 -0
- data/examples/{rapaste → app/rapaste}/public/js/jquery.js +0 -0
- data/examples/{rapaste → app/rapaste}/spec/rapaste.rb +2 -2
- data/examples/{rapaste → app/rapaste}/start.rb +0 -0
- data/examples/{rapaste → app/rapaste}/view/copy.xhtml +0 -0
- data/examples/{rapaste → app/rapaste}/view/index.xhtml +0 -0
- data/examples/{rapaste → app/rapaste}/view/layout.xhtml +0 -0
- data/examples/{rapaste → app/rapaste}/view/list.xhtml +0 -0
- data/examples/{rapaste → app/rapaste}/view/search.xhtml +0 -0
- data/examples/{rapaste → app/rapaste}/view/view.xhtml +0 -0
- data/examples/{sourceview → app/sourceview}/public/coderay.css +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/file.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/folder.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/tv-collapsable-last.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/tv-collapsable.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/tv-expandable-last.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/tv-expandable.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/tv-item-last.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/images/tv-item.gif +0 -0
- data/examples/{sourceview → app/sourceview}/public/jquery.js +0 -0
- data/examples/{sourceview → app/sourceview}/public/jquery.treeview.css +0 -0
- data/examples/{sourceview → app/sourceview}/public/jquery.treeview.js +0 -0
- data/examples/{sourceview → app/sourceview}/public/sourceview.js +0 -0
- data/examples/{sourceview → app/sourceview}/sourceview.rb +1 -1
- data/examples/{sourceview → app/sourceview}/template/index.haml +0 -0
- data/examples/{todolist → app/todolist}/README +0 -0
- data/examples/{todolist → app/todolist}/public/favicon.ico +0 -0
- data/examples/{todolist → app/todolist}/public/js/jquery.js +0 -0
- data/examples/{todolist → app/todolist}/public/ramaze.png +0 -0
- data/examples/{todolist → app/todolist}/spec/todolist.rb +2 -2
- data/examples/{todolist → app/todolist}/src/controller/main.rb +0 -0
- data/examples/{todolist → app/todolist}/src/element/page.rb +0 -0
- data/examples/{todolist → app/todolist}/src/model.rb +0 -0
- data/examples/{todolist → app/todolist}/start.rb +0 -0
- data/examples/{todolist → app/todolist}/template/index.xhtml +0 -0
- data/examples/{todolist → app/todolist}/template/new.xhtml +0 -0
- data/examples/{upload → app/upload}/start.rb +0 -0
- data/examples/{upload → app/upload}/view/index.xhtml +0 -0
- data/examples/{whywiki → app/whywiki}/spec/whywiki.rb +3 -3
- data/examples/{whywiki → app/whywiki}/start.rb +0 -0
- data/examples/{whywiki → app/whywiki}/template/edit.xhtml +0 -0
- data/examples/{whywiki → app/whywiki}/template/show.xhtml +0 -0
- data/examples/{wikore → app/wikore}/spec/wikore.rb +2 -2
- data/examples/{wikore → app/wikore}/src/controller.rb +0 -0
- data/examples/{wikore → app/wikore}/src/model.rb +0 -0
- data/examples/{wikore → app/wikore}/start.rb +0 -0
- data/examples/{wikore → app/wikore}/template/index.xhtml +0 -0
- data/examples/{wiktacular → app/wiktacular}/README +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/link/2007-07-20_19-45-51.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/link/current.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/main/2007-07-20_16-31-33.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/main/2007-07-20_19-21-12.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/main/2007-07-20_19-23-10.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/main/2007-07-20_19-45-07.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/main/current.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/markdown/current.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/2007-07-20_16-43-46.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/2007-07-20_19-43-50.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/2007-07-21_18-46-01.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/2007-07-21_18-46-32.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/2007-07-21_18-47-08.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/2007-07-21_18-47-54.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/mkd/testing/current.mkd +0 -0
- data/examples/{wiktacular → app/wiktacular}/public/favicon.ico +0 -0
- data/examples/{wiktacular → app/wiktacular}/public/screen.css +0 -0
- data/examples/{wiktacular → app/wiktacular}/spec/wiktacular.rb +4 -5
- data/examples/{wiktacular → app/wiktacular}/src/controller.rb +0 -0
- data/examples/{wiktacular → app/wiktacular}/src/model.rb +0 -0
- data/examples/{wiktacular → app/wiktacular}/start.rb +0 -0
- data/examples/{wiktacular → app/wiktacular}/template/edit.xhtml +0 -0
- data/examples/{wiktacular → app/wiktacular}/template/html_layout.xhtml +0 -0
- data/examples/{wiktacular → app/wiktacular}/template/index.xhtml +0 -0
- data/examples/{wiktacular → app/wiktacular}/template/new.xhtml +0 -0
- data/examples/{element.rb → basic/element.rb} +0 -0
- data/examples/basic/gestalt.rb +27 -0
- data/examples/{hello.rb → basic/hello.rb} +0 -0
- data/examples/{layout.rb → basic/layout.rb} +0 -0
- data/examples/{linking.rb → basic/linking.rb} +0 -0
- data/examples/{simple.rb → basic/simple.rb} +3 -3
- data/examples/{caching.rb → helpers/cache.rb} +0 -0
- data/examples/helpers/form_with_sequel.rb +24 -0
- data/examples/helpers/httpdigest.rb +50 -0
- data/examples/{identity.rb → helpers/identity.rb} +0 -0
- data/examples/{nitro_form.rb → helpers/nitro_form.rb} +0 -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/{css.rb → misc/css.rb} +0 -0
- data/examples/{facebook.rb → misc/facebook.rb} +0 -0
- data/examples/{memleak_detector.rb → misc/memleak_detector.rb} +0 -0
- data/examples/misc/nagoro_element.rb +43 -0
- data/examples/{ramaise.rb → misc/ramaise.rb} +0 -0
- data/examples/misc/rapp.rb +45 -0
- data/examples/misc/sequel_scaffolding.rb +34 -0
- data/examples/{simple_auth.rb → misc/simple_auth.rb} +0 -0
- data/examples/templates/template_amrita2.rb +1 -1
- data/examples/templates/template_erubis.rb +2 -2
- data/examples/templates/template_ezamar.rb +1 -1
- data/examples/templates/template_haml.rb +2 -2
- data/examples/templates/template_liquid.rb +2 -2
- data/examples/templates/template_markaby.rb +1 -1
- data/examples/templates/template_nagoro.rb +1 -1
- data/examples/templates/template_redcloth.rb +2 -2
- data/examples/templates/template_remarkably.rb +1 -1
- data/examples/templates/template_tenjin.rb +5 -9
- data/examples/templates/template_xslt.rb +1 -1
- data/lib/proto/public/dispatch.fcgi +0 -0
- data/lib/proto/public/js/jquery.js +750 -577
- data/lib/proto/spec/main.rb +1 -1
- data/lib/proto/start.ru +8 -0
- data/lib/proto/view/page.xhtml +13 -1
- data/lib/ramaze.rb +32 -15
- data/lib/ramaze/action.rb +18 -1
- data/lib/ramaze/action/render.rb +45 -17
- data/lib/ramaze/adapter.rb +8 -7
- data/lib/ramaze/adapter/base.rb +79 -13
- data/lib/ramaze/adapter/cgi.rb +5 -10
- data/lib/ramaze/adapter/ebb.rb +6 -20
- data/lib/ramaze/adapter/fake.rb +12 -0
- data/lib/ramaze/adapter/fcgi.rb +5 -11
- data/lib/ramaze/adapter/lsws.rb +5 -9
- data/lib/ramaze/adapter/mongrel.rb +5 -9
- data/lib/ramaze/adapter/scgi.rb +4 -8
- data/lib/ramaze/adapter/thin.rb +6 -11
- data/lib/ramaze/adapter/webrick.rb +13 -22
- data/lib/ramaze/cache.rb +36 -10
- data/lib/ramaze/cache/memcached.rb +3 -2
- data/lib/ramaze/contrib.rb +1 -1
- data/lib/ramaze/contrib/email.rb +1 -1
- data/lib/ramaze/contrib/file_cache.rb +1 -1
- data/lib/ramaze/contrib/gems.rb +79 -0
- data/lib/ramaze/contrib/gettext/po.rb +0 -0
- data/lib/ramaze/contrib/profiling.rb +1 -1
- data/lib/ramaze/contrib/rest.rb +14 -0
- data/lib/ramaze/controller.rb +45 -12
- data/lib/ramaze/controller/error.rb +4 -4
- data/lib/ramaze/controller/resolve.rb +61 -42
- data/lib/ramaze/current.rb +2 -2
- data/lib/ramaze/current/request.rb +25 -2
- data/lib/ramaze/current/response.rb +8 -0
- data/lib/ramaze/current/session.rb +64 -36
- data/lib/ramaze/current/session/flash.rb +14 -2
- data/lib/ramaze/current/session/hash.rb +3 -2
- data/lib/ramaze/dispatcher.rb +25 -12
- data/lib/ramaze/dispatcher/action.rb +12 -3
- data/lib/ramaze/dispatcher/directory.rb +4 -1
- data/lib/ramaze/dispatcher/error.rb +3 -3
- data/lib/ramaze/dispatcher/file.rb +11 -3
- data/lib/ramaze/gestalt.rb +1 -1
- data/lib/ramaze/helper.rb +17 -21
- data/lib/ramaze/helper/aspect.rb +20 -14
- data/lib/ramaze/helper/auth.rb +1 -1
- data/lib/ramaze/helper/cache.rb +3 -6
- data/lib/ramaze/helper/cgi.rb +6 -2
- data/lib/ramaze/helper/flash.rb +7 -7
- data/lib/ramaze/helper/form.rb +281 -0
- data/lib/ramaze/helper/formatting.rb +76 -0
- data/lib/ramaze/helper/gestalt.rb +15 -0
- data/lib/ramaze/helper/gravatar.rb +15 -0
- data/lib/ramaze/helper/httpdigest.rb +48 -0
- data/lib/ramaze/helper/identity.rb +87 -62
- data/lib/ramaze/helper/partial.rb +11 -2
- data/lib/ramaze/helper/redirect.rb +12 -3
- data/lib/ramaze/helper/rest.rb +43 -0
- data/lib/ramaze/helper/sendfile.rb +1 -3
- data/lib/ramaze/helper/sequel.rb +3 -0
- data/lib/ramaze/helper/simple_captcha.rb +31 -0
- data/lib/ramaze/helper/stack.rb +14 -5
- data/lib/ramaze/helper/user.rb +86 -34
- data/lib/ramaze/helper/xhtml.rb +23 -0
- data/lib/ramaze/log.rb +1 -2
- data/lib/ramaze/log/analogger.rb +24 -19
- data/lib/ramaze/log/growl.rb +24 -19
- data/lib/ramaze/log/hub.rb +25 -22
- data/lib/ramaze/log/informer.rb +104 -99
- data/lib/ramaze/log/knotify.rb +17 -12
- data/lib/ramaze/log/logger.rb +14 -8
- data/lib/ramaze/log/logging.rb +63 -60
- data/lib/ramaze/log/syslog.rb +24 -19
- data/lib/ramaze/log/xosd.rb +77 -71
- data/lib/ramaze/option.rb +153 -0
- data/lib/ramaze/option/dsl.rb +45 -0
- data/lib/ramaze/option/holder.rb +153 -0
- data/lib/ramaze/option/merger.rb +108 -0
- data/lib/ramaze/route.rb +15 -2
- data/lib/ramaze/setup.rb +50 -0
- data/lib/ramaze/snippets/binding/locals.rb +1 -1
- data/lib/ramaze/snippets/dictionary.rb +3 -3
- data/lib/ramaze/snippets/divide.rb +7 -7
- data/lib/ramaze/snippets/kernel/__dir__.rb +1 -1
- data/lib/ramaze/snippets/kernel/acquire.rb +0 -5
- data/lib/ramaze/snippets/metaid.rb +1 -1
- data/lib/ramaze/snippets/numeric/filesize_format.rb +11 -5
- data/lib/ramaze/snippets/object/instance_variable_defined.rb +8 -0
- data/lib/ramaze/snippets/object/scope.rb +1 -1
- data/lib/ramaze/snippets/object/thread_accessor.rb +1 -1
- data/lib/ramaze/snippets/ordered_set.rb +5 -1
- data/lib/ramaze/snippets/ramaze/deprecated.rb +7 -0
- data/lib/ramaze/snippets/ramaze/thread_accessor.rb +15 -1
- data/lib/ramaze/snippets/string/esc.rb +2 -2
- data/lib/ramaze/snippets/string/start_with.rb +1 -0
- data/lib/ramaze/snippets/string/unindent.rb +9 -1
- data/lib/ramaze/snippets/struct/values_at.rb +17 -1
- data/lib/ramaze/snippets/thread/into.rb +1 -1
- data/lib/ramaze/sourcereload.rb +83 -76
- data/lib/ramaze/spec/helper.rb +39 -26
- data/lib/ramaze/spec/helper/bacon.rb +5 -5
- data/lib/ramaze/spec/helper/mock_http.rb +1 -7
- data/lib/ramaze/spec/helper/pretty_output.rb +10 -2
- data/lib/ramaze/spec/helper/requester.rb +14 -0
- data/lib/ramaze/template.rb +6 -3
- data/lib/ramaze/template/amrita2.rb +1 -0
- data/lib/ramaze/template/erubis.rb +7 -1
- data/lib/ramaze/template/ezamar/render_partial.rb +1 -1
- data/lib/ramaze/template/nagoro.rb +1 -0
- data/lib/ramaze/template/redcloth.rb +1 -0
- data/lib/ramaze/template/tagz.rb +8 -8
- data/lib/ramaze/template/tenjin.rb +42 -2
- data/lib/ramaze/template/xslt.rb +4 -0
- data/lib/ramaze/tool/daemonize.rb +37 -0
- data/lib/ramaze/tool/localize.rb +142 -106
- data/lib/ramaze/version.rb +2 -10
- data/rake_tasks/conf.rake +11 -13
- data/rake_tasks/gem.rake +59 -37
- data/rake_tasks/git.rake +41 -0
- data/rake_tasks/maintenance.rake +263 -299
- data/rake_tasks/release.rake +63 -0
- data/rake_tasks/spec.rake +1 -1
- data/ramaze.gemspec +731 -0
- data/spec/contrib/profiling.rb +5 -2
- data/spec/examples/caching.rb +1 -1
- data/spec/examples/css.rb +1 -1
- data/spec/examples/element.rb +1 -1
- data/spec/examples/hello.rb +1 -1
- data/spec/examples/linking.rb +1 -1
- data/spec/examples/simple.rb +1 -1
- data/spec/examples/simple_auth.rb +1 -1
- data/spec/ramaze/action/cache.rb +58 -14
- data/spec/ramaze/action/file_cache.rb +48 -0
- data/spec/ramaze/action/layout.rb +2 -2
- data/spec/ramaze/action/render.rb +1 -2
- data/spec/ramaze/action/{template → view}/bar.xhtml +0 -0
- data/spec/ramaze/action/{template → view}/instancevars/layout.xhtml +0 -0
- data/spec/ramaze/action/{template → view}/other_wrapper.xhtml +0 -0
- data/spec/ramaze/action/{template → view}/single_wrapper.xhtml +0 -0
- data/spec/ramaze/action/{template → view}/sub/sub_wrapper.xhtml +0 -0
- data/spec/ramaze/adapter.rb +29 -2
- data/spec/ramaze/adapter/ebb.rb +12 -0
- data/spec/ramaze/cache.rb +82 -15
- data/spec/ramaze/controller.rb +6 -3
- data/spec/ramaze/controller/actionless_templates.rb +2 -2
- data/spec/ramaze/controller/resolve.rb +1 -1
- data/spec/ramaze/controller/template_resolving.rb +4 -6
- data/spec/ramaze/controller/{template → view}/greet.xhtml +0 -0
- data/spec/ramaze/controller/{template → view}/list.xhtml +0 -0
- data/spec/ramaze/controller/{template → view}/other/greet/other.xhtml +0 -0
- data/spec/ramaze/controller/{template → view}/other_wrapper.xhtml +0 -0
- data/spec/ramaze/error.rb +1 -1
- data/spec/ramaze/helper/aspect.rb +4 -4
- data/spec/ramaze/helper/cache.rb +56 -39
- data/spec/ramaze/helper/flash.rb +14 -1
- data/spec/ramaze/helper/form.rb +118 -0
- data/spec/ramaze/helper/formatting.rb +21 -0
- data/spec/ramaze/helper/link.rb +2 -2
- data/spec/ramaze/helper/pager.rb +2 -2
- data/spec/ramaze/helper/partial.rb +13 -1
- data/spec/ramaze/helper/simple_captcha.rb +22 -0
- data/spec/ramaze/helper/user.rb +7 -10
- data/spec/ramaze/helper/{template → view}/locals.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/loop.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/num.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/partial.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/recursive.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/recursive_local_ivars.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/recursive_locals.xhtml +0 -0
- data/spec/ramaze/helper/{template → view}/test_template.xhtml +0 -0
- data/spec/ramaze/localize.rb +22 -0
- data/spec/ramaze/log/informer.rb +10 -10
- data/spec/ramaze/log/syslog.rb +1 -1
- data/spec/ramaze/request.rb +13 -1
- data/spec/ramaze/request/ebb.rb +9 -0
- data/spec/ramaze/rewrite.rb +36 -0
- data/spec/ramaze/rewrite/file.css +1 -0
- data/spec/ramaze/route.rb +1 -0
- data/spec/ramaze/template.rb +5 -5
- data/spec/ramaze/template/amrita2.rb +1 -1
- data/spec/ramaze/template/builder.rb +18 -22
- data/spec/ramaze/template/erubis.rb +1 -1
- data/spec/ramaze/template/ezamar.rb +1 -1
- data/spec/ramaze/template/haml.rb +2 -2
- data/spec/ramaze/template/liquid.rb +1 -1
- data/spec/ramaze/template/markaby.rb +1 -1
- data/spec/ramaze/template/nagoro.rb +1 -1
- data/spec/ramaze/template/redcloth.rb +1 -1
- data/spec/ramaze/template/remarkably.rb +1 -1
- data/spec/ramaze/template/sass.rb +1 -1
- data/spec/ramaze/template/tagz.rb +1 -1
- data/spec/ramaze/template/tenjin.rb +4 -6
- data/spec/ramaze/template/xslt.rb +1 -1
- data/spec/snippets/string/unindent.rb +6 -0
- data/spec/snippets/struct/values_at.rb +8 -0
- metadata +522 -487
- data/doc/ProjectInfo +0 -53
- data/doc/migrate/1110_to_1111.txt +0 -131
- data/lib/ramaze/contrib/route.rb +0 -22
- data/lib/ramaze/global.rb +0 -116
- data/lib/ramaze/global/dsl.rb +0 -39
- data/lib/ramaze/global/globalstruct.rb +0 -147
- data/lib/ramaze/helper/inform.rb +0 -40
- data/lib/ramaze/inform.rb +0 -4
- data/lib/ramaze/snippets/kernel/aquire.rb +0 -1
- data/lib/vendor/bacon.rb +0 -323
- data/rake_tasks/darcs.rake +0 -5
- data/spec/contrib/route.rb +0 -36
@@ -1,7 +1,7 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
|
4
|
+
# About Ramaze
|
5
5
|
|
6
6
|
Ramaze is a very simple and straight-forward web-framework.
|
7
7
|
The philosophy of it could be expressed in a mix of KISS and POLS, trying to
|
@@ -23,7 +23,7 @@ provides this feature at a better level without trying to enforce any structural
|
|
23
23
|
layout of the resulting framework.
|
24
24
|
|
25
25
|
|
26
|
-
|
26
|
+
# Features Overview
|
27
27
|
|
28
28
|
Ramaze offers following features at the moment:
|
29
29
|
|
@@ -175,7 +175,7 @@ Ramaze offers following features at the moment:
|
|
175
175
|
* Custom sophisticated Error-handling
|
176
176
|
|
177
177
|
|
178
|
-
|
178
|
+
# Basic Principles
|
179
179
|
|
180
180
|
There are some basic principles that Ramaze tries to follow:
|
181
181
|
|
@@ -235,57 +235,103 @@ There are some basic principles that Ramaze tries to follow:
|
|
235
235
|
deciding whether the changes the patch applies are valid and don't break the framework.
|
236
236
|
|
237
237
|
|
238
|
-
|
238
|
+
# Installation
|
239
239
|
|
240
240
|
* via RubyGems
|
241
241
|
|
242
|
-
The simplest way of installing Ramaze is via
|
242
|
+
The simplest way of installing Ramaze is via the gem.
|
243
243
|
|
244
|
-
|
244
|
+
[Rubygems](http://rubygems.org) is the package manager for ruby apps and
|
245
|
+
libraries and provides you with the last tagged version of Ramaze.
|
245
246
|
|
246
|
-
|
247
|
+
$ gem install ramaze
|
247
248
|
|
249
|
+
Versions are made as we see fit and get an announcment out (usually that's
|
250
|
+
the major obstacle as there is a lot to announce).
|
248
251
|
|
249
|
-
|
252
|
+
If you want to install the nightly gem of Ramaze you can do this with:
|
253
|
+
|
254
|
+
$ gem install ramaze --source=http://gem.ramaze.net/
|
255
|
+
|
256
|
+
We also use the gem building process on github, which locates gems at
|
257
|
+
http://gems.github.com - so you can get a version from there as well:
|
258
|
+
|
259
|
+
$ gem install manveru-ramaze --source=http://gems.github.com/
|
260
|
+
|
261
|
+
* via git
|
250
262
|
|
251
263
|
To get the latest and sweetest, you can just pull from the repository and run
|
252
264
|
Ramaze that way.
|
253
265
|
|
254
|
-
|
266
|
+
$ git clone git://github.com/manveru/ramaze.git
|
255
267
|
|
256
|
-
Please read the man
|
268
|
+
Please read the `man git` or `git help` for more information about updating
|
257
269
|
and creating your own patches.
|
258
|
-
This is at the moment the premier way to use Ramaze, since it is the way I
|
259
|
-
it.
|
270
|
+
This is at the moment the premier way to use Ramaze, since it is the way I
|
271
|
+
use it.
|
272
|
+
|
273
|
+
Some hints for the usage of Git.
|
274
|
+
|
275
|
+
* use `require 'ramaze'` from everywhere
|
276
|
+
|
277
|
+
Simply add the path to your repository to the RUBYLIB environment variable.
|
278
|
+
If you are using bash you can simply put following line into your .bashrc:
|
279
|
+
|
280
|
+
$ export RUBYLIB="$HOME/path/to/repo/lib/"
|
281
|
+
|
282
|
+
Of course you should put the real path instead, you can also add multiple
|
283
|
+
paths, or create your personal `site_ruby`:
|
284
|
+
|
285
|
+
$ export RUBYLIB="$HOME/ruby/ramaze/lib:$HOME/.site_ruby:$HOME/ruby/bacon/lib"
|
286
|
+
|
287
|
+
* use `require 'ramaze'` systemwide from everywhere
|
288
|
+
|
289
|
+
add a file to your `site_ruby` directory named 'ramaze.rb'
|
290
|
+
the content should be: `require '/path/to/git/repo/ramaze/lib/ramaze'`
|
291
|
+
|
292
|
+
* Pull the latest version
|
293
|
+
|
294
|
+
$ git pull
|
295
|
+
|
296
|
+
* Reset the repo to original state (if you screw up something)
|
297
|
+
|
298
|
+
$ git reset --hard # resets the whole repo
|
299
|
+
|
300
|
+
* Revert changes to (for example) lib/ramaze.rb only
|
260
301
|
|
261
|
-
|
302
|
+
$ git checkout master lib/ramaze.rb
|
262
303
|
|
263
|
-
*
|
304
|
+
* Add and commit all changes.
|
264
305
|
|
265
|
-
|
266
|
-
the content should be: "require '/path/to/darcs/repo/ramaze/lib/ramaze'"
|
306
|
+
$ git commit -a
|
267
307
|
|
268
|
-
*
|
308
|
+
* Adding only specific changes.
|
269
309
|
|
270
|
-
|
310
|
+
# Add hunks you want to commit to the staging area (index)
|
311
|
+
$ git add -p
|
271
312
|
|
272
|
-
*
|
313
|
+
* Commit the changes into the history of your repository
|
273
314
|
|
274
|
-
|
315
|
+
# Create a commit from the hunks added
|
316
|
+
$ git commit
|
275
317
|
|
276
318
|
* output your patches into a bundle ready to be mailed (compress it before
|
277
319
|
sending to make sure it arrives in the way you sent it)
|
278
320
|
|
279
|
-
|
280
|
-
|
321
|
+
At the end of this process you will have a tar.bz2 for all your changes
|
322
|
+
that you can mail to ramaze@googlegroups.com
|
281
323
|
|
324
|
+
# make sure you are on latest revision to avoid conflicts
|
325
|
+
$ git pull
|
282
326
|
|
283
|
-
|
327
|
+
# create 00xx-blah.patch files against the remote repo
|
328
|
+
$ git format-patch origin/HEAD
|
284
329
|
|
285
|
-
|
330
|
+
# From here on you can use either git-send-email or go the manual route
|
331
|
+
$ tar -cjf ramaze_bundle.tar.bz2 *.patch
|
286
332
|
|
287
333
|
|
288
|
-
|
334
|
+
# Getting Started
|
289
335
|
|
290
336
|
Now that you have a vague idea of what you're about to get into you might just
|
291
337
|
want to get a way to get up and running ASAP.
|
@@ -307,7 +353,7 @@ Some places to get started are:
|
|
307
353
|
|
308
354
|
|
309
355
|
|
310
|
-
|
356
|
+
# A couple of Examples
|
311
357
|
|
312
358
|
There are some examples for your instant pleasure inside the examples-directory
|
313
359
|
in the Ramaze-distribution.
|
@@ -340,16 +386,16 @@ Examples include:
|
|
340
386
|
Not yet fully functional, but coming along.
|
341
387
|
|
342
388
|
* examples/whywiki
|
343
|
-
A basic examples of a minimalistic application, based on the Wiki of _why in
|
389
|
+
A basic examples of a minimalistic application, based on the Wiki of \_why in
|
344
390
|
his camping-framework.
|
345
391
|
|
346
392
|
* examples/templates
|
347
393
|
examples of real usage of the templating-engines. Tries to implement the same
|
348
|
-
functionality in each template_*.rb file using a different engine.
|
394
|
+
functionality in each `template_*.rb` file using a different engine.
|
349
395
|
|
350
396
|
|
351
397
|
|
352
|
-
|
398
|
+
# How to find Help
|
353
399
|
|
354
400
|
For help you can:
|
355
401
|
|
@@ -358,7 +404,7 @@ For help you can:
|
|
358
404
|
- Join the Mailinglist at http://ramaze.rubyforge.org
|
359
405
|
|
360
406
|
|
361
|
-
|
407
|
+
# Appendix
|
362
408
|
|
363
409
|
* Performance
|
364
410
|
* Serving
|
@@ -372,7 +418,7 @@ For help you can:
|
|
372
418
|
Also, using MemCache gives you high-end performance and security.
|
373
419
|
|
374
420
|
|
375
|
-
|
421
|
+
# And thanks to...
|
376
422
|
|
377
423
|
There is a large number of people who made Ramaze possibe by their ongoing
|
378
424
|
efforts in the world of open source and by encouraging and helping me.
|
data/Rakefile
CHANGED
@@ -8,23 +8,28 @@ require 'rake/clean'
|
|
8
8
|
require 'rake/packagetask'
|
9
9
|
require 'rake/gempackagetask'
|
10
10
|
require 'rake/rdoctask'
|
11
|
-
|
12
|
-
require 'time'
|
11
|
+
|
13
12
|
require 'pp'
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
require 'fileutils'
|
16
|
+
|
14
17
|
include FileUtils
|
15
18
|
|
16
19
|
$:.unshift File.join(File.dirname(__FILE__), "lib")
|
17
20
|
|
18
21
|
require 'ramaze/version'
|
19
22
|
load 'rake_tasks/conf.rake'
|
20
|
-
load 'rake_tasks/gem.rake'
|
21
23
|
load 'rake_tasks/maintenance.rake'
|
22
24
|
load 'rake_tasks/spec.rake'
|
23
25
|
load 'rake_tasks/coverage.rake'
|
26
|
+
load 'rake_tasks/release.rake'
|
27
|
+
load 'rake_tasks/git.rake'
|
28
|
+
load 'rake_tasks/gem.rake'
|
24
29
|
|
25
|
-
task :default => ['spec']
|
26
|
-
task :test => ['spec']
|
27
|
-
task :package => ['jquery']
|
30
|
+
# task :default => ['spec']
|
31
|
+
# task :test => ['spec']
|
32
|
+
# task :package => ['jquery']
|
28
33
|
|
29
34
|
desc 'download latest jquery and put in /lib/proto/public/js/jquery.js'
|
30
35
|
task :jquery do
|
@@ -42,35 +47,6 @@ task :jquery do
|
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
45
|
-
desc "sanitize the code and darcs record"
|
46
|
-
task :record => ['fix-end-spaces', 'add-copyright'] do
|
47
|
-
sh "darcs record"
|
48
|
-
end
|
49
|
-
|
50
|
-
desc "create the doc/changes.xml"
|
51
|
-
task 'changes-xml' do
|
52
|
-
File.open('doc/changes.xml', 'w+') do |f|
|
53
|
-
f.print(`darcs changes --xml`)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
desc "create the doc/changes.txt"
|
58
|
-
task 'changes-text' do
|
59
|
-
File.open('doc/changes.txt', 'w+') do |f|
|
60
|
-
f.print(`darcs changes --human-readable`)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
desc "create both doc/changes.txt and doc/changes.xml"
|
65
|
-
task :changes => ['changes-xml', 'changes-text'] do
|
66
|
-
puts(`darcs changes`.split("\n").first(25))
|
67
|
-
end
|
68
|
-
|
69
|
-
desc "copy the doc/changes.txt to doc/CHANGELOG"
|
70
|
-
task :changelog => :changes do
|
71
|
-
cp 'doc/changes.txt', 'doc/CHANGELOG'
|
72
|
-
end
|
73
|
-
|
74
50
|
task :rcov_dir do
|
75
51
|
mkdir_p 'doc/output/tools/rcov/'
|
76
52
|
end
|
@@ -101,7 +77,7 @@ desc "create bzip2 and tarball"
|
|
101
77
|
task :distribute => :gem do
|
102
78
|
sh "rm -rf pkg/ramaze-#{VERS}"
|
103
79
|
sh "mkdir -p pkg/ramaze-#{VERS}"
|
104
|
-
sh "cp -r {bin,doc,lib,examples,spec,Rakefile,rake_tasks} pkg/ramaze-#{VERS}/"
|
80
|
+
sh "cp -r {bin,doc,lib,examples,spec,Rakefile,README.markdown,rake_tasks} pkg/ramaze-#{VERS}/"
|
105
81
|
|
106
82
|
Dir.chdir('pkg') do |pwd|
|
107
83
|
sh "tar -zcvf ramaze-#{VERS}.tar.gz ramaze-#{VERS}"
|
@@ -158,20 +134,6 @@ task 'request' do
|
|
158
134
|
end
|
159
135
|
end
|
160
136
|
|
161
|
-
desc "runs all the testdocs (not functional yet)"
|
162
|
-
task "testdoc" do
|
163
|
-
require '../testdoc/lib/testdoc'
|
164
|
-
Dir['lib/ramaze/helper/*.rb'].each do |file|
|
165
|
-
p file
|
166
|
-
begin
|
167
|
-
require file
|
168
|
-
TestDoc.rspec_run(file)
|
169
|
-
rescue Object => ex
|
170
|
-
puts ex
|
171
|
-
end
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
137
|
desc 'listing of available traits per class/module'
|
176
138
|
task 'traits' do
|
177
139
|
nodes = Hash.new{|h,k| h[k] = []}
|
@@ -193,3 +155,44 @@ task 'traits' do
|
|
193
155
|
puts
|
194
156
|
end
|
195
157
|
end
|
158
|
+
|
159
|
+
desc "Update doc/CHANGELOG"
|
160
|
+
task 'doc/CHANGELOG' do
|
161
|
+
File.open('doc/CHANGELOG', 'w+') do |f|
|
162
|
+
f.puts `git log`
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
desc "#{README} to doc/README.html"
|
167
|
+
task 'doc/README.html' => [README] do
|
168
|
+
sh "maruku #{README}"
|
169
|
+
mv 'README.html', 'doc/README.html'
|
170
|
+
end
|
171
|
+
|
172
|
+
desc "Compile the #{README} from the parts of doc/readme"
|
173
|
+
task README do
|
174
|
+
require 'enumerator'
|
175
|
+
|
176
|
+
chapters = [
|
177
|
+
'About Ramaze', 'introduction',
|
178
|
+
'Features Overview', 'features',
|
179
|
+
'Basic Principles', 'principles',
|
180
|
+
'Installation', 'installing',
|
181
|
+
'Getting Started', 'getting_started',
|
182
|
+
'A couple of Examples', 'examples',
|
183
|
+
'How to find Help', 'getting_help',
|
184
|
+
'Appendix', 'appendix',
|
185
|
+
'And thanks to...', 'thanks',
|
186
|
+
]
|
187
|
+
|
188
|
+
File.open(README, 'w+') do |readme|
|
189
|
+
readme.puts COPYRIGHT.map{|l| l[1..-1]}, ''
|
190
|
+
|
191
|
+
chapters.each_slice(2) do |title, file|
|
192
|
+
file = File.join('doc', 'readme_chunks', "#{file}.txt")
|
193
|
+
chapter = File.read(file)
|
194
|
+
readme.puts "# #{title}", '', chapter
|
195
|
+
readme.puts '', '' unless title == chapters[-2]
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
====== simple ======
|
2
|
+
<code ruby>
|
3
|
+
require 'ramaze'
|
4
|
+
|
5
|
+
class MainController < Ramaze::Controller
|
6
|
+
def index
|
7
|
+
"Hello, World!"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
</code>
|
11
|
+
|
12
|
+
=== webrick ===
|
13
|
+
Mem usage before: 20.32MB
|
14
|
+
Time taken for tests: 7.747022 seconds
|
15
|
+
Failed requests: 0
|
16
|
+
Requests per second: 129.08 [#/sec] (mean)
|
17
|
+
Time per request: 77.470 [ms] (mean)
|
18
|
+
Time per request: 7.747 [ms] (mean, across all concurrent requests)
|
19
|
+
Mem usage after: 25.43MB
|
20
|
+
|
21
|
+
=== mongrel ===
|
22
|
+
Mem usage before: 20.25MB
|
23
|
+
Time taken for tests: 2.205161 seconds
|
24
|
+
Failed requests: 0
|
25
|
+
Requests per second: 453.48 [#/sec] (mean)
|
26
|
+
Time per request: 22.052 [ms] (mean)
|
27
|
+
Time per request: 2.205 [ms] (mean, across all concurrent requests)
|
28
|
+
Mem usage after: 21.91MB
|
29
|
+
|
30
|
+
=== evented_mongrel ===
|
31
|
+
Mem usage before: 22.64MB
|
32
|
+
Time taken for tests: 1.311583 seconds
|
33
|
+
Failed requests: 0
|
34
|
+
Requests per second: 762.44 [#/sec] (mean)
|
35
|
+
Time per request: 13.116 [ms] (mean)
|
36
|
+
Time per request: 1.312 [ms] (mean, across all concurrent requests)
|
37
|
+
Mem usage after: 27.03MB
|
38
|
+
|
39
|
+
====== no_template ======
|
40
|
+
<code ruby>
|
41
|
+
require 'ramaze'
|
42
|
+
|
43
|
+
class MainController < Ramaze::Controller
|
44
|
+
engine :None
|
45
|
+
|
46
|
+
def index
|
47
|
+
"Hello, World!"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
</code>
|
51
|
+
|
52
|
+
=== evented_mongrel ===
|
53
|
+
Mem usage before: 22.63MB
|
54
|
+
Time taken for tests: 1.151947 seconds
|
55
|
+
Failed requests: 0
|
56
|
+
Requests per second: 868.10 [#/sec] (mean)
|
57
|
+
Time per request: 11.519 [ms] (mean)
|
58
|
+
Time per request: 1.152 [ms] (mean, across all concurrent requests)
|
59
|
+
Mem usage after: 27.11MB
|
60
|
+
|
61
|
+
====== no_informer ======
|
62
|
+
<code ruby>
|
63
|
+
require 'ramaze'
|
64
|
+
|
65
|
+
class MainController < Ramaze::Controller
|
66
|
+
def index
|
67
|
+
"Hello, World!"
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
Ramaze::Inform.loggers = []
|
72
|
+
</code>
|
73
|
+
|
74
|
+
=== evented_mongrel ===
|
75
|
+
Mem usage before: 22.63MB
|
76
|
+
Time taken for tests: 1.202878 seconds
|
77
|
+
Failed requests: 0
|
78
|
+
Requests per second: 831.34 [#/sec] (mean)
|
79
|
+
Time per request: 12.029 [ms] (mean)
|
80
|
+
Time per request: 1.203 [ms] (mean, across all concurrent requests)
|
81
|
+
Mem usage after: 27.07MB
|
82
|
+
|
83
|
+
====== no_sessions ======
|
84
|
+
<code ruby>
|
85
|
+
require 'ramaze'
|
86
|
+
|
87
|
+
class MainController < Ramaze::Controller
|
88
|
+
def index
|
89
|
+
"Hello, World!"
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
Ramaze::Inform.loggers = []
|
94
|
+
Ramaze::Global.sessions = false
|
95
|
+
</code>
|
96
|
+
|
97
|
+
=== evented_mongrel ===
|
98
|
+
Mem usage before: 22.63MB
|
99
|
+
Time taken for tests: 0.835254 seconds
|
100
|
+
Failed requests: 0
|
101
|
+
Requests per second: 1197.24 [#/sec] (mean)
|
102
|
+
Time per request: 8.353 [ms] (mean)
|
103
|
+
Time per request: 0.835 [ms] (mean, across all concurrent requests)
|
104
|
+
Mem usage after: 26.38MB
|
105
|
+
|
106
|
+
====== minimal ======
|
107
|
+
<code ruby>
|
108
|
+
require 'ramaze'
|
109
|
+
|
110
|
+
class MainController < Ramaze::Controller
|
111
|
+
engine :None
|
112
|
+
|
113
|
+
def index
|
114
|
+
"Hello, World!"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
Ramaze::Global.sourcereload = false
|
119
|
+
Ramaze::Global.sessions = false
|
120
|
+
Ramaze::Inform.loggers = []
|
121
|
+
</code>
|
122
|
+
|
123
|
+
=== evented_mongrel ===
|
124
|
+
Mem usage before: 22.62MB
|
125
|
+
Time taken for tests: 0.647273 seconds
|
126
|
+
Failed requests: 0
|
127
|
+
Requests per second: 1544.94 [#/sec] (mean)
|
128
|
+
Time per request: 6.473 [ms] (mean)
|
129
|
+
Time per request: 0.647 [ms] (mean, across all concurrent requests)
|
130
|
+
Mem usage after: 26.42MB
|
131
|
+
|