ramaze 2011.01.30 → 2011.07.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. data/.gitignore +2 -1
  2. data/.mailmap +2 -0
  3. data/.rvmrc +1 -0
  4. data/README.md +119 -197
  5. data/Rakefile +14 -97
  6. data/bin/ramaze +6 -14
  7. data/doc/AUTHORS +8 -4
  8. data/doc/CHANGELOG +3784 -3339
  9. data/examples/app/chat/start.rb +2 -2
  10. data/lib/proto/app.rb +2 -3
  11. data/lib/proto/config.ru +4 -5
  12. data/lib/proto/controller/init.rb +11 -4
  13. data/lib/proto/controller/main.rb +12 -7
  14. data/lib/proto/layout/default.xhtml +56 -23
  15. data/lib/proto/model/init.rb +3 -1
  16. data/lib/proto/public/css/grid.css +107 -0
  17. data/lib/proto/public/css/layout.css +81 -0
  18. data/lib/proto/public/css/reset.css +123 -0
  19. data/lib/proto/public/css/text.css +109 -0
  20. data/lib/proto/public/images/bg.png +0 -0
  21. data/lib/proto/spec/main.rb +2 -2
  22. data/lib/proto/start.rb +11 -1
  23. data/lib/proto/view/index.xhtml +27 -23
  24. data/lib/ramaze.rb +0 -1
  25. data/lib/ramaze/app.rb +85 -12
  26. data/lib/ramaze/app_graph.rb +107 -0
  27. data/lib/ramaze/bin/console.rb +87 -0
  28. data/lib/ramaze/bin/create.rb +94 -0
  29. data/lib/ramaze/bin/helper.rb +107 -0
  30. data/lib/ramaze/bin/restart.rb +95 -0
  31. data/lib/ramaze/bin/runner.rb +141 -0
  32. data/lib/ramaze/bin/start.rb +206 -0
  33. data/lib/ramaze/bin/status.rb +152 -0
  34. data/lib/ramaze/bin/stop.rb +112 -0
  35. data/lib/ramaze/cache.rb +9 -4
  36. data/lib/ramaze/cache/localmemcache.rb +10 -13
  37. data/lib/ramaze/cache/lru.rb +49 -7
  38. data/lib/ramaze/cache/memcache.rb +170 -92
  39. data/lib/ramaze/cache/sequel.rb +301 -118
  40. data/lib/ramaze/controller.rb +108 -9
  41. data/lib/ramaze/controller/default.rb +15 -2
  42. data/lib/ramaze/current.rb +14 -2
  43. data/lib/ramaze/dependencies.rb +46 -0
  44. data/lib/ramaze/files.rb +38 -3
  45. data/lib/ramaze/gestalt.rb +12 -12
  46. data/lib/ramaze/helper.rb +0 -2
  47. data/lib/ramaze/helper/auth.rb +30 -23
  48. data/lib/ramaze/helper/blue_form.rb +175 -126
  49. data/lib/ramaze/helper/csrf.rb +76 -91
  50. data/lib/ramaze/helper/email.rb +105 -0
  51. data/lib/ramaze/helper/erector.rb +16 -15
  52. data/lib/ramaze/helper/gestalt.rb +2 -2
  53. data/lib/ramaze/helper/layout.rb +89 -73
  54. data/lib/ramaze/helper/link.rb +7 -6
  55. data/lib/ramaze/helper/localize.rb +6 -5
  56. data/lib/ramaze/helper/markaby.rb +25 -23
  57. data/lib/ramaze/helper/maruku.rb +3 -3
  58. data/lib/ramaze/helper/paginate.rb +19 -27
  59. data/lib/ramaze/helper/remarkably.rb +3 -3
  60. data/lib/ramaze/helper/request_accessor.rb +3 -3
  61. data/lib/ramaze/helper/send_file.rb +12 -8
  62. data/lib/ramaze/helper/simple_captcha.rb +5 -6
  63. data/lib/ramaze/helper/stack.rb +7 -4
  64. data/lib/ramaze/helper/tagz.rb +10 -11
  65. data/lib/ramaze/helper/thread.rb +19 -16
  66. data/lib/ramaze/helper/ultraviolet.rb +7 -4
  67. data/lib/ramaze/helper/user.rb +40 -21
  68. data/lib/ramaze/helper/xhtml.rb +29 -20
  69. data/lib/ramaze/log.rb +3 -11
  70. data/lib/ramaze/log/analogger.rb +5 -4
  71. data/lib/ramaze/log/growl.rb +9 -7
  72. data/lib/ramaze/log/hub.rb +3 -5
  73. data/lib/ramaze/log/informer.rb +15 -12
  74. data/lib/ramaze/log/knotify.rb +3 -5
  75. data/lib/ramaze/log/logger.rb +3 -5
  76. data/lib/ramaze/log/logging.rb +6 -8
  77. data/lib/ramaze/log/rotatinginformer.rb +27 -17
  78. data/lib/ramaze/log/syslog.rb +7 -7
  79. data/lib/ramaze/log/xosd.rb +3 -5
  80. data/lib/ramaze/middleware_compiler.rb +27 -4
  81. data/lib/ramaze/reloader.rb +50 -12
  82. data/lib/ramaze/reloader/watch_inotify.rb +4 -5
  83. data/lib/ramaze/reloader/watch_stat.rb +3 -3
  84. data/lib/ramaze/request.rb +18 -8
  85. data/lib/ramaze/response.rb +38 -7
  86. data/lib/ramaze/rest.rb +36 -0
  87. data/lib/ramaze/setup.rb +101 -31
  88. data/lib/ramaze/spec.rb +1 -1
  89. data/lib/ramaze/spec/bacon.rb +6 -3
  90. data/lib/ramaze/spec/helper/bacon.rb +0 -1
  91. data/lib/ramaze/version.rb +1 -1
  92. data/lib/ramaze/view.rb +2 -11
  93. data/lib/ramaze/view/erector.rb +46 -31
  94. data/lib/ramaze/view/erubis.rb +7 -3
  95. data/lib/ramaze/view/ezamar.rb +7 -3
  96. data/lib/ramaze/view/gestalt.rb +9 -3
  97. data/lib/ramaze/view/haml.rb +7 -3
  98. data/lib/ramaze/view/liquid.rb +3 -3
  99. data/lib/ramaze/view/lokar.rb +7 -3
  100. data/lib/ramaze/view/mustache.rb +11 -5
  101. data/lib/ramaze/view/nagoro.rb +3 -3
  102. data/lib/ramaze/view/sass.rb +1 -1
  103. data/lib/ramaze/view/slippers.rb +40 -13
  104. data/lib/ramaze/view/tagz.rb +9 -5
  105. data/ramaze.gemspec +23 -128
  106. data/spec/helper.rb +5 -0
  107. data/spec/ramaze/bin/app/config.ru +11 -0
  108. data/spec/ramaze/bin/create.rb +28 -0
  109. data/spec/ramaze/bin/runner.rb +30 -0
  110. data/spec/ramaze/bin/start.rb +38 -0
  111. data/spec/ramaze/cache/memcache.rb +10 -3
  112. data/spec/ramaze/cache/sequel.rb +7 -0
  113. data/spec/ramaze/controller/provide_inheritance.rb +0 -10
  114. data/spec/ramaze/dispatcher/file.rb +19 -15
  115. data/spec/ramaze/helper/auth.rb +10 -9
  116. data/spec/ramaze/helper/blue_form.rb +121 -68
  117. data/spec/ramaze/helper/email.rb +69 -0
  118. data/spec/ramaze/helper/layout.rb +12 -15
  119. data/spec/ramaze/helper/layout/alternative.xhtml +5 -0
  120. data/spec/ramaze/helper/user.rb +2 -0
  121. data/spec/ramaze/log/growl.rb +14 -1
  122. data/spec/{contrib → ramaze}/rest.rb +1 -1
  123. data/spec/ramaze/session/memcache.rb +2 -2
  124. data/spec/ramaze/view/sass.rb +1 -1
  125. data/tasks/bacon.rake +3 -3
  126. data/tasks/gem.rake +17 -18
  127. data/tasks/rcov.rake +2 -3
  128. data/tasks/release.rake +8 -65
  129. data/tasks/setup.rake +10 -8
  130. data/tasks/todo.rake +9 -5
  131. data/tasks/yard.rake +3 -2
  132. metadata +105 -397
  133. data/MANIFEST +0 -532
  134. data/TODO.md +0 -19
  135. data/benchmark/bench_templates/bench.rb +0 -67
  136. data/benchmark/bench_templates/view/large.erb +0 -79
  137. data/benchmark/bench_templates/view/large.haml +0 -41
  138. data/benchmark/bench_templates/view/large.lok +0 -79
  139. data/benchmark/bench_templates/view/large.xhtml +0 -79
  140. data/benchmark/bench_templates/view/small.erb +0 -21
  141. data/benchmark/bench_templates/view/small.haml +0 -12
  142. data/benchmark/bench_templates/view/small.lok +0 -21
  143. data/benchmark/bench_templates/view/small.xhtml +0 -21
  144. data/benchmark/results.txt +0 -131
  145. data/benchmark/run.rb +0 -355
  146. data/benchmark/suite/minimal.rb +0 -11
  147. data/benchmark/suite/no_informer.rb +0 -7
  148. data/benchmark/suite/no_sessions.rb +0 -9
  149. data/benchmark/suite/no_template.rb +0 -7
  150. data/benchmark/suite/simple.rb +0 -5
  151. data/benchmark/suite/template_erubis.rb +0 -8
  152. data/benchmark/suite/template_etanni.rb +0 -8
  153. data/benchmark/suite/template_ezamar.rb +0 -8
  154. data/benchmark/suite/template_haml.rb +0 -13
  155. data/benchmark/suite/template_liquid.rb +0 -11
  156. data/benchmark/suite/template_markaby.rb +0 -9
  157. data/benchmark/suite/template_nagoro.rb +0 -8
  158. data/benchmark/suite/template_redcloth.rb +0 -13
  159. data/benchmark/suite/template_tenjin.rb +0 -8
  160. data/benchmark/test.rb +0 -35
  161. data/doc/FAQ +0 -92
  162. data/doc/INSTALL +0 -92
  163. data/doc/TODO +0 -29
  164. data/doc/meta/announcement.txt +0 -119
  165. data/doc/meta/configuration.txt +0 -163
  166. data/doc/meta/internals.txt +0 -278
  167. data/doc/meta/users.kml +0 -64
  168. data/doc/tutorial/todolist.html +0 -1512
  169. data/doc/tutorial/todolist.txt +0 -920
  170. data/examples/app/sourceview/public/coderay.css +0 -104
  171. data/examples/app/sourceview/public/images/file.gif +0 -0
  172. data/examples/app/sourceview/public/images/folder.gif +0 -0
  173. data/examples/app/sourceview/public/images/tv-collapsable-last.gif +0 -0
  174. data/examples/app/sourceview/public/images/tv-collapsable.gif +0 -0
  175. data/examples/app/sourceview/public/images/tv-expandable-last.gif +0 -0
  176. data/examples/app/sourceview/public/images/tv-expandable.gif +0 -0
  177. data/examples/app/sourceview/public/images/tv-item-last.gif +0 -0
  178. data/examples/app/sourceview/public/images/tv-item.gif +0 -0
  179. data/examples/app/sourceview/public/jquery.js +0 -11
  180. data/examples/app/sourceview/public/jquery.treeview.css +0 -48
  181. data/examples/app/sourceview/public/jquery.treeview.js +0 -223
  182. data/examples/app/sourceview/public/sourceview.js +0 -52
  183. data/examples/app/sourceview/start.rb +0 -79
  184. data/examples/app/sourceview/view/index.haml +0 -59
  185. data/examples/helpers/httpdigest.rb +0 -107
  186. data/lib/proto/public/css/screen.css +0 -30
  187. data/lib/proto/public/js/jquery.js +0 -7179
  188. data/lib/ramaze/contrib/addressable_route.rb +0 -56
  189. data/lib/ramaze/contrib/app_graph.rb +0 -64
  190. data/lib/ramaze/contrib/email.rb +0 -88
  191. data/lib/ramaze/contrib/facebook.rb +0 -23
  192. data/lib/ramaze/contrib/facebook/facebook.rb +0 -171
  193. data/lib/ramaze/contrib/gettext.rb +0 -113
  194. data/lib/ramaze/contrib/gettext/mo.rb +0 -155
  195. data/lib/ramaze/contrib/gettext/parser.rb +0 -46
  196. data/lib/ramaze/contrib/gettext/po.rb +0 -109
  197. data/lib/ramaze/contrib/gzip_filter.rb +0 -1
  198. data/lib/ramaze/contrib/maruku_uv.rb +0 -59
  199. data/lib/ramaze/contrib/profiling.rb +0 -36
  200. data/lib/ramaze/contrib/rest.rb +0 -23
  201. data/lib/ramaze/contrib/sequel/create_join.rb +0 -26
  202. data/lib/ramaze/contrib/sequel/form_field.rb +0 -129
  203. data/lib/ramaze/contrib/sequel/image.rb +0 -196
  204. data/lib/ramaze/contrib/sequel/relation.rb +0 -98
  205. data/lib/ramaze/helper/httpdigest.rb +0 -96
  206. data/lib/ramaze/tool/bin.rb +0 -340
  207. data/lib/ramaze/tool/create.rb +0 -48
  208. data/lib/ramaze/tool/project_creator.rb +0 -120
  209. data/lib/ramaze/view/less.rb +0 -12
  210. data/lib/ramaze/view/maruku.rb +0 -15
  211. data/lib/ramaze/view/redcloth.rb +0 -21
  212. data/spec/contrib/addressable_route.rb +0 -30
  213. data/spec/examples/helpers/httpdigest.rb +0 -64
  214. data/spec/examples/templates/template_redcloth.rb +0 -13
  215. data/spec/ramaze/bin/ramaze.rb +0 -96
  216. data/spec/ramaze/helper/httpdigest.rb +0 -176
  217. data/spec/ramaze/view/less.rb +0 -60
  218. data/spec/ramaze/view/less/file.css.less +0 -8
  219. data/spec/ramaze/view/redcloth.rb +0 -66
  220. data/spec/ramaze/view/redcloth/external.redcloth +0 -8
  221. data/tasks/copyright.rake +0 -21
  222. data/tasks/gem_setup.rake +0 -112
  223. data/tasks/git.rake +0 -46
  224. data/tasks/grancher.rake +0 -12
  225. data/tasks/jquery.rake +0 -15
  226. data/tasks/manifest.rake +0 -4
  227. data/tasks/metric_changes.rake +0 -24
  228. data/tasks/reversion.rake +0 -8
  229. data/tasks/traits.rake +0 -21
