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
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'ramaze'
|
3
|
+
|
4
|
+
require 'model/history'
|
5
|
+
require 'model/message'
|
6
|
+
|
7
|
+
class MainController < Ramaze::Controller
|
8
|
+
HISTORY = History.new
|
9
|
+
|
10
|
+
layout '/layout'
|
11
|
+
|
12
|
+
def index
|
13
|
+
if request.post?
|
14
|
+
session[:nick] = request[:nick]
|
15
|
+
redirect Rs(:chat)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def chat
|
20
|
+
redirect Rs(:/) unless session[:nick]
|
21
|
+
end
|
22
|
+
|
23
|
+
def say
|
24
|
+
if nick = session[:nick] and text = request['text']
|
25
|
+
HISTORY.write(nick, text)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def listen
|
30
|
+
respond HISTORY.to_html
|
31
|
+
end
|
32
|
+
|
33
|
+
[ "Hello, World!",
|
34
|
+
"My name is manveru",
|
35
|
+
"I welcome you to my realm",
|
36
|
+
"The unique and most awesome examples/chat.rb!",
|
37
|
+
].each{|text| HISTORY.write('manveru', text) }
|
38
|
+
end
|
39
|
+
|
40
|
+
Ramaze.start :middleware => true, :adapter => :thin
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
+
<head>
|
5
|
+
<title>Chat</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="/css/chat.css" />
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
#@content
|
10
|
+
<script type="text/javascript" src="/js/jquery.js"></script>
|
11
|
+
<script type="text/javascript" src="/js/chat.js"></script>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'ramaze'
|
3
|
+
|
4
|
+
# require YAML based localization
|
5
|
+
require 'ramaze/tool/localize'
|
6
|
+
|
7
|
+
# Activate localization
|
8
|
+
# Setup localization options
|
9
|
+
class Ramaze::Tool::Localize
|
10
|
+
Ramaze::Dispatcher::Action::FILTER << self
|
11
|
+
|
12
|
+
trait :default_language => 'en',
|
13
|
+
:languages => %w[ en ja cn es de it ],
|
14
|
+
:file => lambda{|l| Ramaze::Global.root/"locale/#{l}.yaml" }
|
15
|
+
# alternative, problematic if you want to run from another pwd.
|
16
|
+
# :file => "locale/%s.yaml"
|
17
|
+
end
|
18
|
+
|
19
|
+
class MainController < Ramaze::Controller
|
20
|
+
def index
|
21
|
+
# Enclose the strings that have to be localized with [[]]
|
22
|
+
# This works with any templating engine.
|
23
|
+
"<h1>[[hello world]]</h1>
|
24
|
+
<p>[[just for fun]]</p>
|
25
|
+
<a href='/locale/en'>[[English]]</a><br />
|
26
|
+
<a href='/locale/de'>[[German]]</a><br />
|
27
|
+
"
|
28
|
+
end
|
29
|
+
|
30
|
+
def locale(name)
|
31
|
+
session[:LOCALE] = name
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
Ramaze.start
|
@@ -9,7 +9,8 @@ require 'start'
|
|
9
9
|
describe 'Rammit' do
|
10
10
|
behaves_like 'http'
|
11
11
|
base = File.expand_path(__DIR__/'..')
|
12
|
-
ramaze :
|
12
|
+
ramaze :view_root => base/'template',
|
13
|
+
:public_root => base/'public'
|
13
14
|
|
14
15
|
it 'should have intro page' do
|
15
16
|
got = get('/')
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -13,7 +13,7 @@ class PasteController < Ramaze::Controller
|
|
13
13
|
deny_layout :plain, :save_theme
|
14
14
|
|
15
15
|
def list(start = 1)
|
16
|
-
ordered = Paste.order(:created.
|
16
|
+
ordered = Paste.order(:created.desc)
|
17
17
|
@paginated = ordered.paginate(start.to_i, 10)
|
18
18
|
@pager = paginator(@paginated, '/list')
|
19
19
|
@pastes = @paginated
|
@@ -23,7 +23,7 @@ class PasteController < Ramaze::Controller
|
|
23
23
|
def search
|
24
24
|
if needle = request['substring'] and not needle.empty?
|
25
25
|
limit = 50
|
26
|
-
@pastes = Paste.where( "text LIKE '%' || ? || '%'", request[ 'substring' ] ).limit( limit ).order( :created.
|
26
|
+
@pastes = Paste.where( "text LIKE '%' || ? || '%'", request[ 'substring' ] ).limit( limit ).order( :created.desc ).all
|
27
27
|
@hit_limit = ( @pastes.size == limit )
|
28
28
|
@style = session[ :theme ] || STYLE
|
29
29
|
end
|
@@ -51,7 +51,7 @@ class PasteController < Ramaze::Controller
|
|
51
51
|
@syntax = @paste.syntax_name
|
52
52
|
@formatted = @paste.view(format, style)
|
53
53
|
|
54
|
-
ordered = Paste.order(:created.
|
54
|
+
ordered = Paste.order(:created.desc)
|
55
55
|
@paginated = ordered.paginate(id.to_i, 1)
|
56
56
|
@pager = paginator(@paginated, '/')
|
57
57
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -8,8 +8,8 @@ require 'start'
|
|
8
8
|
|
9
9
|
describe 'RaPaste' do
|
10
10
|
behaves_like 'http'
|
11
|
-
ramaze :public_root
|
12
|
-
:
|
11
|
+
ramaze :public_root => base/:public,
|
12
|
+
:view_root => base/:view
|
13
13
|
|
14
14
|
it 'should show an empty list on the list page' do
|
15
15
|
page = get('/list')
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,7 +4,7 @@ require 'coderay'
|
|
4
4
|
require 'ramaze'
|
5
5
|
|
6
6
|
# where is the source
|
7
|
-
RAMAZE_SRC = File.expand_path(Ramaze::BASEDIR/'../
|
7
|
+
RAMAZE_SRC = File.expand_path(Ramaze::BASEDIR/'../') unless defined? RAMAZE_SRC
|
8
8
|
|
9
9
|
# delete cached filetree when source changes
|
10
10
|
module Ramaze::SourceReloadHooks
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -24,8 +24,8 @@ describe 'WikiController' do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'should start' do
|
27
|
-
ramaze :public_root
|
28
|
-
:
|
27
|
+
ramaze :public_root => base/:public,
|
28
|
+
:view_root => base/:template
|
29
29
|
get('/').status.should == 303
|
30
30
|
end
|
31
31
|
|
@@ -42,7 +42,7 @@ describe 'WikiController' do
|
|
42
42
|
|
43
43
|
body.at('a[@href=/]').inner_html.should == '< Home'
|
44
44
|
body.at('h1').inner_html.should == 'Edit Home'
|
45
|
-
body.at('form
|
45
|
+
body.at('form/textarea').should.not == nil
|
46
46
|
end
|
47
47
|
|
48
48
|
it 'should create pages' do
|
File without changes
|
File without changes
|
File without changes
|
@@ -8,8 +8,8 @@ require 'start'
|
|
8
8
|
|
9
9
|
describe 'Wikore' do
|
10
10
|
behaves_like 'http'
|
11
|
-
ramaze :public_root
|
12
|
-
:
|
11
|
+
ramaze :public_root => base/:public,
|
12
|
+
:view_root => base/:template
|
13
13
|
|
14
14
|
def check_redirect(to = '/')
|
15
15
|
response = yield
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -35,8 +35,8 @@ describe 'wiktacular' do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'should start' do
|
38
|
-
ramaze :public_root
|
39
|
-
:
|
38
|
+
ramaze :public_root => base/:public,
|
39
|
+
:view_root => base/:template
|
40
40
|
get('/').status.should == 200
|
41
41
|
end
|
42
42
|
|
@@ -151,8 +151,7 @@ describe 'wiktacular' do
|
|
151
151
|
a.inner_html.should == "chunky bacon"
|
152
152
|
end
|
153
153
|
|
154
|
-
|
155
|
-
WikiEntry.new(NEWPAGE).delete
|
154
|
+
should 'delete page for cleanup' do
|
155
|
+
WikiEntry.new(NEWPAGE).delete.first.should =~ /#{NEWPAGE}$/
|
156
156
|
end
|
157
|
-
|
158
157
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|