merb 0.5.3 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. data/LICENSE +0 -20
  2. data/README +0 -277
  3. data/Rakefile +80 -199
  4. data/TODO +0 -3
  5. metadata +19 -438
  6. data/SVN_REVISION +0 -1
  7. data/app_generators/merb/USAGE +0 -5
  8. data/app_generators/merb/merb_generator.rb +0 -108
  9. data/app_generators/merb/templates/Rakefile +0 -124
  10. data/app_generators/merb/templates/app/controllers/application.rb +0 -3
  11. data/app_generators/merb/templates/app/controllers/exceptions.rb +0 -13
  12. data/app_generators/merb/templates/app/helpers/global_helper.rb +0 -5
  13. data/app_generators/merb/templates/app/mailers/views/layout/application.html.erb +0 -1
  14. data/app_generators/merb/templates/app/mailers/views/layout/application.text.erb +0 -1
  15. data/app_generators/merb/templates/app/parts/views/layout/application.html.erb +0 -1
  16. data/app_generators/merb/templates/app/views/exceptions/internal_server_error.html.erb +0 -216
  17. data/app_generators/merb/templates/app/views/exceptions/not_acceptable.html.erb +0 -38
  18. data/app_generators/merb/templates/app/views/exceptions/not_found.html.erb +0 -40
  19. data/app_generators/merb/templates/app/views/layout/application.html.erb +0 -11
  20. data/app_generators/merb/templates/config/boot.rb +0 -11
  21. data/app_generators/merb/templates/config/dependencies.rb +0 -41
  22. data/app_generators/merb/templates/config/environments/development.rb +0 -1
  23. data/app_generators/merb/templates/config/environments/production.rb +0 -1
  24. data/app_generators/merb/templates/config/environments/test.rb +0 -1
  25. data/app_generators/merb/templates/config/merb.yml +0 -82
  26. data/app_generators/merb/templates/config/merb_init.rb +0 -17
  27. data/app_generators/merb/templates/config/plugins.yml +0 -1
  28. data/app_generators/merb/templates/config/router.rb +0 -35
  29. data/app_generators/merb/templates/config/upload.conf +0 -0
  30. data/app_generators/merb/templates/public/images/merb.jpg +0 -0
  31. data/app_generators/merb/templates/public/merb.fcgi +0 -6
  32. data/app_generators/merb/templates/public/stylesheets/master.css +0 -119
  33. data/app_generators/merb/templates/script/destroy +0 -32
  34. data/app_generators/merb/templates/script/generate +0 -32
  35. data/app_generators/merb/templates/script/stop_merb +0 -13
  36. data/app_generators/merb/templates/script/win_script.cmd +0 -1
  37. data/app_generators/merb/templates/spec/spec.opts +0 -6
  38. data/app_generators/merb/templates/spec/spec_helper.rb +0 -15
  39. data/app_generators/merb/templates/test/test_helper.rb +0 -14
  40. data/app_generators/merb_plugin/USAGE +0 -5
  41. data/app_generators/merb_plugin/merb_plugin_generator.rb +0 -68
  42. data/app_generators/merb_plugin/templates/LICENSE +0 -20
  43. data/app_generators/merb_plugin/templates/README +0 -4
  44. data/app_generators/merb_plugin/templates/Rakefile +0 -35
  45. data/app_generators/merb_plugin/templates/TODO +0 -5
  46. data/app_generators/merb_plugin/templates/merbtasks.rb +0 -6
  47. data/app_generators/merb_plugin/templates/sampleplugin.rb +0 -10
  48. data/app_generators/merb_plugin/templates/sampleplugin_spec.rb +0 -7
  49. data/app_generators/merb_plugin/templates/spec_helper.rb +0 -2
  50. data/bin/merb +0 -4
  51. data/lib/autotest/discover.rb +0 -3
  52. data/lib/autotest/merb_rspec.rb +0 -80
  53. data/lib/merb.rb +0 -188
  54. data/lib/merb/abstract_controller.rb +0 -399
  55. data/lib/merb/assets.rb +0 -160
  56. data/lib/merb/assets.rb.orig +0 -119
  57. data/lib/merb/boot_loader.rb +0 -286
  58. data/lib/merb/boot_loader.rb.orig +0 -235
  59. data/lib/merb/caching.rb +0 -5
  60. data/lib/merb/caching/action_cache.rb +0 -92
  61. data/lib/merb/caching/fragment_cache.rb +0 -39
  62. data/lib/merb/caching/store/file_cache.rb +0 -90
  63. data/lib/merb/caching/store/memory_cache.rb +0 -85
  64. data/lib/merb/config.rb +0 -290
  65. data/lib/merb/constants.rb +0 -50
  66. data/lib/merb/controller.rb +0 -220
  67. data/lib/merb/cookies.rb +0 -95
  68. data/lib/merb/core_ext.rb +0 -15
  69. data/lib/merb/core_ext/array.rb +0 -0
  70. data/lib/merb/core_ext/class.rb +0 -180
  71. data/lib/merb/core_ext/enumerable.rb +0 -49
  72. data/lib/merb/core_ext/get_args.rb +0 -76
  73. data/lib/merb/core_ext/hash.rb +0 -306
  74. data/lib/merb/core_ext/inflections.rb +0 -112
  75. data/lib/merb/core_ext/inflector.rb +0 -275
  76. data/lib/merb/core_ext/kernel.rb +0 -242
  77. data/lib/merb/core_ext/mash.rb +0 -88
  78. data/lib/merb/core_ext/module.rb +0 -67
  79. data/lib/merb/core_ext/numeric.rb +0 -72
  80. data/lib/merb/core_ext/object.rb +0 -183
  81. data/lib/merb/core_ext/string.rb +0 -53
  82. data/lib/merb/core_ext/symbol.rb +0 -6
  83. data/lib/merb/dispatcher.rb +0 -109
  84. data/lib/merb/drb_server.rb +0 -19
  85. data/lib/merb/erubis_ext.rb +0 -10
  86. data/lib/merb/exceptions.rb +0 -192
  87. data/lib/merb/generators/merb_app/merb_app.rb +0 -22
  88. data/lib/merb/generators/merb_generator_helpers.rb +0 -318
  89. data/lib/merb/generators/merb_plugin.rb +0 -22
  90. data/lib/merb/logger.rb +0 -78
  91. data/lib/merb/mail_controller.rb +0 -268
  92. data/lib/merb/mailer.rb +0 -87
  93. data/lib/merb/mixins/basic_authentication.rb +0 -35
  94. data/lib/merb/mixins/controller.rb +0 -160
  95. data/lib/merb/mixins/erubis_capture.rb +0 -68
  96. data/lib/merb/mixins/general_controller.rb +0 -253
  97. data/lib/merb/mixins/inline_partial.rb +0 -32
  98. data/lib/merb/mixins/render.rb +0 -465
  99. data/lib/merb/mixins/responder.rb +0 -449
  100. data/lib/merb/mixins/view_context.rb +0 -558
  101. data/lib/merb/mixins/web_controller.rb +0 -36
  102. data/lib/merb/mongrel_handler.rb +0 -168
  103. data/lib/merb/part_controller.rb +0 -29
  104. data/lib/merb/plugins.rb +0 -16
  105. data/lib/merb/rack_adapter.rb +0 -37
  106. data/lib/merb/request.rb +0 -465
  107. data/lib/merb/router.rb +0 -646
  108. data/lib/merb/server.rb +0 -169
  109. data/lib/merb/session.rb +0 -23
  110. data/lib/merb/session/cookie_store.rb +0 -118
  111. data/lib/merb/session/mem_cache_session.rb +0 -131
  112. data/lib/merb/session/memory_session.rb +0 -176
  113. data/lib/merb/template.rb +0 -37
  114. data/lib/merb/template/erubis.rb +0 -68
  115. data/lib/merb/template/haml.rb +0 -87
  116. data/lib/merb/template/markaby.rb +0 -59
  117. data/lib/merb/template/xml_builder.rb +0 -50
  118. data/lib/merb/test/fake_request.rb +0 -74
  119. data/lib/merb/test/helper.rb +0 -260
  120. data/lib/merb/test/hpricot.rb +0 -136
  121. data/lib/merb/test/multipart.rb +0 -66
  122. data/lib/merb/test/rspec.rb +0 -18
  123. data/lib/merb/test/rspec_matchers/controller_matchers.rb +0 -117
  124. data/lib/merb/test/rspec_matchers/markup_matchers.rb +0 -98
  125. data/lib/merb/upload_handler.rb +0 -80
  126. data/lib/merb/upload_progress.rb +0 -48
  127. data/lib/merb/version.rb +0 -49
  128. data/lib/merb/view_context.rb +0 -79
  129. data/lib/tasks.rb +0 -7
  130. data/lib/tasks/merb.rake +0 -54
  131. data/merb_default_generators/model/USAGE +0 -0
  132. data/merb_default_generators/model/model_generator.rb +0 -16
  133. data/merb_default_generators/model/templates/new_model_template.erb +0 -5
  134. data/merb_default_generators/resource_controller/USAGE +0 -0
  135. data/merb_default_generators/resource_controller/resource_controller_generator.rb +0 -26
  136. data/merb_default_generators/resource_controller/templates/controller.rb +0 -30
  137. data/merb_default_generators/resource_controller/templates/edit.html.erb +0 -1
  138. data/merb_default_generators/resource_controller/templates/helper.rb +0 -5
  139. data/merb_default_generators/resource_controller/templates/index.html.erb +0 -1
  140. data/merb_default_generators/resource_controller/templates/new.html.erb +0 -1
  141. data/merb_default_generators/resource_controller/templates/show.html.erb +0 -1
  142. data/merb_generators/controller/USAGE +0 -5
  143. data/merb_generators/controller/controller_generator.rb +0 -16
  144. data/merb_generators/controller/templates/controller.rb +0 -8
  145. data/merb_generators/controller/templates/helper.rb +0 -5
  146. data/merb_generators/controller/templates/index.html.erb +0 -3
  147. data/merb_generators/part_controller/USAGE +0 -5
  148. data/merb_generators/part_controller/part_controller_generator.rb +0 -27
  149. data/merb_generators/part_controller/templates/controller.rb +0 -8
  150. data/merb_generators/part_controller/templates/helper.rb +0 -5
  151. data/merb_generators/part_controller/templates/index.html.erb +0 -3
  152. data/merb_generators/resource/USAGE +0 -0
  153. data/merb_generators/resource/resource_generator.rb +0 -67
  154. data/rspec_generators/merb_controller_test/merb_controller_test_generator.rb +0 -67
  155. data/rspec_generators/merb_controller_test/templates/controller_spec.rb +0 -8
  156. data/rspec_generators/merb_controller_test/templates/edit_spec.rb +0 -12
  157. data/rspec_generators/merb_controller_test/templates/helper_spec.rb +0 -5
  158. data/rspec_generators/merb_controller_test/templates/index_spec.rb +0 -12
  159. data/rspec_generators/merb_controller_test/templates/new_spec.rb +0 -12
  160. data/rspec_generators/merb_controller_test/templates/show_spec.rb +0 -5
  161. data/rspec_generators/merb_model_test/merb_model_test_generator.rb +0 -26
  162. data/rspec_generators/merb_model_test/templates/model_spec_template.erb +0 -7
  163. data/script/destroy +0 -14
  164. data/script/generate +0 -14
  165. data/spec/fixtures/config/environments/environment_config_test.yml +0 -1
  166. data/spec/fixtures/config/merb.yml +0 -18
  167. data/spec/fixtures/controllers/dispatch_spec_controllers.rb +0 -235
  168. data/spec/fixtures/controllers/render_spec_controllers.rb +0 -184
  169. data/spec/fixtures/foo.rb +0 -3
  170. data/spec/fixtures/mailers/views/layout/application.html.erb +0 -3
  171. data/spec/fixtures/mailers/views/layout/application.text.erb +0 -3
  172. data/spec/fixtures/mailers/views/test_mail_controller/eighth.html.erb +0 -1
  173. data/spec/fixtures/mailers/views/test_mail_controller/eighth.text.erb +0 -1
  174. data/spec/fixtures/mailers/views/test_mail_controller/first.html.erb +0 -1
  175. data/spec/fixtures/mailers/views/test_mail_controller/first.text.erb +0 -1
  176. data/spec/fixtures/mailers/views/test_mail_controller/ninth.html.erb +0 -1
  177. data/spec/fixtures/mailers/views/test_mail_controller/ninth.text.erb +0 -1
  178. data/spec/fixtures/mailers/views/test_mail_controller/second.text.erb +0 -1
  179. data/spec/fixtures/mailers/views/test_mail_controller/third.html.erb +0 -1
  180. data/spec/fixtures/models/router_spec_models.rb +0 -30
  181. data/spec/fixtures/parts/views/layout/todo_part.html.erb +0 -3
  182. data/spec/fixtures/parts/views/layout/todo_part.xml.erb +0 -3
  183. data/spec/fixtures/parts/views/todo_part/formatted_output.html.erb +0 -1
  184. data/spec/fixtures/parts/views/todo_part/formatted_output.js.erb +0 -1
  185. data/spec/fixtures/parts/views/todo_part/formatted_output.xml.erb +0 -1
  186. data/spec/fixtures/parts/views/todo_part/list.html.erb +0 -3
  187. data/spec/fixtures/sample.txt +0 -1
  188. data/spec/fixtures/views/erubis.html.erb +0 -1
  189. data/spec/fixtures/views/examples/_erubis.html.erb +0 -1
  190. data/spec/fixtures/views/examples/_haml.html.haml +0 -1
  191. data/spec/fixtures/views/examples/_markaby.html.mab +0 -1
  192. data/spec/fixtures/views/examples/_throw_content.html.erb +0 -6
  193. data/spec/fixtures/views/examples/hello.xml.builder +0 -1
  194. data/spec/fixtures/views/examples/js.js.erb +0 -1
  195. data/spec/fixtures/views/examples/template_catch_content.html.erb +0 -15
  196. data/spec/fixtures/views/examples/template_catch_content_from_partial.html.erb +0 -6
  197. data/spec/fixtures/views/examples/template_throw_content.html.erb +0 -10
  198. data/spec/fixtures/views/examples/template_throw_content_without_block.html.erb +0 -3
  199. data/spec/fixtures/views/exceptions/admin_access_required.html.erb +0 -1
  200. data/spec/fixtures/views/extension_template_controller/_nested_js.js.erb +0 -1
  201. data/spec/fixtures/views/extension_template_controller/_nested_xml.xml.erb +0 -1
  202. data/spec/fixtures/views/extension_template_controller/_render_partial_multiple_times.html.erb +0 -1
  203. data/spec/fixtures/views/extension_template_controller/erubis_templates.html.erb +0 -1
  204. data/spec/fixtures/views/extension_template_controller/erubis_templates.js.erb +0 -1
  205. data/spec/fixtures/views/extension_template_controller/erubis_templates.rhtml +0 -1
  206. data/spec/fixtures/views/extension_template_controller/erubis_templates.xml.erb +0 -1
  207. data/spec/fixtures/views/extension_template_controller/haml_index.html.haml +0 -0
  208. data/spec/fixtures/views/extension_template_controller/haml_templates.html.haml +0 -1
  209. data/spec/fixtures/views/extension_template_controller/haml_templates.js.haml +0 -1
  210. data/spec/fixtures/views/extension_template_controller/haml_templates.xml.haml +0 -1
  211. data/spec/fixtures/views/extension_template_controller/index.html.erb +0 -0
  212. data/spec/fixtures/views/extension_template_controller/markaby_index.html.mab +0 -0
  213. data/spec/fixtures/views/extension_template_controller/markaby_templates.html.mab +0 -1
  214. data/spec/fixtures/views/extension_template_controller/markaby_templates.js.mab +0 -1
  215. data/spec/fixtures/views/extension_template_controller/markaby_templates.xml.mab +0 -1
  216. data/spec/fixtures/views/extension_template_controller/render_multiple_partials.html.erb +0 -4
  217. data/spec/fixtures/views/extension_template_controller/render_nested_js.js.erb +0 -1
  218. data/spec/fixtures/views/extension_template_controller/render_nested_xml.xml.erb +0 -1
  219. data/spec/fixtures/views/haml.html.haml +0 -1
  220. data/spec/fixtures/views/haml.xml.haml +0 -2
  221. data/spec/fixtures/views/layout/application.html.erb +0 -1
  222. data/spec/fixtures/views/layout/application.xml.erb +0 -1
  223. data/spec/fixtures/views/layout/nested/example.html.erb +0 -1
  224. data/spec/fixtures/views/markaby.html.mab +0 -1
  225. data/spec/fixtures/views/nested/example/test.html.erb +0 -1
  226. data/spec/fixtures/views/partials/_erubis.html.erb +0 -1
  227. data/spec/fixtures/views/partials/_erubis_collection.html.erb +0 -1
  228. data/spec/fixtures/views/partials/_erubis_collection_with_locals.html.erb +0 -1
  229. data/spec/fixtures/views/partials/_erubis_new.html.erb +0 -1
  230. data/spec/fixtures/views/partials/_haml.html.haml +0 -1
  231. data/spec/fixtures/views/partials/_haml_collection.html.haml +0 -1
  232. data/spec/fixtures/views/partials/_haml_collection_with_locals.html.haml +0 -1
  233. data/spec/fixtures/views/partials/_haml_new.html.haml +0 -1
  234. data/spec/fixtures/views/partials/_markaby.html.mab +0 -1
  235. data/spec/fixtures/views/partials/_markaby_collection.html.mab +0 -1
  236. data/spec/fixtures/views/partials/_markaby_collection_with_locals.html.mab +0 -1
  237. data/spec/fixtures/views/partials/_markaby_new.html.mab +0 -1
  238. data/spec/fixtures/views/render_object_controller/render_object_with_template.html.erb +0 -1
  239. data/spec/fixtures/views/render_object_controller/render_object_with_template.js.erb +0 -1
  240. data/spec/fixtures/views/render_object_controller/render_object_with_template.xml.erb +0 -1
  241. data/spec/fixtures/views/template_views/interface__buffer_erubis.html.erb +0 -4
  242. data/spec/fixtures/views/template_views/interface__buffer_haml.html.haml +0 -7
  243. data/spec/fixtures/views/template_views/interface__buffer_markaby.html.mab +0 -7
  244. data/spec/fixtures/views/template_views/interface_capture_erubis.html.erb +0 -15
  245. data/spec/fixtures/views/template_views/interface_capture_haml.html.haml +0 -15
  246. data/spec/fixtures/views/template_views/interface_capture_markaby.html.mab +0 -4
  247. data/spec/fixtures/views/template_views/interface_concat_erubis.html.erb +0 -12
  248. data/spec/fixtures/views/template_views/interface_concat_haml.html.haml +0 -11
  249. data/spec/fixtures/views/template_views/interface_concat_markaby.html.mab +0 -14
  250. data/spec/fixtures/views/test.dir/the_template.html.erb +0 -1
  251. data/spec/merb/abstract_controller_spec.rb +0 -38
  252. data/spec/merb/assets_spec.rb +0 -207
  253. data/spec/merb/caching_spec.rb +0 -102
  254. data/spec/merb/config_spec.rb +0 -29
  255. data/spec/merb/controller_filters_spec.rb +0 -253
  256. data/spec/merb/controller_spec.rb +0 -126
  257. data/spec/merb/cookie_store_spec.rb +0 -72
  258. data/spec/merb/cookies_spec.rb +0 -96
  259. data/spec/merb/core_ext/class_spec.rb +0 -97
  260. data/spec/merb/core_ext/enumerable_spec.rb +0 -27
  261. data/spec/merb/core_ext/hash_spec.rb +0 -251
  262. data/spec/merb/core_ext/inflector_spec.rb +0 -34
  263. data/spec/merb/core_ext/kernel_spec.rb +0 -25
  264. data/spec/merb/core_ext/numeric_spec.rb +0 -26
  265. data/spec/merb/core_ext/object_spec.rb +0 -47
  266. data/spec/merb/core_ext/string_spec.rb +0 -22
  267. data/spec/merb/core_ext/symbol_spec.rb +0 -7
  268. data/spec/merb/dependency_spec.rb +0 -22
  269. data/spec/merb/dispatch_spec.rb +0 -528
  270. data/spec/merb/fake_request_spec.rb +0 -80
  271. data/spec/merb/generator_spec.rb +0 -248
  272. data/spec/merb/handler_spec.rb +0 -169
  273. data/spec/merb/mail_controller_spec.rb +0 -177
  274. data/spec/merb/mailer_spec.rb +0 -87
  275. data/spec/merb/multipart_spec.rb +0 -50
  276. data/spec/merb/part_controller_spec.rb +0 -124
  277. data/spec/merb/plugins_spec.rb +0 -80
  278. data/spec/merb/render_spec.rb +0 -469
  279. data/spec/merb/request_spec.rb +0 -287
  280. data/spec/merb/responder_spec.rb +0 -562
  281. data/spec/merb/router_spec.rb +0 -900
  282. data/spec/merb/server_spec.rb +0 -19
  283. data/spec/merb/template_spec.rb +0 -41
  284. data/spec/merb/upload_handler_spec.rb +0 -108
  285. data/spec/merb/version_spec.rb +0 -33
  286. data/spec/merb/view_context_spec.rb +0 -366
  287. data/spec/spec_generator_helper.rb +0 -34
  288. data/spec/spec_helper.rb +0 -101
  289. data/spec/spec_helpers/url_shared_behaviour.rb +0 -112
  290. data/test_unit_generators/merb_controller_test/merb_controller_test_generator.rb +0 -53
  291. data/test_unit_generators/merb_controller_test/templates/functional_test.rb +0 -17
  292. data/test_unit_generators/merb_controller_test/templates/helper_test.rb +0 -9
  293. data/test_unit_generators/merb_model_test/merb_model_test_generator.rb +0 -29
  294. data/test_unit_generators/merb_model_test/templates/model_test_unit_template.erb +0 -9