data/ramaze.gemspec CHANGED
@@ -1,133 +1,28 @@
1
- # -*- encoding: utf-8 -*-
1
+ require File.expand_path('../lib/ramaze/version' , __FILE__)
2
+ require File.expand_path('../lib/ramaze/dependencies', __FILE__)
2
3
 
3
- Gem::Specification.new do |s|
4
- s.name = %q{ramaze}
5
- s.version = "2011.01.30"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Michael 'manveru' Fellinger"]
9
- s.date = %q{2011-01-30}
10
- s.default_executable = %q{ramaze}
11
- s.description = %q{Ramaze is a simple and modular web framework}
12
- s.email = %q{m.fellinger@gmail.com}
13
- s.executables = ["ramaze"]
14
- s.files = [".gitignore", ".mailmap", "MANIFEST", "README.md", "Rakefile", "TODO.md", "benchmark/bench_templates/bench.rb", "benchmark/bench_templates/view/large.erb", "benchmark/bench_templates/view/large.haml", "benchmark/bench_templates/view/large.lok", "benchmark/bench_templates/view/large.xhtml", "benchmark/bench_templates/view/small.erb", "benchmark/bench_templates/view/small.haml", "benchmark/bench_templates/view/small.lok", "benchmark/bench_templates/view/small.xhtml", "benchmark/results.txt", "benchmark/run.rb", "benchmark/suite/minimal.rb", "benchmark/suite/no_informer.rb", "benchmark/suite/no_sessions.rb", "benchmark/suite/no_template.rb", "benchmark/suite/simple.rb", "benchmark/suite/template_erubis.rb", "benchmark/suite/template_etanni.rb", "benchmark/suite/template_ezamar.rb", "benchmark/suite/template_haml.rb", "benchmark/suite/template_liquid.rb", "benchmark/suite/template_markaby.rb", "benchmark/suite/template_nagoro.rb", "benchmark/suite/template_redcloth.rb", "benchmark/suite/template_tenjin.rb", "benchmark/test.rb", "bin/ramaze", "doc/AUTHORS", "doc/CHANGELOG", "doc/COPYING", "doc/FAQ", "doc/GPL", "doc/INSTALL", "doc/LEGAL", "doc/TODO", "doc/meta/announcement.txt", "doc/meta/configuration.txt", "doc/meta/internals.txt", "doc/meta/users.kml", "doc/tutorial/todolist.html", "doc/tutorial/todolist.txt", "examples/app/auth/layout/auth.xhtml", "examples/app/auth/start.rb", "examples/app/auth/view/index.xhtml", "examples/app/auth/view/login.xhtml", "examples/app/auth/view/secret.xhtml", "examples/app/blog/README", "examples/app/blog/app.rb", "examples/app/blog/config.ru", "examples/app/blog/controller/comment.rb", "examples/app/blog/controller/entry.rb", "examples/app/blog/controller/init.rb", "examples/app/blog/controller/main.rb", "examples/app/blog/controller/tag.rb", "examples/app/blog/layout/default.nag", "examples/app/blog/model/comment.rb", "examples/app/blog/model/entry.rb", "examples/app/blog/model/init.rb", "examples/app/blog/model/tag.rb", "examples/app/blog/public/css/screen.css", "examples/app/blog/spec/blog.rb", "examples/app/blog/start.rb", "examples/app/blog/view/comment/form.nag", "examples/app/blog/view/comment/show.nag", "examples/app/blog/view/entry/edit.nag", "examples/app/blog/view/entry/feed.atom.nag", "examples/app/blog/view/entry/feed.rss.nag", "examples/app/blog/view/entry/index.nag", "examples/app/blog/view/entry/new.nag", "examples/app/blog/view/entry/show.nag", "examples/app/blog/view/feed.atom.nag", "examples/app/blog/view/feed.rss.nag", "examples/app/blog/view/index.nag", "examples/app/blog/view/tag/index.nag", "examples/app/chat/layout/default.xhtml", "examples/app/chat/model/history.rb", "examples/app/chat/model/message.rb", "examples/app/chat/public/css/chat.css", "examples/app/chat/public/js/chat.js", "examples/app/chat/public/js/jquery.js", "examples/app/chat/start.rb", "examples/app/chat/view/chat.xhtml", "examples/app/chat/view/index.xhtml", "examples/app/localization/locale/de.yaml", "examples/app/localization/locale/en.yaml", "examples/app/localization/locale/ja.yaml", "examples/app/localization/start.rb", "examples/app/sourceview/public/coderay.css", "examples/app/sourceview/public/images/file.gif", "examples/app/sourceview/public/images/folder.gif", "examples/app/sourceview/public/images/tv-collapsable-last.gif", "examples/app/sourceview/public/images/tv-collapsable.gif", "examples/app/sourceview/public/images/tv-expandable-last.gif", "examples/app/sourceview/public/images/tv-expandable.gif", "examples/app/sourceview/public/images/tv-item-last.gif", "examples/app/sourceview/public/images/tv-item.gif", "examples/app/sourceview/public/jquery.js", "examples/app/sourceview/public/jquery.treeview.css", "examples/app/sourceview/public/jquery.treeview.js", "examples/app/sourceview/public/sourceview.js", "examples/app/sourceview/start.rb", "examples/app/sourceview/view/index.haml", "examples/app/todolist/controller/init.rb", "examples/app/todolist/controller/task.rb", "examples/app/todolist/layout/default.xhtml", "examples/app/todolist/model/init.rb", "examples/app/todolist/model/task.rb", "examples/app/todolist/public/css/screen.css", "examples/app/todolist/public/favicon.ico", "examples/app/todolist/start.rb", "examples/app/todolist/view/index.xhtml", "examples/app/upload/start.rb", "examples/app/upload/view/index.xhtml", "examples/app/whywiki/spec/whywiki.rb", "examples/app/whywiki/start.rb", "examples/app/whywiki/template/edit.xhtml", "examples/app/whywiki/template/show.xhtml", "examples/app/wikore/spec/wikore.rb", "examples/app/wikore/src/controller.rb", "examples/app/wikore/src/model.rb", "examples/app/wikore/start.rb", "examples/app/wikore/view/index.xhtml", "examples/app/wiktacular/README", "examples/app/wiktacular/layout/application.xhtml", "examples/app/wiktacular/mkd/link/2007-07-20_19-45-51.mkd", "examples/app/wiktacular/mkd/link/current.mkd", "examples/app/wiktacular/mkd/main/2007-07-20_16-31-33.mkd", "examples/app/wiktacular/mkd/main/2007-07-20_19-21-12.mkd", "examples/app/wiktacular/mkd/main/2007-07-20_19-23-10.mkd", "examples/app/wiktacular/mkd/main/2007-07-20_19-45-07.mkd", "examples/app/wiktacular/mkd/main/current.mkd", "examples/app/wiktacular/mkd/markdown/current.mkd", "examples/app/wiktacular/mkd/testing/2007-07-20_16-43-46.mkd", "examples/app/wiktacular/mkd/testing/2007-07-20_19-43-50.mkd", "examples/app/wiktacular/mkd/testing/2007-07-21_18-46-01.mkd", "examples/app/wiktacular/mkd/testing/2007-07-21_18-46-32.mkd", "examples/app/wiktacular/mkd/testing/2007-07-21_18-47-08.mkd", "examples/app/wiktacular/mkd/testing/2007-07-21_18-47-54.mkd", "examples/app/wiktacular/mkd/testing/current.mkd", "examples/app/wiktacular/public/favicon.ico", "examples/app/wiktacular/public/screen.css", "examples/app/wiktacular/spec/wiktacular.rb", "examples/app/wiktacular/src/controller.rb", "examples/app/wiktacular/src/model.rb", "examples/app/wiktacular/start.rb", "examples/app/wiktacular/view/edit.xhtml", "examples/app/wiktacular/view/index.xhtml", "examples/app/wiktacular/view/new.xhtml", "examples/basic/element.rb", "examples/basic/gestalt.rb", "examples/basic/hello.rb", "examples/basic/layout.rb", "examples/basic/linking.rb", "examples/basic/partial.rb", "examples/basic/simple.rb", "examples/helpers/cache.rb", "examples/helpers/httpdigest.rb", "examples/helpers/identity.rb", "examples/helpers/paginate.rb", "examples/helpers/rest.rb", "examples/helpers/simple_captcha.rb", "examples/misc/css.rb", "examples/misc/facebook.rb", "examples/misc/memleak_detector.rb", "examples/misc/nagoro_element.rb", "examples/misc/ramaise.rb", "examples/misc/rapp.rb", "examples/misc/sequel_scaffolding.rb", "examples/misc/serve_directory.rb", "examples/templates/template_erubis.rb", "examples/templates/template_ezamar.rb", "examples/templates/template_haml.rb", "examples/templates/template_liquid.rb", "examples/templates/template_markaby.rb", "examples/templates/template_mustache.rb", "examples/templates/template_nagoro.rb", "examples/templates/template_redcloth.rb", "examples/templates/template_remarkably.rb", "examples/templates/template_tenjin.rb", "examples/templates/view/external.haml", "examples/templates/view/external.liquid", "examples/templates/view/external.mab", "examples/templates/view/external.mt", "examples/templates/view/external.nag", "examples/templates/view/external.redcloth", "examples/templates/view/external.rem", "examples/templates/view/external.rhtml", "examples/templates/view/external.tenjin", "examples/templates/view/external.zmr", "lib/proto/app.rb", "lib/proto/config.ru", "lib/proto/controller/init.rb", "lib/proto/controller/main.rb", "lib/proto/layout/default.xhtml", "lib/proto/model/init.rb", "lib/proto/public/.htaccess", "lib/proto/public/css/screen.css", "lib/proto/public/dispatch.fcgi", "lib/proto/public/favicon.ico", "lib/proto/public/js/jquery.js", "lib/proto/public/ramaze.png", "lib/proto/spec/main.rb", "lib/proto/start.rb", "lib/proto/view/index.xhtml", "lib/ramaze.rb", "lib/ramaze/app.rb", "lib/ramaze/cache.rb", "lib/ramaze/cache/localmemcache.rb", "lib/ramaze/cache/lru.rb", "lib/ramaze/cache/memcache.rb", "lib/ramaze/cache/sequel.rb", "lib/ramaze/contrib/addressable_route.rb", "lib/ramaze/contrib/app_graph.rb", "lib/ramaze/contrib/email.rb", "lib/ramaze/contrib/facebook.rb", "lib/ramaze/contrib/facebook/facebook.rb", "lib/ramaze/contrib/gettext.rb", "lib/ramaze/contrib/gettext/mo.rb", "lib/ramaze/contrib/gettext/parser.rb", "lib/ramaze/contrib/gettext/po.rb", "lib/ramaze/contrib/gzip_filter.rb", "lib/ramaze/contrib/maruku_uv.rb", "lib/ramaze/contrib/profiling.rb", "lib/ramaze/contrib/rest.rb", "lib/ramaze/contrib/sequel/create_join.rb", "lib/ramaze/contrib/sequel/form_field.rb", "lib/ramaze/contrib/sequel/image.rb", "lib/ramaze/contrib/sequel/relation.rb", "lib/ramaze/controller.rb", "lib/ramaze/controller/default.rb", "lib/ramaze/current.rb", "lib/ramaze/files.rb", "lib/ramaze/gestalt.rb", "lib/ramaze/helper.rb", "lib/ramaze/helper/auth.rb", "lib/ramaze/helper/bench.rb", "lib/ramaze/helper/blue_form.rb", "lib/ramaze/helper/cache.rb", "lib/ramaze/helper/csrf.rb", "lib/ramaze/helper/disqus.rb", "lib/ramaze/helper/erector.rb", "lib/ramaze/helper/flash.rb", "lib/ramaze/helper/formatting.rb", "lib/ramaze/helper/gestalt.rb", "lib/ramaze/helper/gravatar.rb", "lib/ramaze/helper/httpdigest.rb", "lib/ramaze/helper/identity.rb", "lib/ramaze/helper/layout.rb", "lib/ramaze/helper/link.rb", "lib/ramaze/helper/localize.rb", "lib/ramaze/helper/markaby.rb", "lib/ramaze/helper/maruku.rb", "lib/ramaze/helper/paginate.rb", "lib/ramaze/helper/remarkably.rb", "lib/ramaze/helper/request_accessor.rb", "lib/ramaze/helper/send_file.rb", "lib/ramaze/helper/simple_captcha.rb", "lib/ramaze/helper/stack.rb", "lib/ramaze/helper/tagz.rb", "lib/ramaze/helper/thread.rb", "lib/ramaze/helper/ultraviolet.rb", "lib/ramaze/helper/user.rb", "lib/ramaze/helper/xhtml.rb", "lib/ramaze/log.rb", "lib/ramaze/log/analogger.rb", "lib/ramaze/log/growl.rb", "lib/ramaze/log/hub.rb", "lib/ramaze/log/informer.rb", "lib/ramaze/log/knotify.rb", "lib/ramaze/log/logger.rb", "lib/ramaze/log/logging.rb", "lib/ramaze/log/rotatinginformer.rb", "lib/ramaze/log/syslog.rb", "lib/ramaze/log/xosd.rb", "lib/ramaze/middleware_compiler.rb", "lib/ramaze/plugin.rb", "lib/ramaze/reloader.rb", "lib/ramaze/reloader/watch_inotify.rb", "lib/ramaze/reloader/watch_stat.rb", "lib/ramaze/request.rb", "lib/ramaze/response.rb", "lib/ramaze/setup.rb", "lib/ramaze/snippets.rb", "lib/ramaze/snippets/array/put_within.rb", "lib/ramaze/snippets/binding/locals.rb", "lib/ramaze/snippets/blankslate.rb", "lib/ramaze/snippets/fiber.rb", "lib/ramaze/snippets/kernel/pretty_inspect.rb", "lib/ramaze/snippets/metaid.rb", "lib/ramaze/snippets/numeric/filesize_format.rb", "lib/ramaze/snippets/numeric/time.rb", "lib/ramaze/snippets/object/__dir__.rb", "lib/ramaze/snippets/object/instance_variable_defined.rb", "lib/ramaze/snippets/object/pretty.rb", "lib/ramaze/snippets/object/scope.rb", "lib/ramaze/snippets/ordered_set.rb", "lib/ramaze/snippets/proc/locals.rb", "lib/ramaze/snippets/ramaze/acquire.rb", "lib/ramaze/snippets/ramaze/deprecated.rb", "lib/ramaze/snippets/ramaze/dictionary.rb", "lib/ramaze/snippets/ramaze/fiber.rb", "lib/ramaze/snippets/ramaze/lru_hash.rb", "lib/ramaze/snippets/ramaze/struct.rb", "lib/ramaze/snippets/string/camel_case.rb", "lib/ramaze/snippets/string/color.rb", "lib/ramaze/snippets/string/end_with.rb", "lib/ramaze/snippets/string/esc.rb", "lib/ramaze/snippets/string/ord.rb", "lib/ramaze/snippets/string/snake_case.rb", "lib/ramaze/snippets/string/start_with.rb", "lib/ramaze/snippets/string/unindent.rb", "lib/ramaze/snippets/thread/into.rb", "lib/ramaze/spec.rb", "lib/ramaze/spec/bacon.rb", "lib/ramaze/spec/helper/bacon.rb", "lib/ramaze/spec/helper/pretty_output.rb", "lib/ramaze/spec/helper/snippets.rb", "lib/ramaze/spec/helper/template_examples.rb", "lib/ramaze/tool/bin.rb", "lib/ramaze/tool/create.rb", "lib/ramaze/tool/project_creator.rb", "lib/ramaze/version.rb", "lib/ramaze/view.rb", "lib/ramaze/view/erector.rb", "lib/ramaze/view/erubis.rb", "lib/ramaze/view/ezamar.rb", "lib/ramaze/view/gestalt.rb", "lib/ramaze/view/haml.rb", "lib/ramaze/view/less.rb", "lib/ramaze/view/liquid.rb", "lib/ramaze/view/lokar.rb", "lib/ramaze/view/maruku.rb", "lib/ramaze/view/mustache.rb", "lib/ramaze/view/nagoro.rb", "lib/ramaze/view/nagoro/render_partial.rb", "lib/ramaze/view/redcloth.rb", "lib/ramaze/view/remarkably.rb", "lib/ramaze/view/sass.rb", "lib/ramaze/view/slippers.rb", "lib/ramaze/view/tagz.rb", "lib/ramaze/view/tenjin.rb", "lib/vendor/route_exceptions.rb", "ramaze.gemspec", "spec/contrib/addressable_route.rb", "spec/contrib/rest.rb", "spec/examples/caching.rb", "spec/examples/css.rb", "spec/examples/element.rb", "spec/examples/hello.rb", "spec/examples/helpers/httpdigest.rb", "spec/examples/linking.rb", "spec/examples/misc/sequel_scaffolding.rb", "spec/examples/simple.rb", "spec/examples/templates/template_erubis.rb", "spec/examples/templates/template_ezamar.rb", "spec/examples/templates/template_haml.rb", "spec/examples/templates/template_liquid.rb", "spec/examples/templates/template_markaby.rb", "spec/examples/templates/template_mustache.rb", "spec/examples/templates/template_nagoro.rb", "spec/examples/templates/template_redcloth.rb", "spec/examples/templates/template_remarkably.rb", "spec/examples/templates/template_tenjin.rb", "spec/examples/todolist.rb", "spec/helper.rb", "spec/ramaze/action/render.rb", "spec/ramaze/action/view/bar.xhtml", "spec/ramaze/action/view/instancevars/layout.xhtml", "spec/ramaze/action/view/other_wrapper.erb", "spec/ramaze/action/view/other_wrapper.xhtml", "spec/ramaze/action/view/single_wrapper.xhtml", "spec/ramaze/action/view/sub/sub_wrapper.erb", "spec/ramaze/action/view/sub/sub_wrapper.xhtml", "spec/ramaze/app.rb", "spec/ramaze/app/location.rb", "spec/ramaze/bin/ramaze.rb", "spec/ramaze/cache/localmemcache.rb", "spec/ramaze/cache/lru.rb", "spec/ramaze/cache/memcache.rb", "spec/ramaze/cache/sequel.rb", "spec/ramaze/controller/actionless_templates.rb", "spec/ramaze/controller/lonely_mapping.rb", "spec/ramaze/controller/mapping.rb", "spec/ramaze/controller/provide_inheritance.rb", "spec/ramaze/controller/resolve.rb", "spec/ramaze/controller/subclass.rb", "spec/ramaze/controller/template_resolving.rb", "spec/ramaze/controller/view/bar.xhtml", "spec/ramaze/controller/view/base/another.xhtml", "spec/ramaze/controller/view/greet.xhtml", "spec/ramaze/controller/view/list.xhtml", "spec/ramaze/controller/view/other/greet/other.xhtml", "spec/ramaze/controller/view/other_wrapper.xhtml", "spec/ramaze/dispatcher/directory.rb", "spec/ramaze/dispatcher/file.rb", "spec/ramaze/dispatcher/public/favicon.ico", "spec/ramaze/dispatcher/public/file name.txt", "spec/ramaze/dispatcher/public/test_download.css", "spec/ramaze/error.rb", "spec/ramaze/files.rb", "spec/ramaze/files/public_1/plain.txt", "spec/ramaze/files/public_2/rich.txt", "spec/ramaze/gestalt.rb", "spec/ramaze/helper/auth.rb", "spec/ramaze/helper/bench.rb", "spec/ramaze/helper/blue_form.rb", "spec/ramaze/helper/cache.rb", "spec/ramaze/helper/csrf.rb", "spec/ramaze/helper/flash.rb", "spec/ramaze/helper/formatting.rb", "spec/ramaze/helper/gestalt.rb", "spec/ramaze/helper/gravatar.rb", "spec/ramaze/helper/httpdigest.rb", "spec/ramaze/helper/layout.rb", "spec/ramaze/helper/layout/default.xhtml", "spec/ramaze/helper/link.rb", "spec/ramaze/helper/localize.rb", "spec/ramaze/helper/maruku.rb", "spec/ramaze/helper/paginate.rb", "spec/ramaze/helper/request_accessor.rb", "spec/ramaze/helper/simple_captcha.rb", "spec/ramaze/helper/stack.rb", "spec/ramaze/helper/user.rb", "spec/ramaze/helper/view/locals.xhtml", "spec/ramaze/helper/view/loop.xhtml", "spec/ramaze/helper/view/num.xhtml", "spec/ramaze/helper/view/partial.xhtml", "spec/ramaze/helper/view/recursive.xhtml", "spec/ramaze/helper/view/recursive_local_ivars.xhtml", "spec/ramaze/helper/view/recursive_locals.xhtml", "spec/ramaze/helper/view/test_template.xhtml", "spec/ramaze/helper/xhtml.rb", "spec/ramaze/log/growl.rb", "spec/ramaze/log/informer.rb", "spec/ramaze/log/logging.rb", "spec/ramaze/log/syslog.rb", "spec/ramaze/params.rb", "spec/ramaze/public/favicon.ico", "spec/ramaze/public/ramaze.png", "spec/ramaze/public/test_download.css", "spec/ramaze/request.rb", "spec/ramaze/rewrite/file.css", "spec/ramaze/session/memcache.rb", "spec/ramaze/struct.rb", "spec/ramaze/template/ramaze/external.test", "spec/ramaze/view.rb", "spec/ramaze/view/erector.rb", "spec/ramaze/view/erector/external_view.erector", "spec/ramaze/view/erector/index.erector", "spec/ramaze/view/erector/layout.erector", "spec/ramaze/view/erector/tables.erector", "spec/ramaze/view/erector/view.erector", "spec/ramaze/view/erubis.rb", "spec/ramaze/view/erubis/external.rhtml", "spec/ramaze/view/erubis/sum.rhtml", "spec/ramaze/view/ezamar.rb", "spec/ramaze/view/ezamar/external.zmr", "spec/ramaze/view/ezamar/sum.zmr", "spec/ramaze/view/gestalt.rb", "spec/ramaze/view/gestalt/external.ges", "spec/ramaze/view/haml.rb", "spec/ramaze/view/haml/external.haml", "spec/ramaze/view/haml/sum.haml", "spec/ramaze/view/less.rb", "spec/ramaze/view/less/file.css.less", "spec/ramaze/view/liquid.rb", "spec/ramaze/view/liquid/external.liquid", "spec/ramaze/view/liquid/sum.liquid", "spec/ramaze/view/lokar.rb", "spec/ramaze/view/lokar/external.lok", "spec/ramaze/view/lokar/sum.lok", "spec/ramaze/view/mustache.rb", "spec/ramaze/view/mustache/external.mt", "spec/ramaze/view/mustache/sum.mt", "spec/ramaze/view/nagoro.rb", "spec/ramaze/view/nagoro/external.nag", "spec/ramaze/view/nagoro/sum.nag", "spec/ramaze/view/redcloth.rb", "spec/ramaze/view/redcloth/external.redcloth", "spec/ramaze/view/remarkably.rb", "spec/ramaze/view/remarkably/external.rem", "spec/ramaze/view/remarkably/sum.rem", "spec/ramaze/view/sass.rb", "spec/ramaze/view/sass/file.css.sass", "spec/ramaze/view/slippers.rb", "spec/ramaze/view/slippers/external.st", "spec/ramaze/view/slippers/sum.st", "spec/ramaze/view/tagz.rb", "spec/ramaze/view/tagz/external.tagz", "spec/ramaze/view/tagz/sum.tagz", "spec/ramaze/view/tenjin.rb", "spec/ramaze/view/tenjin/external.rbhtml", "spec/ramaze/view/tenjin/sum.rbhtml", "spec/snippets/array/put_within.rb", "spec/snippets/binding/locals.rb", "spec/snippets/numeric/filesize_format.rb", "spec/snippets/numeric/time.rb", "spec/snippets/object/__dir__.rb", "spec/snippets/ordered_set.rb", "spec/snippets/ramaze/acquire.rb", "spec/snippets/ramaze/dictionary.rb", "spec/snippets/ramaze/lru_hash.rb", "spec/snippets/ramaze/struct.rb", "spec/snippets/string/camel_case.rb", "spec/snippets/string/color.rb", "spec/snippets/string/snake_case.rb", "spec/snippets/string/unindent.rb", "spec/snippets/thread/into.rb", "tasks/authors.rake", "tasks/bacon.rake", "tasks/changelog.rake", "tasks/copyright.rake", "tasks/gem.rake", "tasks/gem_setup.rake", "tasks/git.rake", "tasks/grancher.rake", "tasks/jquery.rake", "tasks/manifest.rake", "tasks/metric_changes.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/setup.rake", "tasks/todo.rake", "tasks/traits.rake", "tasks/yard.rake"]
15
- s.homepage = %q{http://ramaze.net}
16
- s.post_install_message = %q{============================================================
17
-
18
- Thank you for installing Ramaze!
19
- To create a new project:
20
- $ ramaze create yourproject
4
+ # Get all the files from the manifest
5
+ path = File.expand_path('../', __FILE__)
21
6
 
22
- ============================================================}
23
- s.require_paths = ["lib"]
24
- s.rubyforge_project = %q{ramaze}
25
- s.rubygems_version = %q{1.3.7}
26
- s.summary = %q{Ramaze is a simple and modular web framework}
7
+ Gem::Specification.new do |s|
8
+ s.name = 'ramaze'
9
+ s.version = Ramaze::VERSION
10
+ s.date = '25-07-2011'
11
+ s.authors = ['Michael \'manveru\' Fellinger']
12
+ s.email = 'm.fellinger@gmail.com'
13
+ s.summary = 'Ramaze is a simple and modular web framework'
14
+ s.homepage = 'http://ramaze.net/'
15
+ s.description = s.summary
16
+ s.required_rubygems_version = '>= 1.3.5'
17
+ s.files = `cd #{path}; git ls-files`.split("\n").sort
18
+ s.has_rdoc = 'yard'
19
+ s.executables = ['ramaze']
27
20
 
28
- if s.respond_to? :specification_version then
29
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
30
- s.specification_version = 3
21
+ Ramaze::DEPENDENCIES.each do |dep|
22
+ s.add_dependency(dep[:name], dep[:version])
23
+ end
31
24
 
32
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
33
- s.add_runtime_dependency(%q<innate>, [">= 2010.03"])
34
- s.add_development_dependency(%q<abstract>, ["= 1.0.0"])
35
- s.add_development_dependency(%q<addressable>, ["= 2.1.1"])
36
- s.add_development_dependency(%q<bacon>, ["= 1.1.0"])
37
- s.add_development_dependency(%q<builder>, ["= 2.1.2"])
38
- s.add_development_dependency(%q<erector>, ["= 0.7.2"])
39
- s.add_development_dependency(%q<erubis>, ["= 2.6.5"])
40
- s.add_development_dependency(%q<ezamar>, ["= 2009.06"])
41
- s.add_development_dependency(%q<haml>, ["= 2.2.22"])
42
- s.add_development_dependency(%q<hpricot>, ["= 0.8.2"])
43
- s.add_development_dependency(%q<json>, ["= 1.2.3"])
44
- s.add_development_dependency(%q<less>, ["= 1.2.21"])
45
- s.add_development_dependency(%q<liquid>, ["= 2.0.0"])
46
- s.add_development_dependency(%q<locale>, ["= 2.0.5"])
47
- s.add_development_dependency(%q<lokar>, ["= 0.1.0"])
48
- s.add_development_dependency(%q<maruku>, ["= 0.6.0"])
49
- s.add_development_dependency(%q<memcache-client>, ["= 1.8.1"])
50
- s.add_development_dependency(%q<mustache>, ["= 0.9.2"])
51
- s.add_development_dependency(%q<mutter>, ["= 0.5.3"])
52
- s.add_development_dependency(%q<nagoro>, ["= 2009.05"])
53
- s.add_development_dependency(%q<rack-contrib>, ["= 0.9.2"])
54
- s.add_development_dependency(%q<rack-test>, ["= 0.5.3"])
55
- s.add_development_dependency(%q<RedCloth>, ["= 4.2.3"])
56
- s.add_development_dependency(%q<Remarkably>, ["= 0.5.2"])
57
- s.add_development_dependency(%q<RubyInline>, ["= 3.8.4"])
58
- s.add_development_dependency(%q<sequel>, ["= 3.9.0"])
59
- s.add_development_dependency(%q<scaffolding_extensions>, ["= 1.4.0"])
60
- s.add_development_dependency(%q<slippers>, ["= 0.0.14"])
61
- s.add_development_dependency(%q<sqlite3-ruby>, ["= 1.2.5"])
62
- s.add_development_dependency(%q<tagz>, ["= 7.2.3"])
63
- s.add_development_dependency(%q<tenjin>, ["= 0.6.1"])
64
- s.add_development_dependency(%q<localmemcache>, ["= 0.4.4"])
65
- else
66
- s.add_dependency(%q<innate>, [">= 2010.03"])
67
- s.add_dependency(%q<abstract>, ["= 1.0.0"])
68
- s.add_dependency(%q<addressable>, ["= 2.1.1"])
69
- s.add_dependency(%q<bacon>, ["= 1.1.0"])
70
- s.add_dependency(%q<builder>, ["= 2.1.2"])
71
- s.add_dependency(%q<erector>, ["= 0.7.2"])
72
- s.add_dependency(%q<erubis>, ["= 2.6.5"])
73
- s.add_dependency(%q<ezamar>, ["= 2009.06"])
74
- s.add_dependency(%q<haml>, ["= 2.2.22"])
75
- s.add_dependency(%q<hpricot>, ["= 0.8.2"])
76
- s.add_dependency(%q<json>, ["= 1.2.3"])
77
- s.add_dependency(%q<less>, ["= 1.2.21"])
78
- s.add_dependency(%q<liquid>, ["= 2.0.0"])
79
- s.add_dependency(%q<locale>, ["= 2.0.5"])
80
- s.add_dependency(%q<lokar>, ["= 0.1.0"])
81
- s.add_dependency(%q<maruku>, ["= 0.6.0"])
82
- s.add_dependency(%q<memcache-client>, ["= 1.8.1"])
83
- s.add_dependency(%q<mustache>, ["= 0.9.2"])
84
- s.add_dependency(%q<mutter>, ["= 0.5.3"])
85
- s.add_dependency(%q<nagoro>, ["= 2009.05"])
86
- s.add_dependency(%q<rack-contrib>, ["= 0.9.2"])
87
- s.add_dependency(%q<rack-test>, ["= 0.5.3"])
88
- s.add_dependency(%q<RedCloth>, ["= 4.2.3"])
89
- s.add_dependency(%q<Remarkably>, ["= 0.5.2"])
90
- s.add_dependency(%q<RubyInline>, ["= 3.8.4"])
91
- s.add_dependency(%q<sequel>, ["= 3.9.0"])
92
- s.add_dependency(%q<scaffolding_extensions>, ["= 1.4.0"])
93
- s.add_dependency(%q<slippers>, ["= 0.0.14"])
94
- s.add_dependency(%q<sqlite3-ruby>, ["= 1.2.5"])
95
- s.add_dependency(%q<tagz>, ["= 7.2.3"])
96
- s.add_dependency(%q<tenjin>, ["= 0.6.1"])
97
- s.add_dependency(%q<localmemcache>, ["= 0.4.4"])
98
- end
99
- else
100
- s.add_dependency(%q<innate>, [">= 2010.03"])
101
- s.add_dependency(%q<abstract>, ["= 1.0.0"])
102
- s.add_dependency(%q<addressable>, ["= 2.1.1"])
103
- s.add_dependency(%q<bacon>, ["= 1.1.0"])
104
- s.add_dependency(%q<builder>, ["= 2.1.2"])
105
- s.add_dependency(%q<erector>, ["= 0.7.2"])
106
- s.add_dependency(%q<erubis>, ["= 2.6.5"])
107
- s.add_dependency(%q<ezamar>, ["= 2009.06"])
108
- s.add_dependency(%q<haml>, ["= 2.2.22"])
109
- s.add_dependency(%q<hpricot>, ["= 0.8.2"])
110
- s.add_dependency(%q<json>, ["= 1.2.3"])
111
- s.add_dependency(%q<less>, ["= 1.2.21"])
112
- s.add_dependency(%q<liquid>, ["= 2.0.0"])
113
- s.add_dependency(%q<locale>, ["= 2.0.5"])
114
- s.add_dependency(%q<lokar>, ["= 0.1.0"])
115
- s.add_dependency(%q<maruku>, ["= 0.6.0"])
116
- s.add_dependency(%q<memcache-client>, ["= 1.8.1"])
117
- s.add_dependency(%q<mustache>, ["= 0.9.2"])
118
- s.add_dependency(%q<mutter>, ["= 0.5.3"])
119
- s.add_dependency(%q<nagoro>, ["= 2009.05"])
120
- s.add_dependency(%q<rack-contrib>, ["= 0.9.2"])
121
- s.add_dependency(%q<rack-test>, ["= 0.5.3"])
122
- s.add_dependency(%q<RedCloth>, ["= 4.2.3"])
123
- s.add_dependency(%q<Remarkably>, ["= 0.5.2"])
124
- s.add_dependency(%q<RubyInline>, ["= 3.8.4"])
125
- s.add_dependency(%q<sequel>, ["= 3.9.0"])
126
- s.add_dependency(%q<scaffolding_extensions>, ["= 1.4.0"])
127
- s.add_dependency(%q<slippers>, ["= 0.0.14"])
128
- s.add_dependency(%q<sqlite3-ruby>, ["= 1.2.5"])
129
- s.add_dependency(%q<tagz>, ["= 7.2.3"])
130
- s.add_dependency(%q<tenjin>, ["= 0.6.1"])
131
- s.add_dependency(%q<localmemcache>, ["= 0.4.4"])
25
+ Ramaze::DEVELOPMENT_DEPENDENCIES.each do |dep|
26
+ s.add_development_dependency(dep[:name], dep[:version])
132
27
  end
133
- end
28
+ end # Gem::Specification.new
data/spec/helper.rb CHANGED
@@ -7,3 +7,8 @@ end
7
7
  require File.expand_path('../../lib/ramaze/spec/bacon', __FILE__)
8
8
 
9
9
  Ramaze.options.roots = [caller_root] if caller_root
10
+
11
+ module Ramaze
12
+ BINPATH = __DIR__('../bin/ramaze')
13
+ BIN_APP = __DIR__('ramaze/bin/app')
14
+ end
@@ -0,0 +1,11 @@
1
+ require File.expand_path('../../../../../lib/ramaze', __FILE__)
2
+
3
+ class MainController < Ramaze::Controller
4
+ map '/'
5
+
6
+ def index; end
7
+ end
8
+
9
+ Ramaze.start(:root => __DIR__, :started => true)
10
+
11
+ run Ramaze
@@ -0,0 +1,28 @@
1
+ require File.expand_path('../../../../spec/helper', __FILE__)
2
+ require __DIR__('../../../lib/ramaze/bin/runner')
3
+ require 'fileutils'
4
+
5
+ describe('Ramaze::Bin::Create') do
6
+
7
+ it('Show a help message') do
8
+ help = `#{Ramaze::BINPATH} create -h`.strip
9
+
10
+ help.include?(Ramaze::Bin::Create::Banner).should === true
11
+ end
12
+
13
+ it('Warn when no name is given') do
14
+ output = `#{Ramaze::BINPATH} create 2>&1`.strip
15
+
16
+ output.should === 'You need to specify a name for your application'
17
+ end
18
+
19
+ it('Create a new application') do
20
+ output = `#{Ramaze::BINPATH} create /tmp/ramaze`.strip
21
+
22
+ File.directory?('/tmp/ramaze').should === true
23
+ File.exist?('/tmp/ramaze/app.rb').should === true
24
+
25
+ FileUtils.rm_rf('/tmp/ramaze')
26
+ end
27
+
28
+ end
@@ -0,0 +1,30 @@
1
+ require File.expand_path('../../../../spec/helper', __FILE__)
2
+ require __DIR__('../../../lib/ramaze/bin/runner')
3
+
4
+ describe('Ramaze::Bin::Runner') do
5
+
6
+ it('Executable should exist and should be readable') do
7
+ File.exist?(Ramaze::BINPATH).should === true
8
+ File.readable?(Ramaze::BINPATH).should === true
9
+ end
10
+
11
+ it('Should show a help message') do
12
+ help, help_1 = `#{Ramaze::BINPATH}`.strip, `#{Ramaze::BINPATH} -h`.strip
13
+
14
+ help.should === help_1
15
+ help.include?(Ramaze::Bin::Runner::Banner).should === true
16
+ help.include?('Options').should === true
17
+ help.include?('Commands').should === true
18
+
19
+ # Check if all the commands are displayed
20
+ Ramaze::Bin::Runner::Commands.each do |name, klass|
21
+ help.include?(name.to_s).should === true
22
+ end
23
+ end
24
+
25
+ it('Should show the version number') do
26
+ `#{Ramaze::BINPATH} -v`.strip.should === Ramaze::VERSION
27
+ `#{Ramaze::BINPATH} --version`.strip.should === Ramaze::VERSION
28
+ end
29
+
30
+ end
@@ -0,0 +1,38 @@
1
+ require File.expand_path('../../../../spec/helper', __FILE__)
2
+ require __DIR__('../../../lib/ramaze/bin/runner')
3
+ require 'open3'
4
+
5
+ describe('Ramaze::Bin::Start') do
6
+
7
+ it('Should show a help message') do
8
+ help = `#{Ramaze::BINPATH} start -h`.strip
9
+
10
+ help.include?(Ramaze::Bin::Start::Banner).should === true
11
+ end
12
+
13
+ it('Start using a directory') do
14
+ output = ''
15
+
16
+ Open3.popen3(Ramaze::BINPATH, 'start', Ramaze::BIN_APP) do |sin, sout, serr|
17
+ output += serr.gets(100).strip
18
+
19
+ serr.close
20
+ end
21
+
22
+ output.should.match /INFO\s+WEBrick/
23
+ end
24
+
25
+ it('Start using a file') do
26
+ output = ''
27
+ path = File.join(Ramaze::BIN_APP, 'config.ru')
28
+
29
+ Open3.popen3(Ramaze::BINPATH, 'start', path) do |sin, sout, serr|
30
+ output += serr.gets(100).strip
31
+
32
+ serr.close
33
+ end
34
+
35
+ output.should.match /INFO\s+WEBrick/
36
+ end
37
+
38
+ end
@@ -2,15 +2,15 @@
2
2
  # All files in this distribution are subject to the terms of the Ruby license.
3
3
 
4
4
  require File.expand_path('../../../../spec/helper', __FILE__)
5
+ require 'dalli'
5
6
 
6
7
  spec_precondition 'memcached is running' do
7
- require 'memcache'
8
- cache = MemCache.new(['localhost:11211'])
8
+ cache = Dalli::Client.new('localhost:11211')
9
9
  cache.set('active', true)
10
10
  end
11
11
 
12
12
  describe Ramaze::Cache::MemCache do
13
- Ramaze.options.cache.names = [:one, :two]
13
+ Ramaze.options.cache.names = [:one, :two]
14
14
  Ramaze.options.cache.default = Ramaze::Cache::MemCache
15
15
  Ramaze.setup_dependencies
16
16
 
@@ -57,4 +57,11 @@ describe Ramaze::Cache::MemCache do
57
57
  cache.clear
58
58
  cache.fetch(:hello).should == nil
59
59
  end
60
+
61
+ should 'use a custom set of options' do
62
+ klass = Ramaze::Cache::MemCache.using(:answer => 42)
63
+
64
+ klass.options[:answer].should == 42
65
+ klass.new.options[:answer].should == 42
66
+ end
60
67
  end
@@ -48,4 +48,11 @@ describe Ramaze::Cache::Sequel do
48
48
  cache.clear
49
49
  cache.fetch(:hello).should.equal nil
50
50
  end
51
+
52
+ should 'use a custom set of options' do
53
+ klass = Ramaze::Cache::Sequel.using(:answer => 42)
54
+
55
+ klass.options[:answer].should === 42
56
+ klass.new.options[:answer].should === 42
57
+ end
51
58
  end
@@ -22,11 +22,6 @@ class SpecControllerInheritedAnother < SpecControllerInheritedOther
22
22
  def index; "%p Another is haml. Inherit from Other"; end
23
23
  end
24
24
 
25
- class SpecControllerInheritedYetAnother < SpecControllerInheritedAnother
26
- Ramaze.node('/yet_another').engine(:Maruku)
27
- def index; "Yet Another is Maruku. Inherited but overriden"; end
28
- end
29
-
30
25
  describe 'Ramaze::Controller#self.inherited' do
31
26
  behaves_like :rack_test
32
27
 
@@ -42,9 +37,4 @@ describe 'Ramaze::Controller#self.inherited' do
42
37
  get('/another').body.should ==
43
38
  "<p>Another is haml. Inherit from Other</p>\n"
44
39
  end
45
-
46
- should "be able to override inherited provide" do
47
- get('/yet_another').body.should ==
48
- "<p>Yet Another is Maruku. Inherited but overriden</p>"
49
- end
50
40
  end
@@ -9,10 +9,10 @@ require File.expand_path('../../../../spec/helper', __FILE__)
9
9
  spec_require 'rack/contrib'
10
10
 
11
11
  # minimal middleware, no exception handling
12
- Ramaze.middleware!(:spec){|m|
12
+ Ramaze.middleware!(:spec) do |m|
13
13
  m.apps Rack::ConditionalGet, Rack::ETag
14
14
  m.run Ramaze::AppMap
15
- }
15
+ end
16
16
 
17
17
  class Main < Ramaze::Controller
18
18
  map '/'
@@ -27,19 +27,19 @@ describe 'Serving static files' do
27
27
  it 'serves from public root' do
28
28
  css = File.read(__DIR__('public/test_download.css'))
29
29
  get '/test_download.css'
30
- last_response.body.should == css
31
- last_response.status.should == 200
30
+ last_response.body.should === css
31
+ last_response.status.should === 200
32
32
  end
33
33
 
34
34
  it 'serves files with spaces' do
35
35
  get '/file%20name.txt'
36
- last_response.status.should == 200
37
- last_response.body.should == 'hi'
36
+ last_response.status.should === 200
37
+ last_response.body.should === 'hi'
38
38
  end
39
39
 
40
- it 'sends Etag for string bodies' do
40
+ it 'sends ETag for string bodies' do
41
41
  get '/'
42
- last_response['Etag'].size.should > 1
42
+ last_response['ETag'].size.should > 1
43
43
  end
44
44
 
45
45
  it 'sends Last-Modified for file bodies' do
@@ -50,27 +50,31 @@ describe 'Serving static files' do
50
50
  last_response['Last-Modified'].should == mtime.httpdate
51
51
  end
52
52
 
53
- it 'respects Etag with IF_NONE_MATCH' do
53
+ it 'respects ETag with IF_NONE_MATCH' do
54
54
  get '/'
55
55
 
56
- etag = last_response['Etag']
56
+ etag = last_response['ETag']
57
57
  etag.should.not.be.nil
58
58
 
59
59
  header 'IF_NONE_MATCH', etag
60
60
  get '/'
61
- last_response.status.should == 304
62
- last_response.body.should == ''
61
+
62
+ last_response.status.should === 304
63
+ last_response.body.should === ''
63
64
  end
64
65
 
65
66
  it 'respects Last-Modified with IF_MODIFIED_SINCE' do
66
67
  get '/test_download.css'
67
68
 
68
69
  mtime = last_response['Last-Modified']
69
- mtime.should.not.be.nil
70
70
 
71
+ mtime.nil?.should === false
72
+
73
+ header 'IF_NONE_MATCH' , nil
71
74
  header 'IF_MODIFIED_SINCE', mtime
72
75
  get '/test_download.css'
73
- last_response.status.should == 304
74
- last_response.body.should == ''
76
+
77
+ last_response.status.should === 304
78
+ last_response.body.should === ''
75
79
  end
76
80
  end
@@ -20,7 +20,8 @@ class SpecHelperAuth < Ramaze::Controller
20
20
  def secured
21
21
  "Secret content"
22
22
  end
23
- before(:secured){ login_required }
23
+
24
+ before(:secured) { login_required }
24
25
  end
25
26
 
26
27
  class SpecHelperAuthHash < SpecHelperAuth
@@ -43,9 +44,9 @@ end
43
44
 
44
45
  class SpecHelperAuthLambda < SpecHelperAuth
45
46
  map '/lambda'
46
- trait :auth_table => lambda{
47
- { 'manveru' => $password }
48
- }
47
+ trait :auth_table => lambda {
48
+ { 'manveru' => $password }
49
+ }
49
50
  end
50
51
 
51
52
  describe Ramaze::Helper::Auth do
@@ -57,26 +58,26 @@ describe Ramaze::Helper::Auth do
57
58
  get "/#{prefix}/secured"
58
59
  follow_redirect!
59
60
  last_response.status.should == 200
60
- last_response.body.should =~ (/<form/)
61
+ last_response.body.should =~ (/<form/)
61
62
 
62
63
  post("/#{prefix}/login", 'username' => 'manveru', 'password' => 'pass')
63
64
  follow_redirect!
64
65
  last_response.status.should == 200
65
- last_response.body.should == 'Secret content'
66
+ last_response.body.should == 'Secret content'
66
67
 
67
68
  get "/#{prefix}/secured"
68
69
  last_response.status.should == 200
69
- last_response.body.should == 'Secret content'
70
+ last_response.body.should == 'Secret content'
70
71
 
71
72
  get "/#{prefix}/logout"
72
73
  follow_redirect!
73
74
  last_response.status.should == 200
74
- last_response.body.should == 'SpecHelperAuth'
75
+ last_response.body.should == 'SpecHelperAuth'
75
76
 
76
77
  get "/#{prefix}/secured"
77
78
  follow_redirect!
78
79
  last_response.status.should == 200
79
- last_response.body.should =~ (/<form/)
80
+ last_response.body.should =~ (/<form/)
80
81
  end
81
82
  end
82
83
  end