Pistos-ramaze 2009.02 → 2009.04.08
Sign up to get free protection for your applications and to get access to all the features.
- data/.mailmap +25 -0
- data/CHANGELOG +16546 -0
- data/MANIFEST +487 -0
- data/{README.md → README.markdown} +0 -5
- data/Rakefile +75 -242
- data/bin/ramaze +142 -55
- data/doc/AUTHORS +36 -28
- data/doc/FAQ +1 -1
- data/doc/tutorial/todolist.html +1415 -742
- data/doc/tutorial/todolist.txt +939 -0
- data/examples/app/auth/layout/auth.nag +25 -0
- data/examples/app/auth/start.rb +23 -0
- data/examples/app/auth/view/index.nag +4 -0
- data/examples/app/auth/view/login.nag +20 -0
- data/examples/app/auth/view/secret.nag +1 -0
- data/examples/app/blog/app.rb +69 -0
- data/{lib/proto/start.ru → examples/app/blog/config.ru} +8 -7
- data/examples/app/blog/controller/comment.rb +45 -0
- data/examples/app/blog/controller/entry.rb +76 -0
- data/examples/app/blog/controller/init.rb +86 -0
- data/examples/app/blog/controller/main.rb +16 -25
- data/examples/app/blog/controller/tag.rb +9 -0
- data/examples/app/blog/layout/default.nag +31 -0
- data/examples/app/blog/model/comment.rb +58 -0
- data/examples/app/blog/model/entry.rb +80 -28
- data/examples/app/blog/model/init.rb +10 -0
- data/examples/app/blog/model/tag.rb +36 -0
- data/examples/app/blog/public/css/screen.css +273 -0
- data/examples/app/blog/start.rb +3 -5
- data/examples/app/blog/view/comment/form.nag +10 -0
- data/examples/app/blog/view/comment/show.nag +16 -0
- data/examples/app/blog/view/entry/edit.nag +14 -0
- data/examples/app/blog/view/entry/feed.atom.nag +8 -0
- data/examples/app/blog/view/entry/feed.rss.nag +7 -0
- data/examples/app/blog/view/entry/index.nag +7 -0
- data/examples/app/blog/view/entry/new.nag +13 -0
- data/examples/app/blog/view/entry/show.nag +36 -0
- data/examples/app/blog/view/feed.atom.nag +18 -0
- data/examples/app/blog/view/feed.rss.nag +25 -0
- data/examples/app/blog/view/index.nag +6 -0
- data/examples/app/blog/view/tag/index.nag +5 -0
- data/examples/app/chat/{view/layout.xhtml → layout/default.nag} +1 -1
- data/examples/app/chat/model/history.rb +13 -11
- data/examples/app/chat/public/css/chat.css +9 -13
- data/examples/app/chat/public/js/chat.js +6 -0
- data/examples/app/chat/start.rb +16 -17
- data/examples/app/chat/view/{chat.xhtml → chat.nag} +0 -0
- data/examples/app/chat/view/{index.xhtml → index.nag} +0 -0
- data/examples/app/sourceview/{sourceview.rb → start.rb} +36 -34
- data/examples/app/sourceview/{template → view}/index.haml +0 -0
- data/examples/app/todolist/controller/init.rb +10 -0
- data/examples/app/todolist/controller/task.rb +39 -0
- data/examples/app/todolist/layout/default.xhtml +14 -0
- data/examples/app/todolist/model/init.rb +14 -0
- data/examples/app/todolist/model/task.rb +39 -0
- data/examples/app/todolist/public/css/screen.css +63 -0
- data/examples/app/todolist/start.rb +6 -6
- data/examples/app/todolist/view/index.xhtml +29 -0
- data/examples/basic/element.rb +5 -3
- data/examples/basic/gestalt.rb +1 -2
- data/examples/basic/hello.rb +3 -4
- data/examples/basic/layout.rb +2 -2
- data/examples/basic/linking.rb +7 -7
- data/examples/basic/partial.rb +3 -5
- data/examples/basic/simple.rb +1 -5
- data/examples/helpers/cache.rb +5 -5
- data/examples/helpers/httpdigest.rb +31 -32
- data/examples/misc/memleak_detector.rb +17 -12
- data/examples/misc/serve_directory.rb +6 -0
- data/examples/templates/template_erubis.rb +9 -10
- data/examples/templates/template_ezamar.rb +8 -7
- data/examples/templates/template_haml.rb +6 -7
- data/examples/templates/template_liquid.rb +20 -19
- data/examples/templates/template_markaby.rb +2 -3
- data/examples/templates/template_nagoro.rb +6 -7
- data/examples/templates/template_redcloth.rb +8 -9
- data/examples/templates/template_remarkably.rb +7 -8
- data/examples/templates/template_tenjin.rb +6 -7
- data/examples/templates/{template → view}/external.haml +4 -4
- data/examples/templates/{template → view}/external.liquid +0 -0
- data/examples/templates/{template → view}/external.mab +0 -0
- data/examples/templates/{template → view}/external.nag +4 -4
- data/examples/templates/{template → view}/external.redcloth +4 -4
- data/examples/templates/{template → view}/external.rem +4 -4
- data/examples/templates/{template → view}/external.rhtml +6 -6
- data/examples/templates/{template → view}/external.tenjin +4 -4
- data/examples/templates/{template → view}/external.zmr +6 -6
- data/lib/proto/config.ru +17 -0
- data/lib/proto/controller/init.rb +2 -2
- data/lib/proto/layout/default.xhtml +24 -0
- data/lib/proto/public/css/screen.css +30 -0
- data/lib/proto/public/js/jquery.js +2121 -1294
- data/lib/proto/spec/main.rb +8 -11
- data/lib/proto/start.rb +3 -3
- data/lib/proto/view/index.xhtml +34 -27
- data/lib/ramaze/app.rb +124 -0
- data/lib/ramaze/cache/localmemcache.rb +56 -0
- data/lib/ramaze/cache/memcache.rb +99 -0
- data/lib/ramaze/cache/sequel.rb +67 -0
- data/lib/ramaze/cache.rb +9 -104
- data/lib/ramaze/contrib/app_graph.rb +64 -0
- data/lib/ramaze/contrib/gettext/po.rb +23 -23
- data/lib/ramaze/contrib/gzip_filter.rb +1 -69
- data/lib/ramaze/contrib/rest.rb +20 -15
- data/lib/ramaze/contrib/sequel/relation.rb +4 -2
- data/lib/ramaze/controller/default.rb +12 -0
- data/lib/ramaze/controller.rb +63 -257
- data/lib/ramaze/current.rb +3 -47
- data/lib/ramaze/files.rb +24 -0
- data/lib/ramaze/gestalt.rb +6 -1
- data/lib/ramaze/helper/auth.rb +68 -104
- data/lib/ramaze/helper/bench.rb +0 -2
- data/lib/ramaze/helper/cache.rb +59 -122
- data/lib/ramaze/helper/disqus.rb +26 -0
- data/lib/ramaze/helper/flash.rb +32 -44
- data/lib/ramaze/helper/form.rb +83 -252
- data/lib/ramaze/helper/formatting.rb +30 -5
- data/lib/ramaze/helper/gestalt.rb +1 -1
- data/lib/ramaze/helper/gravatar.rb +66 -19
- data/lib/ramaze/helper/httpdigest.rb +75 -66
- data/lib/ramaze/helper/link.rb +62 -109
- data/lib/ramaze/helper/localize.rb +128 -0
- data/lib/ramaze/helper/markaby.rb +1 -1
- data/lib/ramaze/helper/maruku.rb +10 -3
- data/lib/ramaze/helper/pager.rb +2 -1
- data/lib/ramaze/helper/paginate.rb +16 -9
- data/lib/ramaze/helper/partial.rb +86 -91
- data/lib/ramaze/helper/remarkably.rb +14 -0
- data/lib/ramaze/helper/request_accessor.rb +16 -0
- data/lib/ramaze/helper/sequel_form.rb +284 -0
- data/lib/ramaze/helper/simple_captcha.rb +46 -16
- data/lib/ramaze/helper/stack.rb +64 -66
- data/lib/ramaze/helper/user.rb +141 -22
- data/lib/ramaze/helper/xhtml.rb +27 -16
- data/lib/ramaze/helper.rb +6 -81
- data/lib/ramaze/log/analogger.rb +1 -2
- data/lib/ramaze/log/informer.rb +1 -0
- data/lib/ramaze/log/logging.rb +2 -8
- data/lib/ramaze/log/syslog.rb +36 -36
- data/lib/ramaze/log.rb +19 -7
- data/lib/ramaze/middleware_compiler.rb +13 -0
- data/lib/ramaze/plugin.rb +69 -0
- data/lib/ramaze/reloader.rb +8 -6
- data/lib/ramaze/request.rb +117 -0
- data/lib/ramaze/{current/response.rb → response.rb} +9 -10
- data/lib/ramaze/setup.rb +93 -33
- data/lib/ramaze/snippets/ramaze/deprecated.rb +3 -1
- data/lib/ramaze/snippets/{dictionary.rb → ramaze/dictionary.rb} +0 -104
- data/lib/ramaze/snippets/ramaze/fiber.rb +5 -5
- data/lib/ramaze/spec/helper/bacon.rb +4 -3
- data/lib/ramaze/spec/helper/snippets.rb +3 -1
- data/lib/ramaze/spec/helper/template_examples.rb +29 -0
- data/lib/ramaze/spec.rb +37 -1
- data/lib/ramaze/tool/create.rb +1 -1
- data/lib/ramaze/version.rb +1 -4
- data/lib/ramaze/view/erubis.rb +23 -0
- data/lib/ramaze/view/ezamar.rb +23 -0
- data/lib/ramaze/view/haml.rb +15 -0
- data/lib/ramaze/view/liquid.rb +66 -0
- data/lib/ramaze/view/maruku.rb +14 -0
- data/lib/ramaze/view/nagoro/render_partial.rb +32 -0
- data/lib/ramaze/view/nagoro.rb +44 -0
- data/lib/ramaze/view/redcloth.rb +21 -0
- data/lib/ramaze/view/remarkably.rb +21 -0
- data/lib/ramaze/view/sass.rb +21 -0
- data/lib/ramaze/view/tagz.rb +63 -0
- data/lib/ramaze/view/tenjin.rb +29 -0
- data/lib/ramaze/view.rb +44 -0
- data/lib/ramaze.rb +76 -129
- data/lib/vendor/etag.rb +20 -0
- data/lib/vendor/route_exceptions.rb +48 -0
- data/ramaze.gemspec +28 -612
- data/spec/contrib/rest.rb +28 -0
- data/spec/examples/caching.rb +1 -2
- data/spec/examples/css.rb +1 -2
- data/spec/examples/element.rb +1 -2
- data/spec/examples/hello.rb +2 -3
- data/spec/examples/helpers/httpdigest.rb +89 -0
- data/spec/examples/linking.rb +1 -2
- data/spec/examples/simple.rb +1 -6
- data/spec/examples/templates/template_erubis.rb +3 -17
- data/spec/examples/templates/template_ezamar.rb +3 -18
- data/spec/examples/templates/template_haml.rb +3 -17
- data/spec/examples/templates/template_liquid.rb +3 -23
- data/spec/examples/templates/template_markaby.rb +6 -19
- data/spec/examples/templates/template_nagoro.rb +9 -0
- data/spec/examples/templates/template_redcloth.rb +3 -22
- data/spec/examples/templates/template_remarkably.rb +3 -17
- data/spec/examples/templates/template_tenjin.rb +3 -22
- data/spec/helper.rb +10 -3
- data/spec/ramaze/action/render.rb +5 -15
- data/spec/ramaze/action/view/other_wrapper.erb +1 -0
- data/spec/ramaze/action/view/sub/sub_wrapper.erb +1 -0
- data/spec/ramaze/app.rb +47 -0
- data/spec/ramaze/cache/localmemcache.rb +49 -0
- data/spec/ramaze/cache/memcache.rb +54 -0
- data/spec/ramaze/cache/sequel.rb +51 -0
- data/spec/ramaze/controller/actionless_templates.rb +14 -10
- data/spec/ramaze/controller/mapping.rb +57 -0
- data/spec/ramaze/controller/provide_inheritance.rb +47 -0
- data/spec/ramaze/controller/resolve.rb +7 -9
- data/spec/ramaze/controller/subclass.rb +13 -13
- data/spec/ramaze/controller/template_resolving.rb +21 -57
- data/spec/ramaze/dispatcher/directory.rb +38 -24
- data/spec/ramaze/dispatcher/file.rb +53 -44
- data/spec/ramaze/error.rb +56 -62
- data/spec/ramaze/files/public_1/plain.txt +1 -0
- data/spec/ramaze/files/public_2/rich.txt +1 -0
- data/spec/ramaze/files.rb +29 -0
- data/spec/ramaze/gestalt.rb +2 -4
- data/spec/ramaze/helper/auth.rb +53 -25
- data/spec/ramaze/helper/bench.rb +17 -0
- data/spec/ramaze/helper/cache.rb +38 -114
- data/spec/ramaze/helper/flash.rb +22 -110
- data/spec/ramaze/helper/form.rb +336 -98
- data/spec/ramaze/helper/formatting.rb +66 -9
- data/spec/ramaze/helper/gestalt.rb +15 -0
- data/spec/ramaze/helper/gravatar.rb +40 -0
- data/spec/ramaze/helper/httpdigest.rb +162 -0
- data/spec/ramaze/helper/link.rb +25 -100
- data/spec/ramaze/helper/localize.rb +60 -0
- data/spec/ramaze/helper/maruku.rb +19 -0
- data/spec/ramaze/helper/pager.rb +13 -16
- data/spec/ramaze/helper/paginate.rb +68 -0
- data/spec/ramaze/helper/partial.rb +23 -71
- data/spec/ramaze/helper/request_accessor.rb +19 -0
- data/spec/ramaze/helper/sequel_form.rb +89 -0
- data/spec/ramaze/helper/simple_captcha.rb +40 -13
- data/spec/ramaze/helper/stack.rb +56 -35
- data/spec/ramaze/helper/user.rb +36 -9
- data/spec/ramaze/helper/xhtml.rb +32 -0
- data/spec/ramaze/log/informer.rb +20 -19
- data/spec/ramaze/log/logging.rb +63 -0
- data/spec/ramaze/log/syslog.rb +59 -62
- data/spec/ramaze/params.rb +8 -11
- data/spec/ramaze/request.rb +45 -181
- data/spec/ramaze/view/erubis/external.rhtml +8 -0
- data/spec/ramaze/view/erubis/sum.rhtml +1 -0
- data/spec/ramaze/view/erubis.rb +73 -0
- data/spec/ramaze/view/ezamar/external.zmr +8 -0
- data/spec/ramaze/view/ezamar/sum.zmr +1 -0
- data/spec/ramaze/view/ezamar.rb +73 -0
- data/spec/ramaze/view/haml/external.haml +5 -0
- data/spec/ramaze/view/haml/sum.haml +2 -0
- data/spec/ramaze/view/haml.rb +86 -0
- data/spec/ramaze/view/liquid/external.liquid +8 -0
- data/spec/ramaze/view/liquid/sum.liquid +1 -0
- data/spec/ramaze/view/liquid.rb +73 -0
- data/spec/ramaze/view/nagoro/external.nag +8 -0
- data/spec/ramaze/view/nagoro/sum.nag +1 -0
- data/spec/ramaze/view/nagoro.rb +73 -0
- data/spec/ramaze/view/redcloth/external.redcloth +8 -0
- data/spec/ramaze/view/redcloth.rb +66 -0
- data/spec/ramaze/{template → view}/remarkably/external.rem +0 -0
- data/spec/ramaze/{template → view}/remarkably/sum.rem +0 -0
- data/spec/ramaze/view/remarkably.rb +49 -0
- data/spec/ramaze/{template → view}/sass/file.css.sass +0 -0
- data/spec/ramaze/view/sass.rb +73 -0
- data/spec/ramaze/{template → view}/tagz/external.tagz +0 -0
- data/spec/ramaze/{template → view}/tagz/sum.tagz +0 -0
- data/spec/ramaze/{template → view}/tagz.rb +18 -29
- data/spec/ramaze/view/tenjin/external.rbhtml +8 -0
- data/spec/ramaze/view/tenjin/sum.rbhtml +1 -0
- data/spec/ramaze/view/tenjin.rb +57 -0
- data/spec/ramaze/view.rb +36 -0
- data/spec/snippets/ramaze/dictionary.rb +110 -0
- data/spec/snippets/ramaze/struct.rb +12 -0
- data/spec/snippets/thread/into.rb +3 -14
- data/tasks/authors.rake +30 -0
- data/tasks/bacon.rake +66 -0
- data/tasks/changelog.rake +18 -0
- data/tasks/copyright.rake +21 -0
- data/tasks/gem.rake +22 -0
- data/tasks/gem_installer.rake +76 -0
- data/{rake_tasks → tasks}/git.rake +10 -5
- data/tasks/grancher.rake +12 -0
- data/tasks/install_dependencies.rake +6 -0
- data/tasks/jquery.rake +15 -0
- data/tasks/manifest.rake +4 -0
- data/{rake_tasks/metric.rake → tasks/metric_changes.rake} +7 -7
- data/tasks/rcov.rake +23 -0
- data/tasks/release.rake +69 -0
- data/tasks/reversion.rake +8 -0
- data/tasks/todo.rake +29 -0
- data/tasks/traits.rake +21 -0
- data/tasks/yard.rake +4 -0
- metadata +173 -290
- data/benchmark/suite/template_amrita2.rb +0 -17
- data/doc/readme_chunks/appendix.txt +0 -10
- data/doc/readme_chunks/examples.txt +0 -38
- data/doc/readme_chunks/features.txt +0 -148
- data/doc/readme_chunks/getting_help.txt +0 -5
- data/doc/readme_chunks/getting_started.txt +0 -18
- data/doc/readme_chunks/installing.txt +0 -92
- data/doc/readme_chunks/introduction.txt +0 -18
- data/doc/readme_chunks/principles.txt +0 -56
- data/doc/readme_chunks/thanks.txt +0 -59
- data/examples/app/auth/auth.rb +0 -54
- data/examples/app/auth/template/layout.haml +0 -20
- data/examples/app/auth/template/login.haml +0 -16
- data/examples/app/blog/public/styles/blog.css +0 -132
- data/examples/app/blog/view/edit.xhtml +0 -17
- data/examples/app/blog/view/index.xhtml +0 -17
- data/examples/app/blog/view/layout.xhtml +0 -11
- data/examples/app/blog/view/new.xhtml +0 -16
- data/examples/app/rapaste/Rakefile +0 -34
- data/examples/app/rapaste/controller/paste.rb +0 -101
- data/examples/app/rapaste/model/paste.rb +0 -58
- data/examples/app/rapaste/public/css/active4d.css +0 -114
- data/examples/app/rapaste/public/css/all_hallows_eve.css +0 -72
- data/examples/app/rapaste/public/css/amy.css +0 -147
- data/examples/app/rapaste/public/css/blackboard.css +0 -88
- data/examples/app/rapaste/public/css/brilliance_black.css +0 -605
- data/examples/app/rapaste/public/css/brilliance_dull.css +0 -599
- data/examples/app/rapaste/public/css/cobalt.css +0 -149
- data/examples/app/rapaste/public/css/dawn.css +0 -121
- data/examples/app/rapaste/public/css/display.css +0 -197
- data/examples/app/rapaste/public/css/eiffel.css +0 -121
- data/examples/app/rapaste/public/css/espresso_libre.css +0 -109
- data/examples/app/rapaste/public/css/idle.css +0 -62
- data/examples/app/rapaste/public/css/iplastic.css +0 -80
- data/examples/app/rapaste/public/css/lazy.css +0 -73
- data/examples/app/rapaste/public/css/mac_classic.css +0 -123
- data/examples/app/rapaste/public/css/magicwb_amiga.css +0 -104
- data/examples/app/rapaste/public/css/pastels_on_dark.css +0 -188
- data/examples/app/rapaste/public/css/slush_poppies.css +0 -85
- data/examples/app/rapaste/public/css/spacecadet.css +0 -51
- data/examples/app/rapaste/public/css/sunburst.css +0 -180
- data/examples/app/rapaste/public/css/twilight.css +0 -137
- data/examples/app/rapaste/public/css/zenburnesque.css +0 -91
- data/examples/app/rapaste/public/js/jquery.js +0 -11
- data/examples/app/rapaste/spec/rapaste.rb +0 -51
- data/examples/app/rapaste/start.rb +0 -25
- data/examples/app/rapaste/view/copy.xhtml +0 -10
- data/examples/app/rapaste/view/index.xhtml +0 -9
- data/examples/app/rapaste/view/layout.xhtml +0 -25
- data/examples/app/rapaste/view/list.xhtml +0 -29
- data/examples/app/rapaste/view/search.xhtml +0 -41
- data/examples/app/rapaste/view/view.xhtml +0 -40
- data/examples/app/todolist/README +0 -1
- data/examples/app/todolist/public/js/jquery.js +0 -1923
- data/examples/app/todolist/public/ramaze.png +0 -0
- data/examples/app/todolist/spec/todolist.rb +0 -132
- data/examples/app/todolist/src/controller/main.rb +0 -70
- data/examples/app/todolist/src/element/page.rb +0 -31
- data/examples/app/todolist/src/model.rb +0 -14
- data/examples/app/todolist/template/index.xhtml +0 -17
- data/examples/app/todolist/template/new.xhtml +0 -7
- data/examples/misc/simple_auth.rb +0 -35
- data/examples/templates/template/external.amrita +0 -19
- data/examples/templates/template/external.xsl +0 -57
- data/examples/templates/template_amrita2.rb +0 -74
- data/examples/templates/template_xslt.rb +0 -49
- data/lib/proto/public/css/ramaze_error.css +0 -90
- data/lib/proto/view/error.xhtml +0 -64
- data/lib/ramaze/action/render.rb +0 -192
- data/lib/ramaze/action.rb +0 -159
- data/lib/ramaze/adapter/base.rb +0 -128
- data/lib/ramaze/adapter/cgi.rb +0 -20
- data/lib/ramaze/adapter/ebb.rb +0 -18
- data/lib/ramaze/adapter/evented_mongrel.rb +0 -7
- data/lib/ramaze/adapter/fake.rb +0 -12
- data/lib/ramaze/adapter/fcgi.rb +0 -18
- data/lib/ramaze/adapter/lsws.rb +0 -19
- data/lib/ramaze/adapter/mongrel.rb +0 -21
- data/lib/ramaze/adapter/scgi.rb +0 -18
- data/lib/ramaze/adapter/swiftiplied_mongrel.rb +0 -7
- data/lib/ramaze/adapter/thin.rb +0 -17
- data/lib/ramaze/adapter/webrick.rb +0 -43
- data/lib/ramaze/adapter.rb +0 -97
- data/lib/ramaze/cache/file.rb +0 -71
- data/lib/ramaze/cache/memcached.rb +0 -69
- data/lib/ramaze/cache/memory.rb +0 -6
- data/lib/ramaze/cache/yaml_store.rb +0 -68
- data/lib/ramaze/contrib/file_cache.rb +0 -3
- data/lib/ramaze/contrib/gems.rb +0 -78
- data/lib/ramaze/contrib/sequel/fill.rb +0 -12
- data/lib/ramaze/contrib/sequel_cache.rb +0 -92
- data/lib/ramaze/contrib.rb +0 -82
- data/lib/ramaze/controller/error.rb +0 -46
- data/lib/ramaze/controller/main.rb +0 -2
- data/lib/ramaze/controller/resolve.rb +0 -278
- data/lib/ramaze/current/request.rb +0 -231
- data/lib/ramaze/current/session/flash.rb +0 -88
- data/lib/ramaze/current/session/hash.rb +0 -62
- data/lib/ramaze/current/session.rb +0 -179
- data/lib/ramaze/dispatcher/action.rb +0 -50
- data/lib/ramaze/dispatcher/directory.rb +0 -119
- data/lib/ramaze/dispatcher/error.rb +0 -108
- data/lib/ramaze/dispatcher/file.rb +0 -100
- data/lib/ramaze/dispatcher.rb +0 -145
- data/lib/ramaze/error.rb +0 -24
- data/lib/ramaze/helper/aspect.rb +0 -106
- data/lib/ramaze/helper/cgi.rb +0 -39
- data/lib/ramaze/helper/redirect.rb +0 -100
- data/lib/ramaze/helper/rest.rb +0 -43
- data/lib/ramaze/helper/sendfile.rb +0 -16
- data/lib/ramaze/option/dsl.rb +0 -45
- data/lib/ramaze/option/holder.rb +0 -131
- data/lib/ramaze/option/merger.rb +0 -108
- data/lib/ramaze/option.rb +0 -156
- data/lib/ramaze/route.rb +0 -97
- data/lib/ramaze/snippets/object/traits.rb +0 -76
- data/lib/ramaze/snippets/ramaze/caller_info.rb +0 -30
- data/lib/ramaze/snippets/ramaze/caller_lines.rb +0 -51
- data/lib/ramaze/snippets/ramaze/state.rb +0 -86
- data/lib/ramaze/spec/helper/browser.rb +0 -88
- data/lib/ramaze/spec/helper/mock_http.rb +0 -64
- data/lib/ramaze/spec/helper/requester.rb +0 -63
- data/lib/ramaze/spec/helper/simple_http.rb +0 -434
- data/lib/ramaze/spec/helper.rb +0 -135
- data/lib/ramaze/store/default.rb +0 -109
- data/lib/ramaze/template/amrita2.rb +0 -49
- data/lib/ramaze/template/builder.rb +0 -28
- data/lib/ramaze/template/erubis.rb +0 -41
- data/lib/ramaze/template/ezamar/element.rb +0 -169
- data/lib/ramaze/template/ezamar/engine.rb +0 -76
- data/lib/ramaze/template/ezamar/morpher.rb +0 -135
- data/lib/ramaze/template/ezamar/render_partial.rb +0 -39
- data/lib/ramaze/template/ezamar/textpow.syntax +0 -34
- data/lib/ramaze/template/ezamar.rb +0 -42
- data/lib/ramaze/template/haml.rb +0 -37
- data/lib/ramaze/template/liquid.rb +0 -36
- data/lib/ramaze/template/markaby.rb +0 -52
- data/lib/ramaze/template/maruku.rb +0 -34
- data/lib/ramaze/template/nagoro.rb +0 -52
- data/lib/ramaze/template/none.rb +0 -14
- data/lib/ramaze/template/redcloth.rb +0 -25
- data/lib/ramaze/template/remarkably.rb +0 -38
- data/lib/ramaze/template/sass.rb +0 -37
- data/lib/ramaze/template/tagz.rb +0 -79
- data/lib/ramaze/template/tenjin.rb +0 -74
- data/lib/ramaze/template/xslt.rb +0 -100
- data/lib/ramaze/template.rb +0 -87
- data/lib/ramaze/tool/daemonize.rb +0 -37
- data/lib/ramaze/tool/localize.rb +0 -202
- data/lib/ramaze/tool/mime.rb +0 -35
- data/lib/ramaze/tool/mime_types.yaml +0 -615
- data/lib/ramaze/tool/record.rb +0 -6
- data/lib/ramaze/tool.rb +0 -9
- data/lib/ramaze/trinity.rb +0 -16
- data/lib/vendor/bacon.rb +0 -323
- data/rake_tasks/conf.rake +0 -85
- data/rake_tasks/coverage.rake +0 -45
- data/rake_tasks/gem.rake +0 -74
- data/rake_tasks/maintenance.rake +0 -386
- data/rake_tasks/release.rake +0 -76
- data/rake_tasks/spec.rake +0 -61
- data/spec/contrib/profiling.rb +0 -29
- data/spec/contrib/sequel/fill.rb +0 -47
- data/spec/examples/simple_auth.rb +0 -32
- data/spec/examples/templates/template_amrita2.rb +0 -16
- data/spec/ramaze/action/basics.rb +0 -36
- data/spec/ramaze/action/cache.rb +0 -87
- data/spec/ramaze/action/file_cache.rb +0 -70
- data/spec/ramaze/action/layout.rb +0 -190
- data/spec/ramaze/adapter/ebb.rb +0 -12
- data/spec/ramaze/adapter/mongrel.rb +0 -12
- data/spec/ramaze/adapter/record.rb +0 -31
- data/spec/ramaze/adapter/webrick.rb +0 -12
- data/spec/ramaze/adapter.rb +0 -49
- data/spec/ramaze/cache.rb +0 -140
- data/spec/ramaze/controller.rb +0 -180
- data/spec/ramaze/current/request.rb +0 -30
- data/spec/ramaze/current/session.rb +0 -97
- data/spec/ramaze/dispatcher.rb +0 -31
- data/spec/ramaze/element.rb +0 -107
- data/spec/ramaze/helper/aspect.rb +0 -101
- data/spec/ramaze/helper/cgi.rb +0 -43
- data/spec/ramaze/helper/file.rb +0 -18
- data/spec/ramaze/helper/redirect.rb +0 -112
- data/spec/ramaze/localize.rb +0 -89
- data/spec/ramaze/morpher.rb +0 -111
- data/spec/ramaze/public/error404.xhtml +0 -1
- data/spec/ramaze/request/ebb.rb +0 -9
- data/spec/ramaze/request/mongrel.rb +0 -9
- data/spec/ramaze/request/thin.rb +0 -9
- data/spec/ramaze/request/webrick.rb +0 -5
- data/spec/ramaze/rewrite.rb +0 -36
- data/spec/ramaze/route.rb +0 -131
- data/spec/ramaze/session.rb +0 -94
- data/spec/ramaze/store/default.rb +0 -71
- data/spec/ramaze/template/amrita2/external.amrita +0 -6
- data/spec/ramaze/template/amrita2/sum.amrita +0 -1
- data/spec/ramaze/template/amrita2.rb +0 -50
- data/spec/ramaze/template/builder/external.rxml +0 -3
- data/spec/ramaze/template/builder.rb +0 -51
- data/spec/ramaze/template/erubis/sum.rhtml +0 -1
- data/spec/ramaze/template/erubis.rb +0 -41
- data/spec/ramaze/template/ezamar/another/long/action.zmr +0 -1
- data/spec/ramaze/template/ezamar/combined.zmr +0 -1
- data/spec/ramaze/template/ezamar/file_only.zmr +0 -1
- data/spec/ramaze/template/ezamar/index.zmr +0 -1
- data/spec/ramaze/template/ezamar/nested.zmr +0 -1
- data/spec/ramaze/template/ezamar/other__index.xhtml +0 -1
- data/spec/ramaze/template/ezamar/some__long__action.zmr +0 -1
- data/spec/ramaze/template/ezamar/sum.zmr +0 -1
- data/spec/ramaze/template/ezamar.rb +0 -63
- data/spec/ramaze/template/haml/index.haml +0 -5
- data/spec/ramaze/template/haml/locals.haml +0 -2
- data/spec/ramaze/template/haml/with_vars.haml +0 -4
- data/spec/ramaze/template/haml.rb +0 -66
- data/spec/ramaze/template/liquid/index.liquid +0 -1
- data/spec/ramaze/template/liquid/products.liquid +0 -45
- data/spec/ramaze/template/liquid.rb +0 -99
- data/spec/ramaze/template/markaby/external.mab +0 -8
- data/spec/ramaze/template/markaby/sum.mab +0 -1
- data/spec/ramaze/template/markaby.rb +0 -61
- data/spec/ramaze/template/nagoro/another/long/action.nag +0 -1
- data/spec/ramaze/template/nagoro/combined.nag +0 -1
- data/spec/ramaze/template/nagoro/file_only.nag +0 -1
- data/spec/ramaze/template/nagoro/index.nag +0 -1
- data/spec/ramaze/template/nagoro/nested.nag +0 -1
- data/spec/ramaze/template/nagoro/some__long__action.nag +0 -1
- data/spec/ramaze/template/nagoro/sum.nag +0 -1
- data/spec/ramaze/template/nagoro.rb +0 -64
- data/spec/ramaze/template/redcloth/external.redcloth +0 -1
- data/spec/ramaze/template/redcloth.rb +0 -38
- data/spec/ramaze/template/remarkably.rb +0 -58
- data/spec/ramaze/template/sass.rb +0 -69
- data/spec/ramaze/template/tenjin/external.tenjin +0 -1
- data/spec/ramaze/template/tenjin.rb +0 -47
- data/spec/ramaze/template/xslt/concat_words.xsl +0 -16
- data/spec/ramaze/template/xslt/index.xsl +0 -14
- data/spec/ramaze/template/xslt/products.xsl +0 -32
- data/spec/ramaze/template/xslt/ruby_version.xsl +0 -14
- data/spec/ramaze/template/xslt.rb +0 -90
- data/spec/ramaze/template.rb +0 -128
- data/spec/snippets/ramaze/caller_info.rb +0 -39
- data/spec/snippets/ramaze/caller_lines.rb +0 -30
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'ramaze'
|
2
|
-
|
3
|
-
class MainController < Ramaze::Controller
|
4
|
-
engine :Amrita2
|
5
|
-
|
6
|
-
def index
|
7
|
-
@data = { :hello => "Hello, World!" }
|
8
|
-
%q[
|
9
|
-
<<html<
|
10
|
-
<<body<
|
11
|
-
<<%<
|
12
|
-
<% 10.times do %>
|
13
|
-
<span><%= $_[:hello] %></span>
|
14
|
-
<% end %>
|
15
|
-
]
|
16
|
-
end
|
17
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
There are some examples for your instant pleasure inside the examples-directory
|
2
|
-
in the Ramaze-distribution.
|
3
|
-
To start up an example, you can use the Ramaze binary located in bin/ramaze
|
4
|
-
for example:
|
5
|
-
|
6
|
-
$ ramaze examples/hello.rb
|
7
|
-
|
8
|
-
Or:
|
9
|
-
|
10
|
-
$ cd examples/blog
|
11
|
-
$ ramaze
|
12
|
-
|
13
|
-
Since ramaze uses the start.rb by default if you don't pass anything else.
|
14
|
-
|
15
|
-
For more information about the usage of ramaze try:
|
16
|
-
|
17
|
-
$ ramaze --help
|
18
|
-
|
19
|
-
|
20
|
-
Examples include:
|
21
|
-
|
22
|
-
* examples/hello.rb
|
23
|
-
Hello, World!
|
24
|
-
|
25
|
-
* examples/simple.rb
|
26
|
-
A bit more advanced than the hello-example, but still very basic.
|
27
|
-
|
28
|
-
* examples/blog
|
29
|
-
Not yet fully functional, but coming along.
|
30
|
-
|
31
|
-
* examples/whywiki
|
32
|
-
A basic examples of a minimalistic application, based on the Wiki of \_why in
|
33
|
-
his camping-framework.
|
34
|
-
|
35
|
-
* examples/templates
|
36
|
-
examples of real usage of the templating-engines. Tries to implement the same
|
37
|
-
functionality in each `template_*.rb` file using a different engine.
|
38
|
-
|
@@ -1,148 +0,0 @@
|
|
1
|
-
Ramaze offers following features at the moment:
|
2
|
-
|
3
|
-
* Adapters
|
4
|
-
|
5
|
-
Ramaze takes advantage of the rack library to provide a common way of
|
6
|
-
handling different ways to serve its content.
|
7
|
-
|
8
|
-
Rack supports at the moment:
|
9
|
-
|
10
|
-
* [Mongrel](http://mongrel.rubyforge.org/)
|
11
|
-
|
12
|
-
Mongrel is a fast HTTP library and server for Ruby that is intended for
|
13
|
-
hosting Ruby web applications of any kind using plain HTTP rather than
|
14
|
-
FastCGI or SCGI.
|
15
|
-
|
16
|
-
* [WEBrick](http://www.webrick.org/)
|
17
|
-
|
18
|
-
WEBrick is a Ruby library program to build HTTP servers.
|
19
|
-
|
20
|
-
* CGI
|
21
|
-
|
22
|
-
CGI is the Common Gateway Interface and is one of the most basic ways
|
23
|
-
to integrate into Webservers like Apache or Lighttpd.
|
24
|
-
|
25
|
-
* FCGI
|
26
|
-
|
27
|
-
Improvment of CGI as it doesn't start up a new connection to Ramaze on
|
28
|
-
every request.
|
29
|
-
|
30
|
-
|
31
|
-
* Templates
|
32
|
-
* [Amrita2](http://amrita2.rubyforge.org/)
|
33
|
-
|
34
|
-
Amrita2 is a xml/xhtml template library for Ruby. It makes html documents
|
35
|
-
from a template and a model data.
|
36
|
-
|
37
|
-
* [Erubis](http://rubyforge.org/projects/erubis)
|
38
|
-
|
39
|
-
Erubis is a fast, secure, and very extensible implementation of eRuby.
|
40
|
-
|
41
|
-
* [Haml](http://haml.hamptoncatlin.com/)
|
42
|
-
|
43
|
-
Haml takes your gross, ugly templates and replaces them with veritable Haiku.
|
44
|
-
|
45
|
-
* [Liquid](http://home.leetsoft.com/liquid)
|
46
|
-
|
47
|
-
Liquid's syntax and parse model are inspired by Django templates, as well
|
48
|
-
as PHP's smarty.
|
49
|
-
|
50
|
-
* [Remarkably](http://rubyforge.org/projects/remarkably)
|
51
|
-
|
52
|
-
Remarkably is a very tiny Markaby-like XML builder
|
53
|
-
|
54
|
-
* [Markaby](http://code.whytheluckystiff.net/markaby/)
|
55
|
-
|
56
|
-
Markaby means Markup as Ruby.
|
57
|
-
|
58
|
-
* [Sass](http://haml.hamptoncatlin.com/docs/sass)
|
59
|
-
|
60
|
-
Sass is a meta-language on top of CSS that‘s used to describe the style of
|
61
|
-
a document cleanly and structurally, with more power than flat CSS allows.
|
62
|
-
|
63
|
-
* Ezamar
|
64
|
-
|
65
|
-
A simple homage to [Nitro](http://nitroproject.org)s templating, is shipped
|
66
|
-
together with Ramaze.
|
67
|
-
|
68
|
-
* Cache
|
69
|
-
* Hash
|
70
|
-
* YAML::Store
|
71
|
-
* MemCache
|
72
|
-
|
73
|
-
* Helper
|
74
|
-
* Active by default
|
75
|
-
* CGI
|
76
|
-
|
77
|
-
Shortcuts for escape/unescape of the CGI module.
|
78
|
-
|
79
|
-
* File
|
80
|
-
|
81
|
-
Helps you serving files from your Controller.
|
82
|
-
|
83
|
-
* Flash
|
84
|
-
|
85
|
-
Store a couple of values for one request associated with a session.
|
86
|
-
|
87
|
-
* Link
|
88
|
-
|
89
|
-
Easier linking to the various parts of your applications Controllers and
|
90
|
-
Actions.
|
91
|
-
|
92
|
-
* Redirect
|
93
|
-
|
94
|
-
Easy redirection.
|
95
|
-
|
96
|
-
* Optional
|
97
|
-
* Aspect
|
98
|
-
|
99
|
-
Allows you to wrap different Actions on your Controller with code.
|
100
|
-
|
101
|
-
* Auth
|
102
|
-
|
103
|
-
Simple way to add basic authentication.
|
104
|
-
|
105
|
-
* Cache
|
106
|
-
|
107
|
-
Easy caching Actions and values.
|
108
|
-
|
109
|
-
* Identity
|
110
|
-
|
111
|
-
For ease of use of the OpenID authentication mechanism.
|
112
|
-
|
113
|
-
* Inform
|
114
|
-
|
115
|
-
Wrapping the functionality of Ramazes logging facilities.
|
116
|
-
|
117
|
-
* Markaby
|
118
|
-
|
119
|
-
Allows you to use Markaby in your Controller without having it as the
|
120
|
-
default templating engine.
|
121
|
-
|
122
|
-
* Nitroform
|
123
|
-
|
124
|
-
Hooks up on nitros form builder to help you creating forms from Og
|
125
|
-
objects.
|
126
|
-
|
127
|
-
* OpenID
|
128
|
-
|
129
|
-
Authentication via OpenID made easy.
|
130
|
-
|
131
|
-
* Pager
|
132
|
-
|
133
|
-
Displays a collection of entitities in multiple pages.
|
134
|
-
|
135
|
-
* Partial
|
136
|
-
|
137
|
-
Renders so-called partials.
|
138
|
-
|
139
|
-
* Stack
|
140
|
-
|
141
|
-
Allows you to use a call/answer mechanism for things like redirection to the
|
142
|
-
site a user entered login-forms from.
|
143
|
-
|
144
|
-
* Various
|
145
|
-
* Sessions
|
146
|
-
* Global configuration system
|
147
|
-
* Simple request/response handling
|
148
|
-
* Custom sophisticated Error-handling
|
@@ -1,18 +0,0 @@
|
|
1
|
-
Now that you have a vague idea of what you're about to get into you might just
|
2
|
-
want to get a way to get up and running ASAP.
|
3
|
-
Please read below for more information about installation.
|
4
|
-
|
5
|
-
Depending on what you are planning to do you can either just go and start
|
6
|
-
reading the source or directly get some hands-on experience by trying some of
|
7
|
-
the examples.
|
8
|
-
Most things will require dependencies though. The basic functionality is
|
9
|
-
provided by the WEBrick adapter and the Template::Ramaze, which just run out
|
10
|
-
of the box. For more features you will have to install some templating-engines
|
11
|
-
and mongrel (_very_ recommended). Ramaze will inform you when it needs further
|
12
|
-
dependencies, so just go and try some things.
|
13
|
-
|
14
|
-
Some places to get started are:
|
15
|
-
- Read the documentation.
|
16
|
-
- Run and read the test cases.
|
17
|
-
- Look at the examples and run/modify them.
|
18
|
-
|
@@ -1,92 +0,0 @@
|
|
1
|
-
* via RubyGems
|
2
|
-
|
3
|
-
The simplest way of installing Ramaze is via the gem.
|
4
|
-
|
5
|
-
[Rubygems](http://rubygems.org) is the package manager for ruby apps and
|
6
|
-
libraries and provides you with the last tagged version of Ramaze.
|
7
|
-
|
8
|
-
$ gem install ramaze
|
9
|
-
|
10
|
-
Versions are made as we see fit and get an announcment out (usually that's
|
11
|
-
the major obstacle as there is a lot to announce).
|
12
|
-
|
13
|
-
If you want to install the nightly gem of Ramaze you can do this with:
|
14
|
-
|
15
|
-
$ gem install ramaze --source=http://gem.ramaze.net/
|
16
|
-
|
17
|
-
We also use the gem building process on github, which locates gems at
|
18
|
-
http://gems.github.com - so you can get a version from there as well:
|
19
|
-
|
20
|
-
$ gem install manveru-ramaze --source=http://gems.github.com/
|
21
|
-
|
22
|
-
* via git
|
23
|
-
|
24
|
-
To get the latest and sweetest, you can just pull from the repository and run
|
25
|
-
Ramaze that way.
|
26
|
-
|
27
|
-
$ git clone git://github.com/manveru/ramaze.git
|
28
|
-
|
29
|
-
Please read the `man git` or `git help` for more information about updating
|
30
|
-
and creating your own patches.
|
31
|
-
This is at the moment the premier way to use Ramaze, since it is the way I
|
32
|
-
use it.
|
33
|
-
|
34
|
-
Some hints for the usage of Git.
|
35
|
-
|
36
|
-
* use `require 'ramaze'` from everywhere
|
37
|
-
|
38
|
-
Simply add the path to your repository to the RUBYLIB environment variable.
|
39
|
-
If you are using bash you can simply put following line into your .bashrc:
|
40
|
-
|
41
|
-
$ export RUBYLIB="$HOME/path/to/repo/lib/"
|
42
|
-
|
43
|
-
Of course you should put the real path instead, you can also add multiple
|
44
|
-
paths, or create your personal `site_ruby`:
|
45
|
-
|
46
|
-
$ export RUBYLIB="$HOME/ruby/ramaze/lib:$HOME/.site_ruby:$HOME/ruby/bacon/lib"
|
47
|
-
|
48
|
-
* use `require 'ramaze'` systemwide from everywhere
|
49
|
-
|
50
|
-
add a file to your `site_ruby` directory named 'ramaze.rb'
|
51
|
-
the content should be: `require '/path/to/git/repo/ramaze/lib/ramaze'`
|
52
|
-
|
53
|
-
* Pull the latest version
|
54
|
-
|
55
|
-
$ git pull
|
56
|
-
|
57
|
-
* Reset the repo to original state (if you screw up something)
|
58
|
-
|
59
|
-
$ git reset --hard # resets the whole repo
|
60
|
-
|
61
|
-
* Revert changes to (for example) lib/ramaze.rb only
|
62
|
-
|
63
|
-
$ git checkout master lib/ramaze.rb
|
64
|
-
|
65
|
-
* Add and commit all changes.
|
66
|
-
|
67
|
-
$ git commit -a
|
68
|
-
|
69
|
-
* Adding only specific changes.
|
70
|
-
|
71
|
-
# Add hunks you want to commit to the staging area (index)
|
72
|
-
$ git add -p
|
73
|
-
|
74
|
-
* Commit the changes into the history of your repository
|
75
|
-
|
76
|
-
# Create a commit from the hunks added
|
77
|
-
$ git commit
|
78
|
-
|
79
|
-
* output your patches into a bundle ready to be mailed (compress it before
|
80
|
-
sending to make sure it arrives in the way you sent it)
|
81
|
-
|
82
|
-
At the end of this process you will have a tar.bz2 for all your changes
|
83
|
-
that you can mail to ramaze@googlegroups.com
|
84
|
-
|
85
|
-
# make sure you are on latest revision to avoid conflicts
|
86
|
-
$ git pull
|
87
|
-
|
88
|
-
# create 00xx-blah.patch files against the remote repo
|
89
|
-
$ git format-patch origin/HEAD
|
90
|
-
|
91
|
-
# From here on you can use either git-send-email or go the manual route
|
92
|
-
$ tar -cjf ramaze_bundle.tar.bz2 *.patch
|
@@ -1,18 +0,0 @@
|
|
1
|
-
Ramaze is a very simple and straight-forward web-framework.
|
2
|
-
The philosophy of it could be expressed in a mix of KISS and POLS, trying to
|
3
|
-
make simple things simple and complex things possible.
|
4
|
-
|
5
|
-
This of course is nothing new to anyone who knows some ruby, but is often
|
6
|
-
forgotten in a chase for new functionality and features. Ramaze only tries to
|
7
|
-
give you the ultimate tools, but you have to use them yourself to achieve
|
8
|
-
perfect custom-tailored results.
|
9
|
-
|
10
|
-
Another one of the goals during development of Ramaze was to make every part as
|
11
|
-
modular and therefor reuasable as possible, not only to provide a basic
|
12
|
-
understanding after the first glance, but also to make it as simple as possible
|
13
|
-
to reuse parts of the code.
|
14
|
-
|
15
|
-
The original purpose of Ramaze was to act as a kind of framework to build
|
16
|
-
web-frameworks, this was made obsolete by the introduction of rack, which
|
17
|
-
provides this feature at a better level without trying to enforce any structural
|
18
|
-
layout of the resulting framework.
|
@@ -1,56 +0,0 @@
|
|
1
|
-
There are some basic principles that Ramaze tries to follow:
|
2
|
-
|
3
|
-
* KISS (Keep It Super Simple)
|
4
|
-
|
5
|
-
Ramaze doesn't introduce any major change of paradigm for everyone familiar
|
6
|
-
with Ruby and the basics of Web-development.
|
7
|
-
|
8
|
-
* POLS (Principle Of Least Surprise)
|
9
|
-
|
10
|
-
Ramaze tries to be intuitive and easy to learn. Most functionality is built in
|
11
|
-
a way to help, not to obfuscate or confuse.
|
12
|
-
|
13
|
-
* Modular design
|
14
|
-
|
15
|
-
Use what you want and how you want it.
|
16
|
-
|
17
|
-
Through Ruby Ramaze provides one of the most powerful programming-languages
|
18
|
-
available, giving you full control over your system.
|
19
|
-
|
20
|
-
Even the most essential parts of Ramaze can easily be replaced and/or modified
|
21
|
-
without losing the advantage of the whole framework.
|
22
|
-
|
23
|
-
* Minimal dependencies
|
24
|
-
|
25
|
-
Nothing besides Ruby is required for the basic features.
|
26
|
-
|
27
|
-
Of course you can take advantage of several wonderful libraries, but Ramaze is
|
28
|
-
built in a way to be run on any basic setup.
|
29
|
-
|
30
|
-
* Documentation
|
31
|
-
|
32
|
-
Document everything, classes, modules, methods, configuration...
|
33
|
-
|
34
|
-
Through 100% documentation Ramaze gives the developer easy and solid
|
35
|
-
understanding of the underlying concepts and functionality.
|
36
|
-
|
37
|
-
* Open development
|
38
|
-
|
39
|
-
Everyone is welcome to contribute to Ramaze in the easiest way possible. The
|
40
|
-
repository is open for patches passing the Test-suite.
|
41
|
-
|
42
|
-
* Examples
|
43
|
-
|
44
|
-
Everyone learns different, some only read the source, others browse
|
45
|
-
documentation, but everyone loves examples for a quick and painless start.
|
46
|
-
|
47
|
-
Ramaze addresses this need and offers a wide variety of examples of usage,
|
48
|
-
basic functionality, project-layout and more advanced applications.
|
49
|
-
|
50
|
-
* Fully BDD (Behaviour Driven Design)
|
51
|
-
|
52
|
-
Ramaze has a very complete set of so-called specifications built by RSpec.
|
53
|
-
These specs define the way Ramaze has to behave.
|
54
|
-
|
55
|
-
The specs are checked every time a new patch is pushed into the repository,
|
56
|
-
deciding whether the changes the patch applies are valid and don't break the framework.
|
@@ -1,59 +0,0 @@
|
|
1
|
-
There is a large number of people who made Ramaze possibe by their ongoing
|
2
|
-
efforts in the world of open source and by encouraging and helping me.
|
3
|
-
|
4
|
-
This list is by no means a full listing of all these people, but I try to
|
5
|
-
get a good coverage despite that.
|
6
|
-
|
7
|
-
I would like to thank:
|
8
|
-
|
9
|
-
* Yukihiro Matsumoto a.k.a matz
|
10
|
-
|
11
|
-
For giving the world Ruby and bringing fun back into programming.
|
12
|
-
|
13
|
-
* Zed Shawn a.k.a. zedas
|
14
|
-
|
15
|
-
For developing Mongrel, Ramaze started out as a simple Hello World based
|
16
|
-
on that awesome server.
|
17
|
-
|
18
|
-
* Christian Neukirchen a.k.a chris2
|
19
|
-
|
20
|
-
For building rack, which is just what the numerous web-developers had
|
21
|
-
anticipated and which will, with no doubt, change the world.
|
22
|
-
|
23
|
-
* Pistos
|
24
|
-
|
25
|
-
For continious encouragment and building the first real webpage on Ramaze.
|
26
|
-
His bugreports were invaluable.
|
27
|
-
|
28
|
-
* Jim Weirich
|
29
|
-
|
30
|
-
For Rake, which lifts off a lot of tasks from the shoulders of every
|
31
|
-
developer who uses it.
|
32
|
-
|
33
|
-
* Thomas Sawyer a.k.a Trans
|
34
|
-
|
35
|
-
Dragging me deep into the rabbit-hole and showing me how awesome Ruby
|
36
|
-
truely is through his work on facets, ratchets and tons of other projects.
|
37
|
-
|
38
|
-
* George Moschovitis a.k.a gmosx
|
39
|
-
|
40
|
-
For his tremendous efforts in the Nitro/Og framework, which is a source of
|
41
|
-
steady inspiration for Ramaze and brought me to Ruby in the first place.
|
42
|
-
|
43
|
-
* Rob Levin a.k.a. lilo
|
44
|
-
|
45
|
-
He founded the most excellent Freenode IRC-network, where the most important
|
46
|
-
channels for rubyists are located (as is #ramaze).
|
47
|
-
May he rest in peace.
|
48
|
-
|
49
|
-
* The guys (and gals) in the various channels on Freenode
|
50
|
-
|
51
|
-
As the people are way too many to be listed, here the channels that i call
|
52
|
-
my online home.
|
53
|
-
All the people in there deserve special thanks for getting me hooked to Ruby
|
54
|
-
and providing their help in a friendly and patient manner.
|
55
|
-
|
56
|
-
* #nitro
|
57
|
-
* #ruby-de
|
58
|
-
* #ruby-lang
|
59
|
-
* #rubyforce
|
data/examples/app/auth/auth.rb
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'sequel'
|
3
|
-
|
4
|
-
begin
|
5
|
-
DB = Sequel.sqlite
|
6
|
-
rescue NoMethodError
|
7
|
-
raise LoadError, 'Install latest Sequel gem'
|
8
|
-
end
|
9
|
-
|
10
|
-
class User < Sequel::Model(:users)
|
11
|
-
set_schema do
|
12
|
-
primary_key :id
|
13
|
-
varchar :username
|
14
|
-
varchar :password
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
unless User.table_exists?
|
19
|
-
User.create_table
|
20
|
-
User.create :username => 'admin', :password => 'passwort'
|
21
|
-
end
|
22
|
-
|
23
|
-
require 'ramaze'
|
24
|
-
|
25
|
-
class MainController < Ramaze::Controller
|
26
|
-
helper :auth
|
27
|
-
layout :layout
|
28
|
-
|
29
|
-
before(:index) { login_required }
|
30
|
-
|
31
|
-
def index
|
32
|
-
"Hello #{session[:username]}"
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def login_required
|
38
|
-
flash[:error] = 'login required to view that page' unless logged_in?
|
39
|
-
super
|
40
|
-
end
|
41
|
-
|
42
|
-
def check_auth user, pass
|
43
|
-
return false if (not user or user.empty?) and (not pass or pass.empty?)
|
44
|
-
|
45
|
-
if User[:username => user, :password => pass].nil?
|
46
|
-
flash[:error] = 'invalid username or password'
|
47
|
-
false
|
48
|
-
else
|
49
|
-
true
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
Ramaze.start :adapter => :mongrel, :load_engines => :Haml
|
@@ -1,16 +0,0 @@
|
|
1
|
-
- unless logged_in?
|
2
|
-
- if flash[:error]
|
3
|
-
%p.error= flash[:error]
|
4
|
-
%form{ :method => 'POST', :action => Rs(:login) }
|
5
|
-
%ul
|
6
|
-
%li
|
7
|
-
username:
|
8
|
-
%input{ :type => 'text', :name => 'username' }/
|
9
|
-
%li
|
10
|
-
password:
|
11
|
-
%input{ :type => 'password', :name => 'password' }/
|
12
|
-
%li
|
13
|
-
%input{ :type => 'submit', :name => 'login' }/
|
14
|
-
- else
|
15
|
-
click here to
|
16
|
-
%a{ :href => Rs(:logout) } logout
|
@@ -1,132 +0,0 @@
|
|
1
|
-
body {
|
2
|
-
margin: 0;
|
3
|
-
padding: 0;
|
4
|
-
}
|
5
|
-
|
6
|
-
h1 {
|
7
|
-
background: #FFC;
|
8
|
-
margin: 0;
|
9
|
-
padding: 0.25em 3em 0.25em 0.25em;
|
10
|
-
font-size: 32pt;
|
11
|
-
text-align: right;
|
12
|
-
color: #884;
|
13
|
-
border-bottom: 1px solid #004;
|
14
|
-
}
|
15
|
-
|
16
|
-
h2 {
|
17
|
-
margin: 8pt 0 0 0;
|
18
|
-
padding: 0 8pt 4pt 8pt;
|
19
|
-
font-size: 24pt;
|
20
|
-
color: #884;
|
21
|
-
}
|
22
|
-
|
23
|
-
div#actions {
|
24
|
-
margin: -1px 8pt 0 0;
|
25
|
-
padding: 2pt 8pt 4pt 8pt;
|
26
|
-
float: right;
|
27
|
-
background: #FFC;
|
28
|
-
border-style: solid;
|
29
|
-
border-width: 0 2px 2px 1px;
|
30
|
-
border-color: 0 #004 #004 #448;
|
31
|
-
font-size: 10pt;
|
32
|
-
color: #884;
|
33
|
-
}
|
34
|
-
|
35
|
-
div#actions a {
|
36
|
-
color: inherit;
|
37
|
-
text-decoration: none;
|
38
|
-
}
|
39
|
-
|
40
|
-
div#actions a:hover {
|
41
|
-
color: black;
|
42
|
-
}
|
43
|
-
|
44
|
-
div#entries {
|
45
|
-
margin: 0pt 20pt 10pt 12pt;
|
46
|
-
}
|
47
|
-
|
48
|
-
div.entry {
|
49
|
-
margin: 10pt 0 0 0;
|
50
|
-
padding: 0;
|
51
|
-
background-color: #FFD;
|
52
|
-
border-left: 8pt solid #CC8;
|
53
|
-
border-top: 1px solid #CC8;
|
54
|
-
}
|
55
|
-
|
56
|
-
div.entry div.header {
|
57
|
-
background-color: #EEA;
|
58
|
-
border-bottom: 1px solid #CC8;
|
59
|
-
}
|
60
|
-
|
61
|
-
div.entry div.header div.title {
|
62
|
-
font-size: 18pt;
|
63
|
-
color: black;
|
64
|
-
padding: 2pt 4pt 2pt 4pt;
|
65
|
-
}
|
66
|
-
|
67
|
-
div.entry div.header div.title input {
|
68
|
-
width: 100%;
|
69
|
-
border: none;
|
70
|
-
font-size: inherit;
|
71
|
-
}
|
72
|
-
|
73
|
-
div.entry div.header ul {
|
74
|
-
float: left;
|
75
|
-
margin: 0;
|
76
|
-
padding: 0;
|
77
|
-
}
|
78
|
-
|
79
|
-
div.entry div.header ul li {
|
80
|
-
background-color: #EEA;
|
81
|
-
margin: 0 0 0 4pt;
|
82
|
-
padding: 0 4pt 0 4pt;
|
83
|
-
display: inline;
|
84
|
-
border-style: none solid solid solid;
|
85
|
-
border-width: 1px;
|
86
|
-
border-color: #CC8;
|
87
|
-
font-size: 9pt;
|
88
|
-
color: #884;
|
89
|
-
}
|
90
|
-
|
91
|
-
div.entry div.header ul li:hover {
|
92
|
-
color: black;
|
93
|
-
}
|
94
|
-
|
95
|
-
div.entry div.header ul li a {
|
96
|
-
text-decoration: none;
|
97
|
-
color: inherit;
|
98
|
-
}
|
99
|
-
|
100
|
-
div.entry div.header div.created {
|
101
|
-
float: right;
|
102
|
-
font-size: 8pt;
|
103
|
-
color: #888;
|
104
|
-
margin: 0.25em 0.5em 0 0;
|
105
|
-
}
|
106
|
-
|
107
|
-
div.entry div.content {
|
108
|
-
padding: 24pt 16pt 16pt 16pt;
|
109
|
-
border-bottom: 1px solid #CC8;
|
110
|
-
}
|
111
|
-
|
112
|
-
div.entry div.content textarea {
|
113
|
-
width: 100%;
|
114
|
-
border: none;
|
115
|
-
font-size: inherit;
|
116
|
-
height: 12em;
|
117
|
-
margin: -16pt -8pt -8pt -8pt;
|
118
|
-
padding: 8pt;
|
119
|
-
}
|
120
|
-
|
121
|
-
div.entry input[type=submit] {
|
122
|
-
margin: 4pt 16pt 4pt 4pt;
|
123
|
-
border: 1px solid #CC8;
|
124
|
-
background-color: #EEC;
|
125
|
-
}
|
126
|
-
|
127
|
-
div.entry div.updated {
|
128
|
-
float: right;
|
129
|
-
font-size: 8pt;
|
130
|
-
color: #888;
|
131
|
-
margin: -1.25em 0.5em 0 0;
|
132
|
-
}
|