data/SVN_REVISION DELETED
@@ -1 +0,0 @@
1
- 1334
@@ -1,5 +0,0 @@
1
- Description:
2
-
3
-
4
- Usage:
5
-
@@ -1,108 +0,0 @@
1
- class MerbGenerator < RubiGen::Base
2
- DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
3
- Config::CONFIG['ruby_install_name']) unless defined? DEFAULT_SHEBANG
4
-
5
- default_options :shebang => DEFAULT_SHEBANG
6
-
7
- attr_reader :name
8
-
9
- def initialize(runtime_args, runtime_options = {})
10
- super
11
- usage if args.empty?
12
- @name = args.shift
13
- @destination_root = File.expand_path(@name)
14
- extract_options
15
- end
16
-
17
- def manifest
18
- script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
19
-
20
- record do |m|
21
- # Ensure appropriate folder(s) exists
22
- m.directory ''
23
- BASEDIRS.each { |path| m.directory path }
24
-
25
- # copy skeleton
26
- m.file_copy_each %w( Rakefile )
27
- m.file_copy_each %w( application.rb exceptions.rb ), "app/controllers"
28
- m.file_copy_each %w( global_helper.rb ), "app/helpers"
29
- m.file_copy_each %w( application.html.erb ), "app/parts/views/layout"
30
- m.file_copy_each %w( application.html.erb application.text.erb ), "app/mailers/views/layout"
31
- m.file_copy_each %w( application.html.erb ), "app/views/layout"
32
- m.file_copy_each %w( internal_server_error.html.erb not_found.html.erb not_acceptable.html.erb ), "app/views/exceptions"
33
- m.file_copy_each %w( merb.jpg ), "public/images"
34
- m.file_copy_each %w( master.css ), "public/stylesheets"
35
- m.file_copy_each %w( merb.fcgi ), "public"
36
- m.file_copy_each %w( boot.rb merb_init.rb router.rb upload.conf dependencies.rb), "config"
37
- m.file_copy_each %w( development.rb production.rb test.rb ), "config/environments"
38
- m.file_copy_each %w( spec_helper.rb ), "spec"
39
- m.file_copy_each %w( test_helper.rb), "test"
40
-
41
- # build default config
42
- m.template "config/merb.yml", "config/merb.yml", :assigns => {:key => "#{@name.upcase}#{rand(9999)}"}
43
-
44
- # build scripts
45
- %w( stop_merb generate destroy ).each do |file|
46
- m.file "script/#{file}", "script/#{file}", script_options
47
- m.template "script/win_script.cmd", "script/#{file}.cmd", :assigns => { :filename => file } if windows
48
- end
49
- end
50
- end
51
-
52
- def windows
53
- (RUBY_PLATFORM =~ /dos|win32|cygwin/i) || (RUBY_PLATFORM =~ /(:?mswin|mingw)/)
54
- end
55
-
56
- protected
57
- def banner
58
- <<-EOS
59
- Creates a Merb application stub.
60
-
61
- USAGE: #{spec.name} -g path"
62
- EOS
63
- end
64
-
65
- def add_options!(opts)
66
- # opts.separator ''
67
- # opts.separator 'Options:'
68
- # # For each option below, place the default
69
- # # at the top of the file next to "default_options"
70
- # opts.on("-r", "--ruby=path", String,
71
- # "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
72
- # "Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| }
73
- # opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
74
- end
75
-
76
- def extract_options
77
- # for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
78
- # Templates can access these value via the attr_reader-generated methods, but not the
79
- # raw instance variable value.
80
- # @author = options[:author]
81
- end
82
-
83
- # Installation skeleton. Intermediate directories are automatically
84
- # created so don't sweat their absence here.
85
- BASEDIRS = %w(
86
- app/controllers
87
- app/models
88
- app/helpers
89
- app/mailers/helpers
90
- app/mailers/views/layout
91
- app/parts/helpers
92
- app/parts/views/layout
93
- app/views/layout
94
- app/views/exceptions
95
- config/environments
96
- lib
97
- log
98
- public/images
99
- public/javascripts
100
- public/stylesheets
101
- script
102
- spec/models
103
- spec/controllers
104
- test/unit
105
- gems
106
- )
107
-
108
- end
@@ -1,124 +0,0 @@
1
- require 'rubygems'
2
- Gem.clear_paths
3
- Gem.path.unshift(File.join(File.dirname(__FILE__), "gems"))
4
-
5
- require 'rake'
6
- require 'rake/rdoctask'
7
- require 'rake/testtask'
8
- require 'spec/rake/spectask'
9
- require 'fileutils'
10
-
11
- require File.dirname(__FILE__)+'/config/boot.rb'
12
- require Merb::framework_root+'/tasks'
13
- include FileUtils
14
-
15
- # Set these before any dependencies load
16
- # otherwise the ORM may connect to the wrong env
17
- Merb.root = File.dirname(__FILE__)
18
- Merb.environment = ENV['MERB_ENV'] if ENV['MERB_ENV']
19
-
20
- # Get Merb plugins and dependencies
21
- require File.dirname(__FILE__)+'/config/dependencies.rb'
22
- Merb::Plugins.rakefiles.each {|r| require r }
23
-
24
- #desc "Packages up Merb."
25
- #task :default => [:package]
26
-
27
- desc "load merb_init.rb"
28
- task :merb_init do
29
- # deprecated - here for BC
30
- Rake::Task['merb_env'].invoke
31
- end
32
-
33
- task :uninstall => [:clean] do
34
- sh %{sudo gem uninstall #{NAME}}
35
- end
36
-
37
- desc 'Run unit tests'
38
- Rake::TestTask.new('test_unit') do |t|
39
- t.libs << 'test'
40
- t.pattern = 'test/unit/*_test.rb'
41
- t.verbose = true
42
- end
43
-
44
- desc 'Run functional tests'
45
- Rake::TestTask.new('test_functional') do |t|
46
- t.libs << 'test'
47
- t.pattern = 'test/functional/*_test.rb'
48
- t.verbose = true
49
- end
50
-
51
- desc 'Run all tests'
52
- Rake::TestTask.new('test') do |t|
53
- t.libs << 'test'
54
- t.pattern = 'test/**/*_test.rb'
55
- t.verbose = true
56
- end
57
-
58
- desc "Run all specs"
59
- Spec::Rake::SpecTask.new('specs') do |t|
60
- t.spec_opts = ["--format", "specdoc", "--colour"]
61
- t.spec_files = Dir['spec/**/*_spec.rb'].sort
62
- end
63
-
64
- desc "Run all model specs"
65
- Spec::Rake::SpecTask.new('model_specs') do |t|
66
- t.spec_opts = ["--format", "specdoc", "--colour"]
67
- t.spec_files = Dir['spec/models/**/*_spec.rb'].sort
68
- end
69
-
70
- desc "Run all controller specs"
71
- Spec::Rake::SpecTask.new('controller_specs') do |t|
72
- t.spec_opts = ["--format", "specdoc", "--colour"]
73
- t.spec_files = Dir['spec/controllers/**/*_spec.rb'].sort
74
- end
75
-
76
- desc "Run a specific spec with TASK=xxxx"
77
- Spec::Rake::SpecTask.new('spec') do |t|
78
- t.spec_opts = ["--format", "specdoc", "--colour"]
79
- t.libs = ['lib', 'server/lib' ]
80
- t.spec_files = ["spec/merb/#{ENV['TASK']}_spec.rb"]
81
- end
82
-
83
- desc "Run all specs output html"
84
- Spec::Rake::SpecTask.new('specs_html') do |t|
85
- t.spec_opts = ["--format", "html"]
86
- t.libs = ['lib', 'server/lib' ]
87
- t.spec_files = Dir['spec/**/*_spec.rb'].sort
88
- end
89
-
90
- desc "RCov"
91
- Spec::Rake::SpecTask.new('rcov') do |t|
92
- t.spec_opts = ["--format", "specdoc", "--colour"]
93
- t.spec_files = Dir['spec/**/*_spec.rb'].sort
94
- t.libs = ['lib', 'server/lib' ]
95
- t.rcov = true
96
- end
97
-
98
- desc 'Run all tests, specs and finish with rcov'
99
- task :aok do
100
- sh %{rake rcov}
101
- sh %{rake spec}
102
- end
103
-
104
- unless Gem.cache.search("haml").empty?
105
- namespace :haml do
106
- desc "Compiles all sass files into CSS"
107
- task :compile_sass do
108
- gem 'haml'
109
- require 'sass'
110
- puts "*** Updating stylesheets"
111
- Sass::Plugin.update_stylesheets
112
- puts "*** Done"
113
- end
114
- end
115
- end
116
-
117
- ##############################################################################
118
- # SVN
119
- ##############################################################################
120
-
121
- desc "Add new files to subversion"
122
- task :svn_add do
123
- system "svn status | grep '^\?' | sed -e 's/? *//' | sed -e 's/ /\ /g' | xargs svn add"
124
- end
@@ -1,3 +0,0 @@
1
- # all your other controllers should inherit from this one to share code.
2
- class Application < Merb::Controller
3
- end
@@ -1,13 +0,0 @@
1
- class Exceptions < Application
2
-
3
- # handle NotFound exceptions (404)
4
- def not_found
5
- render :format => :html
6
- end
7
-
8
- # handle NotAcceptable exceptions (406)
9
- def not_acceptable
10
- render :format => :html
11
- end
12
-
13
- end
@@ -1,5 +0,0 @@
1
- module Merb
2
- module GlobalHelper
3
- # helpers defined here available to all views.
4
- end
5
- end
@@ -1 +0,0 @@
1
- <%= catch_content :layout %>
@@ -1 +0,0 @@
1
- <%= catch_content :layout %>
@@ -1 +0,0 @@
1
- <%= catch_content :layout %>
@@ -1,216 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4
- <title><%= @exception.name.humanize %></title>
5
- <style type="text/css" media="screen">
6
- body {
7
- font-family:arial;
8
- font-size:11px;
9
- }
10
- h1 {
11
- font-size:48px;
12
- letter-spacing:-4px;
13
- margin:0;
14
- line-height:36px;
15
- color:#333;
16
- }
17
- h1 sup {
18
- font-size: 0.5em;
19
- }
20
- h1 sup.error_500, h1 sup.error_400 {
21
- color:#990E05;
22
- }
23
- h1 sup.error_100, h1 sup.error_200 {
24
- color:#00BF10;
25
- }
26
- h1 sup.error_300 {
27
- /* pretty sure you cant 'see' status 300
28
- errors but if you could I think they
29
- would be blue */
30
- color:#1B2099;
31
- }
32
- h2 {
33
- font-size:36px;
34
- letter-spacing:-3px;
35
- margin:0;
36
- line-height:28px;
37
- color:#444;
38
- }
39
- a, a:visited {
40
- color:#00BF10;
41
- }
42
- .internalError {
43
- width:800px;
44
- margin:50px auto;
45
- }
46
- .header {
47
- border-bottom:10px solid #333;
48
- margin-bottom:1px;
49
- background-image: url("data:image/gif;base64,R0lGODlhAwADAIAAAP///8zMzCH5BAAAAAAALAAAAAADAAMAAAIEBHIJBQA7");
50
- padding:20px;
51
- }
52
- table.trace {
53
- width:100%;
54
- font-family:courier, monospace;
55
- letter-spacing:-1px;
56
- border-collapse: collapse;
57
- border-spacing:0;
58
- }
59
- table.trace tr td{
60
- padding:0;
61
- height:26px;
62
- font-size:13px;
63
- vertical-align:middle;
64
- }
65
- table.trace tr.file{
66
- border-top:2px solid #fff;
67
- background-color:#F3F3F3;
68
- }
69
- table.trace tr.source {
70
- background-color:#F8F8F8;
71
- display:none;
72
- }
73
- table.trace .open tr.source {
74
- display:table-row;
75
- }
76
- table.trace tr.file td.expand {
77
- width:23px;
78
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAXCAIAAABvSEP3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAdVJREFUeNqMVL+TwUAYxaRIOlEhlZHGDAUzzOQ61+AqXMV1lJSU7q/QRqm8KFUcJTNn5qJkaPyoKKVz7y4mF8na5Kt29tt9+/Z97/u81+vVQ4r9frdarS6Xi7ETDIZisRjxMGPfmk4niNPpZE+xLAugbPaZ53nzvtfMBe/3+/3dbuehBrAKhZdUKkVAWa9Xsiybv0CPZDJZLr/qa5/BwgwRjYqOKIvFYjQa/aNommZh0Ww2K5UqzwfoQOPxaLPZ3FAmk0+7lplMpt1u53J5OpBOR0eZEE9wHJfP5zud93g88QhluwWbjW+5VOmKBgKBer3eaDTDYeGBQF8+x7rqIYoiPgixWJazpA6HA+MSxRArkUgMh0M409g8Ho8+9wYxxCqVSq1W26EDHGM2m4HOHQrEc38f/Yn7cLmlIRhBENzcx8cVRZnPZ/YUep2BWkjTIfA+PKVpZAXR5QxsjiqCKvGEqqp443w+0dvy17swqD0HB3S73V5PpkNg1qBqt8kwGCjmPkinM0QJbIoEa7U6UG6ToVgs4V9G2g0ESoP5Aoi7KYX5oCgf8IKbkvn9/mr1LRQKESamzgJy0g0tSZIuB3nuGqRU9Vv9C4sKkUhEkp4soxvxI8AAhWrrtXa3X8EAAAAASUVORK5CYII=);
79
- background-position:top left;
80
- background-repeat:no-repeat;
81
- }
82
- table.trace .open tr.file td.expand {
83
- width:19px;
84
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXZJREFUeNrslK1ywkAUhcMOBomEOiSdqLxEBJX0NaijOsjyHGGmCGyQQYaiiiw4gktkcOmZbpsuuzQ/M5XnqJ2d3S/n3nM3rTzPLUP7/Tt0+pLcGQwG3W53OLyHzPMtjYL7q9UqSRLrD4E1Gj1orCvKYuFHUWTVkOM44/HjDcp8/lL4r6NerzeZPMm1KFw0QkDn83m5fP2lHA4fNQvRtNvtjsfDd0WzmSfb2e/fdTqdOvdh/HLJZLOn0+d2HJ+KRGzbdl23EpFlmed5cp2maRzHQq1lvQ5KMi6EUZBGfup6E1pTfd+vrGW7jbQ2C9hTt9BpqNyIWaAwAy6xg2eBz5iRC/NomiZhGN5sqmnkauo0BUGgVQoBjQ80oCACgNQdZHfTYBkF2mxCtWWAqunWpahxIDUt3QYUxIFQpJHyIWpXjinabKbbwItMHT+NyjchrP8QKaSQQgoppJBCCimkkEIKKaSQQgoppJBCCimkkEIKKaSo+hRgAEFD17X08O2NAAAAAElFTkSuQmCC);
85
- background-position:top left;
86
- background-repeat:no-repeat;
87
- }
88
- table.trace tr.source td.collapse {
89
- width:19px;
90
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAB1CAIAAAAqdO2mAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVxJREFUeNrs0zFygkAUBmBlUkgJHdABlQwVkVJKKUxBYWbkALTxMJwhltyDFkss03IF8pudIcwaDaDl/6pd2P327b7d+eHwMXs4lNkzggoVKlSoUKFChQoVKlSoUKFChQoVKlSoUKFChQqVEYqm6ft9+qiSJEkYho7jTlcw2fd9NOI4nq4gEdFwXXe1Cqco63VkWVbXRTqLhTpOwQRpF7quR1E0TgGhqvLKUFCyoQqG/rks3O6kZKW/eRFpevOCoGTXVTcMQ5EyxyDEkML1c5RzuZOICIyXqn7JBVez6282MWrx731HOv2qB8Hri2lamNk0DfpVVdV1Peodappmmua8bdvzuc7zfNprzrLMth1FnGh/X8MjCAIQv/cFz/+65PcDh7rbvYv2ZUfdj+PxsyzLgVl0hKwgTqeqKApx2LeOc7t98zyv/1FWOgvx9RPii23bmL9cetJ8Ed8CDAC6aFW8bCzFhwAAAABJRU5ErkJggg==);
91
- background-position:bottom left;
92
- background-repeat:no-repeat;
93
- background-color:#6F706F;
94
- }
95
- table.trace tr td.path {
96
- padding-left:10px;
97
- }
98
- table.trace tr td.code {
99
- padding-left:35px;
100
- white-space: pre;
101
- line-height:9px;
102
- padding-bottom:10px;
103
- }
104
- table.trace tr td.code em {
105
- font-weight:bold;
106
- color:#00BF10;
107
- }
108
- table.trace tr td.code a {
109
- width: 20px;
110
- float: left;
111
- }
112
- table.trace tr td.code .more {
113
- color:#666;
114
- }
115
- table.trace tr td.line {
116
- width:30px;
117
- text-align:right;
118
- padding-right:4px;
119
- }
120
- .footer {
121
- margin-top:5px;
122
- font-size:11px;
123
- color:#444;
124
- text-align:right;
125
- }
126
- </style>
127
- </head>
128
- <body>
129
- <div class="internalError">
130
-
131
- <div class="header">
132
- <h1><%= @exception.name.humanize %> <sup class="error_<%= @exception.class::STATUS %>"><%= @exception.class::STATUS %></sup></h1>
133
- <% if show_details = ::Merb::Config[:exception_details] -%>
134
- <h2><%== @exception.message %></h2>
135
- <% else -%>
136
- <h2>Sorry about that...</h2>
137
- <% end -%>
138
- <h3>Parameters</h3>
139
- <ul>
140
- <% controller.params[:original_params].each do |param, value| %>
141
- <li><strong><%= param %>:</strong> <%= value.inspect %></li>
142
- <% end %>
143
- <%= "<li>None</li>" if controller.params[:original_params].empty? %>
144
- </ul>
145
-
146
- <h3>Session</h3>
147
- <ul>
148
- <% controller.params[:original_session].each do |param, value| %>
149
- <li><strong><%= param %>:</strong> <%= value.inspect %></li>
150
- <% end %>
151
- <%= "<li>None</li>" if controller.params[:original_session].empty? %>
152
- </ul>
153
-
154
- <h3>Cookies</h3>
155
- <ul>
156
- <% controller.params[:original_cookies].each do |param, value| %>
157
- <li><strong><%= param %>:</strong> <%= value.inspect %></li>
158
- <% end %>
159
- <%= "<li>None</li>" if controller.params[:original_cookies].empty? %>
160
- </ul>
161
- </div>
162
-
163
- <% if show_details %>
164
- <table class="trace">
165
- <% @exception.backtrace.each_with_index do |line, index| %>
166
- <tbody class="close">
167
- <tr class="file">
168
- <td class="expand">
169
- </td>
170
- <td class="path">
171
- <%= (line.match(/^([^:]+)/)[1] rescue 'unknown').sub(/\/((opt|usr)\/local\/lib\/(ruby\/)?(gems\/)?(1.8\/)?(gems\/)?|.+\/app\/)/, '') %>
172
- <% unless line.match(/\.erb:/) %>
173
- in "<strong><%= line.match(/:in `(.+)'$/)[1] rescue '?' %></strong>"
174
- <% else %>
175
- (<strong>ERB Template</strong>)
176
- <% end %>
177
- </td>
178
- <td class="line">
179
- <a href="txmt://open?url=file://<%=file = (line.match(/^([^:]+)/)[1] rescue 'unknown')%>&amp;line=<%= lineno = line.match(/:([0-9]+):/)[1] rescue '?' %>"><%=lineno%></a>&nbsp;
180
- </td>
181
- </tr>
182
- <tr class="source">
183
- <td class="collapse">
184
- </td>
185
- <td class="code" colspan="2"><% (__caller_lines__(file, lineno, 5) rescue []).each do |llineno, lcode, lcurrent| %>
186
- <a href="txmt://open?url=file://<%=file%>&amp;line=<%=llineno%>"><%= llineno %></a><%='<em>' if llineno==lineno.to_i %><%= lcode.size > 90 ? CGI.escapeHTML(lcode[0..90])+'<span class="more">......</span>' : CGI.escapeHTML(lcode) %><%='</em>' if llineno==lineno.to_i %>
187
- <% end %>
188
-
189
- </td>
190
- </tr>
191
- </tbody>
192
- <% end %>
193
- </table>
194
- <script type="text/javascript" charset="utf-8">
195
- // swop the open & closed classes
196
- els = document.getElementsByTagName('td');
197
- for(i=0; i<els.length; i++){
198
- if(els[i].className=='expand' || els[i].className=='collapse'){
199
- els[i].onclick = function(e){
200
- tbody = this.parentNode.parentNode;
201
- if(tbody.className=='open'){
202
- tbody.className='closed';
203
- }else{
204
- tbody.className='open';
205
- }
206
- }
207
- }
208
- }
209
- </script>
210
- <% end %>
211
- <div class="footer">
212
- lots of love, from <a href="#">merb</a>
213
- </div>
214
- </div>
215
- </body>
216
- </html>