webroar 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (402) hide show
  1. data/CHANGELOG +7 -0
  2. data/README +1 -1
  3. data/doc/user-guide.html +125 -85
  4. data/doc/user-guide.txt +2 -2
  5. data/lib/constant.rb +23 -16
  6. data/lib/db_connect.rb +2 -3
  7. data/lib/installer.rb +17 -10
  8. data/lib/user_interaction.rb +21 -10
  9. data/lib/webroar_command.rb +21 -23
  10. data/src/admin_panel/Gemfile +8 -0
  11. data/src/admin_panel/Rakefile +2 -5
  12. data/src/admin_panel/app/controllers/application_controller.rb +1 -1
  13. data/src/admin_panel/app/controllers/exceptions_controller.rb +25 -26
  14. data/src/admin_panel/app/controllers/graph_controller.rb +2 -1
  15. data/src/admin_panel/app/helpers/admin_helper.rb +1 -1
  16. data/src/admin_panel/app/{models → mailers}/mailer.rb +5 -8
  17. data/src/admin_panel/app/models/app.rb +1 -1
  18. data/src/admin_panel/app/models/app_exception.rb +15 -11
  19. data/src/admin_panel/app/models/app_time_sample.rb +40 -10
  20. data/src/admin_panel/app/models/application_specification.rb +71 -41
  21. data/src/admin_panel/app/models/resource_usage.rb +76 -55
  22. data/src/admin_panel/app/models/url_breakup_time_sample.rb +6 -11
  23. data/src/admin_panel/app/models/url_time_sample.rb +57 -13
  24. data/src/admin_panel/app/views/admin/_application_table.html.erb +5 -5
  25. data/src/admin_panel/app/views/admin/_feedback_partial.html.erb +4 -4
  26. data/src/admin_panel/app/views/admin/_report_bug_partial.html.erb +5 -5
  27. data/src/admin_panel/app/views/admin/change_password_form.html.erb +3 -3
  28. data/src/admin_panel/app/views/admin/configuration.html.erb +6 -6
  29. data/src/admin_panel/app/views/admin/home.html.erb +4 -4
  30. data/src/admin_panel/app/views/admin/index.html.erb +5 -5
  31. data/src/admin_panel/app/views/application_specification/_application_specification_form.html.erb +15 -6
  32. data/src/admin_panel/app/views/exceptions/_add_and_list_exception_classes.html.erb +7 -6
  33. data/src/admin_panel/app/views/exceptions/_exception_backtrace_partial.html.erb +1 -1
  34. data/src/admin_panel/app/views/exceptions/_exception_environment_partial.html.erb +30 -30
  35. data/src/admin_panel/app/views/exceptions/_exception_list_partial.html.erb +11 -11
  36. data/src/admin_panel/app/views/exceptions/_show.html.erb +8 -8
  37. data/src/admin_panel/app/views/exceptions/index.html.erb +0 -1
  38. data/src/admin_panel/app/views/graph/_get_database_data.html.erb +1 -1
  39. data/src/admin_panel/app/views/graph/_get_resource_usage_data_app.html.erb +2 -2
  40. data/src/admin_panel/app/views/graph/_get_resource_usage_data_server.html.erb +2 -2
  41. data/src/admin_panel/app/views/graph/_get_throughput_data.html.erb +2 -2
  42. data/src/admin_panel/app/views/graph/_get_url_data.html.erb +4 -4
  43. data/src/admin_panel/app/views/graph/_pie.html.erb +2 -2
  44. data/src/admin_panel/app/views/graph/_query_date.html.erb +1 -1
  45. data/src/admin_panel/app/views/graph/_query_period.html.erb +1 -1
  46. data/src/admin_panel/app/views/graph/_slider_partial.html.erb +5 -4
  47. data/src/admin_panel/app/views/graph/index.html.erb +0 -1
  48. data/src/admin_panel/app/views/headers/_add_expires_text_box.html.erb +5 -5
  49. data/src/admin_panel/app/views/headers/_expires_by_type_form.html.erb +1 -1
  50. data/src/admin_panel/app/views/headers/_headers_table.html.erb +12 -12
  51. data/src/admin_panel/app/views/layouts/application.html.erb +71 -51
  52. data/src/admin_panel/app/views/mail_specification/_current_spec.html.erb +4 -4
  53. data/src/admin_panel/app/views/mail_specification/_sendmail_form.html.erb +3 -3
  54. data/src/admin_panel/app/views/mail_specification/_smtp_form.html.erb +3 -3
  55. data/src/admin_panel/app/views/server_specification/_add_div.html.erb +4 -4
  56. data/src/admin_panel/app/views/server_specification/_ssl_support_form.html.erb +3 -2
  57. data/src/admin_panel/config.ru +4 -0
  58. data/src/admin_panel/config/application.rb +46 -0
  59. data/src/admin_panel/config/boot.rb +4 -112
  60. data/src/admin_panel/config/environment.rb +4 -85
  61. data/src/admin_panel/config/environments/development.rb +20 -13
  62. data/src/admin_panel/config/environments/production.rb +44 -17
  63. data/src/admin_panel/config/environments/test.rb +31 -18
  64. data/src/admin_panel/config/initializers/application_constants.rb +13 -11
  65. data/src/admin_panel/config/initializers/secret_token.rb +7 -0
  66. data/src/admin_panel/config/initializers/session_store.rb +8 -0
  67. data/src/admin_panel/config/initializers/ssl.rb +6 -2
  68. data/src/admin_panel/config/routes.rb +15 -57
  69. data/src/admin_panel/doc/README_FOR_APP +1 -1
  70. data/src/admin_panel/doc/app/ActionView.html +229 -0
  71. data/src/admin_panel/doc/app/ActionView/Helpers.html +229 -0
  72. data/src/admin_panel/doc/app/ActionView/Helpers/AssetTagHelper.html +277 -0
  73. data/src/admin_panel/doc/app/AdminController.html +814 -0
  74. data/src/admin_panel/doc/app/AdminHelper.html +495 -0
  75. data/src/admin_panel/doc/app/Analytics.html +272 -0
  76. data/src/admin_panel/doc/app/Analytics/Database.html +401 -0
  77. data/src/admin_panel/doc/app/Analytics/ResourceUsage.html +683 -0
  78. data/src/admin_panel/doc/app/Analytics/Throughput.html +488 -0
  79. data/src/admin_panel/doc/app/Analytics/Url.html +484 -0
  80. data/src/admin_panel/doc/app/Analytics/UrlBreakup.html +537 -0
  81. data/src/admin_panel/doc/app/App.html +489 -0
  82. data/src/admin_panel/doc/app/AppException.html +710 -0
  83. data/src/admin_panel/doc/app/AppTimeSample.html +620 -0
  84. data/src/admin_panel/doc/app/ApplicationController.html +239 -0
  85. data/src/admin_panel/doc/app/ApplicationHelper.html +296 -0
  86. data/src/admin_panel/doc/app/ApplicationSpecification.html +876 -0
  87. data/src/admin_panel/doc/app/ApplicationSpecificationController.html +552 -0
  88. data/src/admin_panel/doc/app/ApplicationSpecificationHelper.html +219 -0
  89. data/src/admin_panel/doc/app/Control.html +431 -0
  90. data/src/admin_panel/doc/app/ExceptionDetail.html +227 -0
  91. data/src/admin_panel/doc/app/ExceptionsController.html +754 -0
  92. data/src/admin_panel/doc/app/ExceptionsHelper.html +219 -0
  93. data/src/admin_panel/doc/app/GraphController.html +1101 -0
  94. data/src/admin_panel/doc/app/GraphHelper.html +285 -0
  95. data/src/admin_panel/doc/app/Headers.html +549 -0
  96. data/src/admin_panel/doc/app/HeadersController.html +507 -0
  97. data/src/admin_panel/doc/app/HeadersHelper.html +219 -0
  98. data/src/admin_panel/doc/app/MailSpecification.html +685 -0
  99. data/src/admin_panel/doc/app/MailSpecificationController.html +541 -0
  100. data/src/admin_panel/doc/app/MailSpecificationHelper.html +219 -0
  101. data/src/admin_panel/doc/app/Mailer.html +589 -0
  102. data/src/admin_panel/doc/app/Object.html +240 -0
  103. data/src/admin_panel/doc/app/PseudoModel.html +354 -0
  104. data/src/admin_panel/doc/app/ResourceUsage.html +656 -0
  105. data/src/admin_panel/doc/app/SCGI.html +674 -0
  106. data/src/admin_panel/doc/app/ServerSpecification.html +479 -0
  107. data/src/admin_panel/doc/app/ServerSpecificationController.html +500 -0
  108. data/src/admin_panel/doc/app/ServerSpecificationHelper.html +219 -0
  109. data/src/admin_panel/doc/app/SignalHelper.html +287 -0
  110. data/src/admin_panel/doc/app/UrlBreakupTimeSample.html +287 -0
  111. data/src/admin_panel/doc/app/UrlTimeSample.html +986 -0
  112. data/src/admin_panel/doc/app/User.html +290 -0
  113. data/src/admin_panel/doc/app/YAMLConfig.html +247 -0
  114. data/src/admin_panel/doc/app/YAMLWriter.html +284 -0
  115. data/src/admin_panel/doc/app/app/controllers/admin_controller_rb.html +52 -0
  116. data/src/admin_panel/doc/app/app/controllers/application_controller_rb.html +54 -0
  117. data/src/admin_panel/doc/app/app/controllers/application_specification_controller_rb.html +52 -0
  118. data/src/admin_panel/doc/app/app/controllers/exceptions_controller_rb.html +52 -0
  119. data/src/admin_panel/doc/app/app/controllers/graph_controller_rb.html +52 -0
  120. data/src/admin_panel/doc/app/app/controllers/headers_controller_rb.html +52 -0
  121. data/src/admin_panel/doc/app/app/controllers/mail_specification_controller_rb.html +52 -0
  122. data/src/admin_panel/doc/app/app/controllers/server_specification_controller_rb.html +52 -0
  123. data/src/admin_panel/doc/app/app/helpers/admin_helper_rb.html +52 -0
  124. data/src/admin_panel/doc/app/app/helpers/application_helper_rb.html +52 -0
  125. data/src/admin_panel/doc/app/app/helpers/application_specification_helper_rb.html +52 -0
  126. data/src/admin_panel/doc/app/app/helpers/exceptions_helper_rb.html +52 -0
  127. data/src/admin_panel/doc/app/app/helpers/graph_helper_rb.html +52 -0
  128. data/src/admin_panel/doc/app/app/helpers/headers_helper_rb.html +52 -0
  129. data/src/admin_panel/doc/app/app/helpers/mail_specification_helper_rb.html +52 -0
  130. data/src/admin_panel/doc/app/app/helpers/server_specification_helper_rb.html +52 -0
  131. data/src/admin_panel/doc/app/app/mailers/mailer_rb.html +56 -0
  132. data/src/admin_panel/doc/app/app/models/app_exception_rb.html +52 -0
  133. data/src/admin_panel/doc/app/app/models/app_rb.html +54 -0
  134. data/src/admin_panel/doc/app/app/models/app_time_sample_rb.html +52 -0
  135. data/src/admin_panel/doc/app/app/models/application_specification_rb.html +52 -0
  136. data/src/admin_panel/doc/app/app/models/exception_detail_rb.html +52 -0
  137. data/src/admin_panel/doc/app/app/models/headers_rb.html +52 -0
  138. data/src/admin_panel/doc/app/app/models/mail_specification_rb.html +52 -0
  139. data/src/admin_panel/doc/app/app/models/pseudo_model_rb.html +52 -0
  140. data/src/admin_panel/doc/app/app/models/resource_usage_rb.html +52 -0
  141. data/src/admin_panel/doc/app/app/models/server_specification_rb.html +52 -0
  142. data/src/admin_panel/doc/app/app/models/url_breakup_time_sample_rb.html +52 -0
  143. data/src/admin_panel/doc/app/app/models/url_time_sample_rb.html +52 -0
  144. data/src/admin_panel/doc/app/app/models/user_rb.html +52 -0
  145. data/src/admin_panel/doc/app/created.rid +42 -1
  146. data/src/admin_panel/doc/app/doc/README_FOR_APP.html +172 -0
  147. data/src/admin_panel/doc/app/images/brick.png +0 -0
  148. data/src/admin_panel/doc/app/images/brick_link.png +0 -0
  149. data/src/admin_panel/doc/app/images/bug.png +0 -0
  150. data/src/admin_panel/doc/app/images/bullet_black.png +0 -0
  151. data/src/admin_panel/doc/app/images/bullet_toggle_minus.png +0 -0
  152. data/src/admin_panel/doc/app/images/bullet_toggle_plus.png +0 -0
  153. data/src/admin_panel/doc/app/images/date.png +0 -0
  154. data/src/admin_panel/doc/app/images/find.png +0 -0
  155. data/src/admin_panel/doc/app/images/loadingAnimation.gif +0 -0
  156. data/src/admin_panel/doc/app/images/macFFBgHack.png +0 -0
  157. data/src/admin_panel/doc/app/images/package.png +0 -0
  158. data/src/admin_panel/doc/app/images/page_green.png +0 -0
  159. data/src/admin_panel/doc/app/images/page_white_text.png +0 -0
  160. data/src/admin_panel/doc/app/images/page_white_width.png +0 -0
  161. data/src/admin_panel/doc/app/images/plugin.png +0 -0
  162. data/src/admin_panel/doc/app/images/ruby.png +0 -0
  163. data/src/admin_panel/doc/app/images/tag_green.png +0 -0
  164. data/src/admin_panel/doc/app/images/wrench.png +0 -0
  165. data/src/admin_panel/doc/app/images/wrench_orange.png +0 -0
  166. data/src/admin_panel/doc/app/images/zoom.png +0 -0
  167. data/src/admin_panel/doc/app/index.html +564 -20
  168. data/src/admin_panel/doc/app/js/darkfish.js +116 -0
  169. data/src/admin_panel/doc/app/js/jquery.js +32 -0
  170. data/src/admin_panel/doc/app/js/quicksearch.js +114 -0
  171. data/src/admin_panel/doc/app/js/thickbox-compressed.js +10 -0
  172. data/src/admin_panel/doc/app/lib/asset_tag_helper_ext_rb.html +52 -0
  173. data/src/admin_panel/doc/app/lib/control_rb.html +58 -0
  174. data/src/admin_panel/doc/app/lib/graph_controller_extensions/database_analytics_rb.html +52 -0
  175. data/src/admin_panel/doc/app/lib/graph_controller_extensions/resource_usage_analytics_rb.html +52 -0
  176. data/src/admin_panel/doc/app/lib/graph_controller_extensions/throughput_analytics_rb.html +52 -0
  177. data/src/admin_panel/doc/app/lib/graph_controller_extensions/url_analytics_rb.html +52 -0
  178. data/src/admin_panel/doc/app/lib/graph_controller_extensions/url_breakup_analytics_rb.html +52 -0
  179. data/src/admin_panel/doc/app/lib/helper_rb.html +52 -0
  180. data/src/admin_panel/doc/app/lib/scgi_rb.html +54 -0
  181. data/src/admin_panel/doc/app/lib/yaml_writer_rb.html +52 -0
  182. data/src/admin_panel/doc/app/rdoc.css +763 -0
  183. data/src/admin_panel/lib/helper.rb +6 -2
  184. data/src/admin_panel/public/stylesheets/other/login.css +8 -4
  185. data/src/admin_panel/public/stylesheets/other/style.css +21 -17
  186. data/src/admin_panel/script/rails +6 -0
  187. data/src/admin_panel/test/test_helper.rb +2 -2
  188. data/src/admin_panel/vendor/plugins/calendar_date_select/History.txt +281 -0
  189. data/src/admin_panel/vendor/plugins/calendar_date_select/MIT-LICENSE +20 -0
  190. data/src/admin_panel/vendor/plugins/calendar_date_select/Manifest.txt +42 -0
  191. data/src/admin_panel/vendor/plugins/calendar_date_select/README.txt +17 -0
  192. data/src/admin_panel/vendor/plugins/calendar_date_select/Rakefile +37 -0
  193. data/src/admin_panel/vendor/plugins/calendar_date_select/VERSION +1 -0
  194. data/src/admin_panel/vendor/plugins/calendar_date_select/calendar_date_select.gemspec +95 -0
  195. data/src/admin_panel/vendor/plugins/calendar_date_select/init.rb +1 -0
  196. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/functional/cds_test.html +376 -0
  197. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/functional/format_iso_date_test.html +52 -0
  198. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/prototype.js +4184 -0
  199. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/test.css +40 -0
  200. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/unit/cds_helper_methods.html +46 -0
  201. data/src/admin_panel/vendor/plugins/calendar_date_select/js_test/unittest.js +564 -0
  202. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select.rb +33 -0
  203. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/calendar_date_select.rb +122 -0
  204. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/form_helpers.rb +237 -0
  205. data/src/admin_panel/vendor/plugins/calendar_date_select/lib/calendar_date_select/includes_helper.rb +29 -0
  206. data/src/admin_panel/vendor/plugins/calendar_date_select/public/blank_iframe.html +2 -0
  207. data/src/admin_panel/vendor/plugins/calendar_date_select/public/images/calendar_date_select/calendar.gif +0 -0
  208. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/calendar_date_select.js +459 -0
  209. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_american.js +35 -0
  210. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_danish.js +31 -0
  211. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_db.js +27 -0
  212. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
  213. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
  214. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_finnish.js +32 -0
  215. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
  216. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_iso_date.js +29 -0
  217. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_italian.js +24 -0
  218. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ar.js +10 -0
  219. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/cs.js +11 -0
  220. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/da.js +11 -0
  221. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/de.js +11 -0
  222. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/es.js +11 -0
  223. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fi.js +10 -0
  224. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fr.js +11 -0
  225. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/hu.js +11 -0
  226. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/it.js +9 -0
  227. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ja.js +11 -0
  228. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/nl.js +11 -0
  229. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/pl.js +11 -0
  230. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/pt.js +11 -0
  231. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/ru.js +10 -0
  232. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/sl.js +11 -0
  233. data/src/admin_panel/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/sv.js +9 -0
  234. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/blue.css +130 -0
  235. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/default.css +135 -0
  236. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/green.css +142 -0
  237. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/plain.css +128 -0
  238. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/red.css +135 -0
  239. data/src/admin_panel/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/silver.css +133 -0
  240. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
  241. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/form_helpers_spec.rb +189 -0
  242. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/calendar_date_select/includes_helper_spec.rb +46 -0
  243. data/src/admin_panel/vendor/plugins/calendar_date_select/spec/spec_helper.rb +26 -0
  244. data/src/admin_panel/vendor/plugins/open_flash_chart_2_plugin/install.rb +2 -2
  245. data/src/admin_panel/vendor/plugins/open_flash_chart_2_plugin/uninstall.rb +2 -2
  246. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/README.markdown +13 -0
  247. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/init.rb +1 -0
  248. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +432 -0
  249. data/src/admin_panel/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +297 -0
  250. data/src/helper/wr_config.c +1 -1
  251. data/src/ruby_lib/analyzer/message_analyzer.rb +1 -0
  252. data/src/ruby_lib/analyzer/webroar_analyzer.rb +2 -2
  253. data/src/ruby_lib/profiler/message_dispatcher.rb +1 -1
  254. data/src/ruby_lib/ruby_interface/version.rb +2 -2
  255. data/src/ruby_lib/webroar_app_loader.rb +1 -1
  256. data/tasks/gem.rake +5 -7
  257. data/tasks/test.rake +1 -0
  258. data/test/spec/analytics_spec.rb +25 -24
  259. data/test/spec/test_app/README +142 -129
  260. data/test/spec/test_app/Rakefile +2 -5
  261. data/test/spec/test_app/app/controllers/application_controller.rb +3 -8
  262. data/test/spec/test_app/app/controllers/test_controller.rb +3 -3
  263. data/test/spec/test_app/app/controllers/users_controller.rb +8 -8
  264. data/test/spec/test_app/app/helpers/application_helper.rb +2 -1
  265. data/test/spec/test_app/app/helpers/test_helper.rb +2 -0
  266. data/test/spec/test_app/app/helpers/users_helper.rb +2 -0
  267. data/test/spec/test_app/app/models/user.rb +2 -0
  268. data/test/spec/test_app/app/views/layouts/{users.html.erb → application.html.erb} +6 -9
  269. data/test/spec/test_app/app/views/test/post_data.html.erb +2 -2
  270. data/test/spec/test_app/app/views/test/upload_file.html.erb +1 -1
  271. data/test/spec/test_app/{db/migrate/20090602102438_create_users.rb → app/views/users/_form.html.erb} +22 -11
  272. data/test/spec/test_app/app/views/users/edit.html.erb +19 -28
  273. data/test/spec/test_app/app/views/users/index.html.erb +23 -19
  274. data/test/spec/test_app/app/views/users/new.html.erb +19 -28
  275. data/test/spec/test_app/app/views/users/show.html.erb +21 -18
  276. data/test/spec/test_app/config/application.rb +45 -0
  277. data/test/spec/test_app/config/boot.rb +4 -112
  278. data/test/spec/test_app/config/database.yml +1 -1
  279. data/test/spec/test_app/config/environment.rb +4 -41
  280. data/test/spec/test_app/config/environments/development.rb +22 -13
  281. data/test/spec/test_app/config/environments/production.rb +41 -20
  282. data/test/spec/test_app/config/environments/test.rb +35 -28
  283. data/test/spec/test_app/config/initializers/backtrace_silencers.rb +2 -2
  284. data/test/spec/test_app/config/initializers/inflections.rb +1 -1
  285. data/test/spec/test_app/config/initializers/secret_token.rb +7 -0
  286. data/test/spec/test_app/config/initializers/session_store.rb +3 -10
  287. data/test/spec/test_app/config/locales/en.yml +5 -0
  288. data/test/spec/test_app/config/routes.rb +37 -22
  289. data/test/spec/test_app/db/migrate/20110906113329_create_users.rb +13 -0
  290. data/test/spec/test_app/db/seeds.rb +7 -0
  291. data/test/spec/test_app/public/404.html +15 -19
  292. data/test/spec/test_app/public/422.html +15 -19
  293. data/test/spec/test_app/public/500.html +14 -18
  294. data/test/spec/test_app/public/index.html +41 -77
  295. data/test/spec/test_app/public/javascripts/controls.js +5 -3
  296. data/test/spec/test_app/public/javascripts/dragdrop.js +7 -6
  297. data/test/spec/test_app/public/javascripts/effects.js +8 -13
  298. data/test/spec/test_app/public/javascripts/prototype.js +3381 -1700
  299. data/test/spec/test_app/public/javascripts/rails.js +191 -0
  300. data/test/spec/test_app/public/stylesheets/scaffold.css +15 -13
  301. data/test/spec/test_app/script/rails +6 -0
  302. metadata +340 -163
  303. data/src/admin_panel/Gemfile.lock +0 -79
  304. data/src/admin_panel/doc/app/classes/ActionView.html +0 -111
  305. data/src/admin_panel/doc/app/classes/ActionView/Helpers.html +0 -111
  306. data/src/admin_panel/doc/app/classes/ActionView/Helpers/AssetTagHelper.html +0 -149
  307. data/src/admin_panel/doc/app/classes/AdminController.html +0 -628
  308. data/src/admin_panel/doc/app/classes/AdminHelper.html +0 -482
  309. data/src/admin_panel/doc/app/classes/Analytics.html +0 -138
  310. data/src/admin_panel/doc/app/classes/Analytics/Database.html +0 -245
  311. data/src/admin_panel/doc/app/classes/Analytics/ResourceUsage.html +0 -478
  312. data/src/admin_panel/doc/app/classes/Analytics/Throughput.html +0 -316
  313. data/src/admin_panel/doc/app/classes/Analytics/Url.html +0 -314
  314. data/src/admin_panel/doc/app/classes/Analytics/UrlBreakup.html +0 -372
  315. data/src/admin_panel/doc/app/classes/App.html +0 -298
  316. data/src/admin_panel/doc/app/classes/AppException.html +0 -330
  317. data/src/admin_panel/doc/app/classes/AppTimeSample.html +0 -427
  318. data/src/admin_panel/doc/app/classes/ApplicationController.html +0 -118
  319. data/src/admin_panel/doc/app/classes/ApplicationHelper.html +0 -172
  320. data/src/admin_panel/doc/app/classes/ApplicationSpecification.html +0 -641
  321. data/src/admin_panel/doc/app/classes/ApplicationSpecificationController.html +0 -354
  322. data/src/admin_panel/doc/app/classes/Control.html +0 -273
  323. data/src/admin_panel/doc/app/classes/ExceptionsController.html +0 -612
  324. data/src/admin_panel/doc/app/classes/ExceptionsHelper.html +0 -105
  325. data/src/admin_panel/doc/app/classes/GraphController.html +0 -804
  326. data/src/admin_panel/doc/app/classes/GraphHelper.html +0 -164
  327. data/src/admin_panel/doc/app/classes/MailSpecification.html +0 -357
  328. data/src/admin_panel/doc/app/classes/MailSpecificationController.html +0 -304
  329. data/src/admin_panel/doc/app/classes/PseudoModel.html +0 -206
  330. data/src/admin_panel/doc/app/classes/ResourceUsage.html +0 -425
  331. data/src/admin_panel/doc/app/classes/SCGI.html +0 -406
  332. data/src/admin_panel/doc/app/classes/ServerSpecification.html +0 -325
  333. data/src/admin_panel/doc/app/classes/ServerSpecificationController.html +0 -273
  334. data/src/admin_panel/doc/app/classes/UrlBreakupTimeSample.html +0 -169
  335. data/src/admin_panel/doc/app/classes/UrlTimeSample.html +0 -708
  336. data/src/admin_panel/doc/app/classes/User.html +0 -165
  337. data/src/admin_panel/doc/app/classes/YAMLWriter.html +0 -159
  338. data/src/admin_panel/doc/app/files/app/controllers/admin_controller_rb.html +0 -101
  339. data/src/admin_panel/doc/app/files/app/controllers/application_controller_rb.html +0 -108
  340. data/src/admin_panel/doc/app/files/app/controllers/application_specification_controller_rb.html +0 -101
  341. data/src/admin_panel/doc/app/files/app/controllers/exceptions_controller_rb.html +0 -101
  342. data/src/admin_panel/doc/app/files/app/controllers/graph_controller_rb.html +0 -101
  343. data/src/admin_panel/doc/app/files/app/controllers/mail_specification_controller_rb.html +0 -101
  344. data/src/admin_panel/doc/app/files/app/controllers/server_specification_controller_rb.html +0 -101
  345. data/src/admin_panel/doc/app/files/app/helpers/admin_helper_rb.html +0 -101
  346. data/src/admin_panel/doc/app/files/app/helpers/application_helper_rb.html +0 -101
  347. data/src/admin_panel/doc/app/files/app/helpers/exceptions_helper_rb.html +0 -101
  348. data/src/admin_panel/doc/app/files/app/helpers/graph_helper_rb.html +0 -101
  349. data/src/admin_panel/doc/app/files/app/models/app_exception_rb.html +0 -101
  350. data/src/admin_panel/doc/app/files/app/models/app_rb.html +0 -108
  351. data/src/admin_panel/doc/app/files/app/models/app_time_sample_rb.html +0 -101
  352. data/src/admin_panel/doc/app/files/app/models/application_specification_rb.html +0 -101
  353. data/src/admin_panel/doc/app/files/app/models/mail_specification_rb.html +0 -101
  354. data/src/admin_panel/doc/app/files/app/models/pseudo_model_rb.html +0 -101
  355. data/src/admin_panel/doc/app/files/app/models/resource_usage_rb.html +0 -101
  356. data/src/admin_panel/doc/app/files/app/models/server_specification_rb.html +0 -101
  357. data/src/admin_panel/doc/app/files/app/models/url_breakup_time_sample_rb.html +0 -101
  358. data/src/admin_panel/doc/app/files/app/models/url_time_sample_rb.html +0 -101
  359. data/src/admin_panel/doc/app/files/app/models/user_rb.html +0 -101
  360. data/src/admin_panel/doc/app/files/doc/README_FOR_APP.html +0 -109
  361. data/src/admin_panel/doc/app/files/lib/asset_tag_helper_ext_rb.html +0 -101
  362. data/src/admin_panel/doc/app/files/lib/control_rb.html +0 -110
  363. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/database_analytics_rb.html +0 -101
  364. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/resource_usage_analytics_rb.html +0 -101
  365. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/throughput_analytics_rb.html +0 -101
  366. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/url_analytics_rb.html +0 -101
  367. data/src/admin_panel/doc/app/files/lib/graph_controller_extensions/url_breakup_analytics_rb.html +0 -101
  368. data/src/admin_panel/doc/app/files/lib/scgi_rb.html +0 -101
  369. data/src/admin_panel/doc/app/files/lib/yaml_writer_rb.html +0 -101
  370. data/src/admin_panel/doc/app/fr_class_index.html +0 -60
  371. data/src/admin_panel/doc/app/fr_file_index.html +0 -58
  372. data/src/admin_panel/doc/app/fr_method_index.html +0 -206
  373. data/src/admin_panel/doc/app/rdoc-style.css +0 -208
  374. data/src/admin_panel/public/dispatch.cgi +0 -10
  375. data/src/admin_panel/public/dispatch.fcgi +0 -24
  376. data/src/admin_panel/public/dispatch.rb +0 -10
  377. data/src/admin_panel/script/about +0 -4
  378. data/src/admin_panel/script/console +0 -3
  379. data/src/admin_panel/script/dbconsole +0 -3
  380. data/src/admin_panel/script/destroy +0 -3
  381. data/src/admin_panel/script/generate +0 -3
  382. data/src/admin_panel/script/performance/benchmarker +0 -3
  383. data/src/admin_panel/script/performance/profiler +0 -3
  384. data/src/admin_panel/script/performance/request +0 -3
  385. data/src/admin_panel/script/plugin +0 -3
  386. data/src/admin_panel/script/process/inspector +0 -3
  387. data/src/admin_panel/script/process/reaper +0 -3
  388. data/src/admin_panel/script/process/spawner +0 -3
  389. data/src/admin_panel/script/runner +0 -3
  390. data/src/admin_panel/script/server +0 -3
  391. data/test/spec/test_app/config/initializers/new_rails_defaults.rb +0 -19
  392. data/test/spec/test_app/script/about +0 -4
  393. data/test/spec/test_app/script/console +0 -3
  394. data/test/spec/test_app/script/dbconsole +0 -3
  395. data/test/spec/test_app/script/destroy +0 -3
  396. data/test/spec/test_app/script/generate +0 -3
  397. data/test/spec/test_app/script/performance/benchmarker +0 -3
  398. data/test/spec/test_app/script/performance/profiler +0 -3
  399. data/test/spec/test_app/script/plugin +0 -3
  400. data/test/spec/test_app/script/runner +0 -3
  401. data/test/spec/test_app/script/server +0 -3
  402. data/test/spec/test_app/vendor/.placeholder +0 -0
@@ -1,164 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: GraphHelper</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">GraphHelper</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/app/helpers/graph_helper_rb.html">
59
- app/helpers/graph_helper.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- Methods added to this helper will be available to all view files for the
78
- graph controller.
79
- </p>
80
-
81
- </div>
82
-
83
-
84
- </div>
85
-
86
- <div id="method-list">
87
- <h3 class="section-bar">Methods</h3>
88
-
89
- <div class="name-list">
90
- <a href="#M000180">get_partial</a>&nbsp;&nbsp;
91
- </div>
92
- </div>
93
-
94
- </div>
95
-
96
-
97
- <!-- if includes -->
98
-
99
- <div id="section">
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
- <!-- if method_list -->
109
- <div id="methods">
110
- <h3 class="section-bar">Public Instance methods</h3>
111
-
112
- <div id="method-M000180" class="method-detail">
113
- <a name="M000180"></a>
114
-
115
- <div class="method-heading">
116
- <a href="#M000180" class="method-signature">
117
- <span class="method-name">get_partial</span><span class="method-args">(url_type)</span>
118
- </a>
119
- </div>
120
-
121
- <div class="method-description">
122
- <p>
123
- This method is used to get the name of the partial to be rendered on
124
- selecting the Graph from the select box in the <a
125
- href="Analytics.html">Analytics</a> page.
126
- </p>
127
- <p><a class="source-toggle" href="#"
128
- onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
129
- <div class="method-source-code" id="M000180-source">
130
- <pre>
131
- <span class="ruby-comment cmt"># File app/helpers/graph_helper.rb, line 24</span>
132
- 24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_partial</span>(<span class="ruby-identifier">url_type</span>)
133
- 25: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">url_type</span>
134
- 26: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;URL-Calls&quot;</span>
135
- 27: <span class="ruby-identifier">partial</span> = <span class="ruby-value str">'url_calls_graph'</span>
136
- 28: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;Database-Usage&quot;</span>
137
- 29: <span class="ruby-identifier">partial</span> = <span class="ruby-value str">'database_usage_graph'</span>
138
- 30: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;URL-Breakup&quot;</span>
139
- 31: <span class="ruby-identifier">partial</span> = <span class="ruby-value str">'url_breakup_graph'</span>
140
- 32: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;Throughput&quot;</span>
141
- 33: <span class="ruby-identifier">partial</span> = <span class="ruby-value str">'throughput_graph'</span>
142
- 34: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;Resource-Usage&quot;</span>
143
- 35: <span class="ruby-identifier">partial</span>=<span class="ruby-value str">'resource_usage_graph_app'</span>
144
- 36: <span class="ruby-keyword kw">end</span>
145
- 37: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">partial</span>
146
- 38: <span class="ruby-keyword kw">end</span>
147
- </pre>
148
- </div>
149
- </div>
150
- </div>
151
-
152
-
153
- </div>
154
-
155
-
156
- </div>
157
-
158
-
159
- <div id="validator-badges">
160
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
161
- </div>
162
-
163
- </body>
164
- </html>
@@ -1,357 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: MailSpecification</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">MailSpecification</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../files/app/models/mail_specification_rb.html">
59
- app/models/mail_specification.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000021">save_sendmail_specification</a>&nbsp;&nbsp;
90
- <a href="#M000024">save_smtp_specification</a>&nbsp;&nbsp;
91
- <a href="#M000022">sendmail_specification_hash</a>&nbsp;&nbsp;
92
- <a href="#M000025">smtp_specification_hash</a>&nbsp;&nbsp;
93
- <a href="#M000020">validate_sendmail_specification</a>&nbsp;&nbsp;
94
- <a href="#M000023">validate_smtp_specification</a>&nbsp;&nbsp;
95
- </div>
96
- </div>
97
-
98
- </div>
99
-
100
-
101
- <!-- if includes -->
102
-
103
- <div id="section">
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <!-- if method_list -->
113
- <div id="methods">
114
- <h3 class="section-bar">Public Class methods</h3>
115
-
116
- <div id="method-M000021" class="method-detail">
117
- <a name="M000021"></a>
118
-
119
- <div class="method-heading">
120
- <a href="#M000021" class="method-signature">
121
- <span class="method-name">save_sendmail_specification</span><span class="method-args">(sendmail)</span>
122
- </a>
123
- </div>
124
-
125
- <div class="method-description">
126
- <p><a class="source-toggle" href="#"
127
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
128
- <div class="method-source-code" id="M000021-source">
129
- <pre>
130
- <span class="ruby-comment cmt"># File app/models/mail_specification.rb, line 51</span>
131
- 51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_sendmail_specification</span>(<span class="ruby-identifier">sendmail</span>)
132
- 52: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">sendmail_specification_hash</span>(<span class="ruby-identifier">sendmail</span>)
133
- 53: <span class="ruby-identifier">data</span> = {<span class="ruby-value str">'sendmail'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">data</span>}
134
- 54: <span class="ruby-constant">YAMLWriter</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>, <span class="ruby-constant">MAIL_FILE_PATH</span>, <span class="ruby-value str">&quot;sendmail&quot;</span>)
135
- 55: <span class="ruby-keyword kw">end</span>
136
- </pre>
137
- </div>
138
- </div>
139
- </div>
140
-
141
- <div id="method-M000024" class="method-detail">
142
- <a name="M000024"></a>
143
-
144
- <div class="method-heading">
145
- <a href="#M000024" class="method-signature">
146
- <span class="method-name">save_smtp_specification</span><span class="method-args">(smtp)</span>
147
- </a>
148
- </div>
149
-
150
- <div class="method-description">
151
- <p><a class="source-toggle" href="#"
152
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
153
- <div class="method-source-code" id="M000024-source">
154
- <pre>
155
- <span class="ruby-comment cmt"># File app/models/mail_specification.rb, line 107</span>
156
- 107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save_smtp_specification</span>(<span class="ruby-identifier">smtp</span>)
157
- 108: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">smtp_specification_hash</span>(<span class="ruby-identifier">smtp</span>)
158
- 109: <span class="ruby-identifier">data</span> = {<span class="ruby-value str">'smtp'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">data</span>}
159
- 110: <span class="ruby-constant">YAMLWriter</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>, <span class="ruby-constant">MAIL_FILE_PATH</span>, <span class="ruby-value str">&quot;smtp&quot;</span>)
160
- 111: <span class="ruby-keyword kw">end</span>
161
- </pre>
162
- </div>
163
- </div>
164
- </div>
165
-
166
- <div id="method-M000022" class="method-detail">
167
- <a name="M000022"></a>
168
-
169
- <div class="method-heading">
170
- <a href="#M000022" class="method-signature">
171
- <span class="method-name">sendmail_specification_hash</span><span class="method-args">(sendmail=nil)</span>
172
- </a>
173
- </div>
174
-
175
- <div class="method-description">
176
- <p><a class="source-toggle" href="#"
177
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
178
- <div class="method-source-code" id="M000022-source">
179
- <pre>
180
- <span class="ruby-comment cmt"># File app/models/mail_specification.rb, line 57</span>
181
- 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sendmail_specification_hash</span>(<span class="ruby-identifier">sendmail</span>=<span class="ruby-keyword kw">nil</span>)
182
- 58: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sendmail</span> <span class="ruby-comment cmt"># create Hash from passed argument</span>
183
- 59: <span class="ruby-constant">Hash</span>[
184
- 60: <span class="ruby-value str">'location'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:location</span>],
185
- 61: <span class="ruby-value str">'arguments'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;-f&quot;</span>,
186
- 62: <span class="ruby-value str">'from'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:from</span>],
187
- 63: <span class="ruby-value str">'recipients'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:recipients</span>]
188
- 64: ]
189
- 65: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># render default values</span>
190
- 66: <span class="ruby-constant">Hash</span>[
191
- 67: <span class="ruby-value str">'location'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>,
192
- 68: <span class="ruby-value str">'from'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>,
193
- 69: <span class="ruby-value str">'recipients'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>
194
- 70: ]
195
- 71: <span class="ruby-keyword kw">end</span>
196
- 72: <span class="ruby-keyword kw">end</span>
197
- </pre>
198
- </div>
199
- </div>
200
- </div>
201
-
202
- <div id="method-M000025" class="method-detail">
203
- <a name="M000025"></a>
204
-
205
- <div class="method-heading">
206
- <a href="#M000025" class="method-signature">
207
- <span class="method-name">smtp_specification_hash</span><span class="method-args">(smtp=nil)</span>
208
- </a>
209
- </div>
210
-
211
- <div class="method-description">
212
- <p><a class="source-toggle" href="#"
213
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
214
- <div class="method-source-code" id="M000025-source">
215
- <pre>
216
- <span class="ruby-comment cmt"># File app/models/mail_specification.rb, line 113</span>
217
- 113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">smtp_specification_hash</span>(<span class="ruby-identifier">smtp</span>=<span class="ruby-keyword kw">nil</span>)
218
- 114: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span> <span class="ruby-comment cmt"># create Hash from passed argument </span>
219
- 115: <span class="ruby-constant">Hash</span>[
220
- 116: <span class="ruby-value str">'address'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:address</span>],
221
- 117: <span class="ruby-value str">'port'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:port</span>],
222
- 118: <span class="ruby-value str">'domain'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:domain</span>],
223
- 119: <span class="ruby-value str">'authentication'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:authentication</span>],
224
- 120: <span class="ruby-value str">'user_name'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:user_name</span>],
225
- 121: <span class="ruby-value str">'password'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:password</span>],
226
- 122: <span class="ruby-value str">'from'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:from</span>],
227
- 123: <span class="ruby-value str">'recipients'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:recipients</span>]
228
- 124: ]
229
- 125: <span class="ruby-keyword kw">else</span>
230
- 126: <span class="ruby-constant">Hash</span>[
231
- 127: <span class="ruby-value str">'address'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&quot;</span>,
232
- 128: <span class="ruby-value str">'port'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'25'</span>,
233
- 129: <span class="ruby-value str">'domain'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&quot;</span>,
234
- 130: <span class="ruby-value str">'authentication'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;login&quot;</span>,
235
- 131: <span class="ruby-value str">'user_name'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&quot;</span>,
236
- 132: <span class="ruby-value str">'password'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&quot;</span>,
237
- 133: <span class="ruby-value str">'from'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&quot;</span>,
238
- 134: <span class="ruby-value str">'recipients'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;&quot;</span>
239
- 135: ]
240
- 136: <span class="ruby-keyword kw">end</span>
241
- 137: <span class="ruby-keyword kw">end</span>
242
- </pre>
243
- </div>
244
- </div>
245
- </div>
246
-
247
- <div id="method-M000020" class="method-detail">
248
- <a name="M000020"></a>
249
-
250
- <div class="method-heading">
251
- <a href="#M000020" class="method-signature">
252
- <span class="method-name">validate_sendmail_specification</span><span class="method-args">(sendmail)</span>
253
- </a>
254
- </div>
255
-
256
- <div class="method-description">
257
- <p><a class="source-toggle" href="#"
258
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
259
- <div class="method-source-code" id="M000020-source">
260
- <pre>
261
- <span class="ruby-comment cmt"># File app/models/mail_specification.rb, line 24</span>
262
- 24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_sendmail_specification</span>(<span class="ruby-identifier">sendmail</span>)
263
- 25: <span class="ruby-identifier">str</span> = <span class="ruby-value str">&quot;&quot;</span>
264
- 26: <span class="ruby-identifier">str</span> = <span class="ruby-constant">SENDMAIL_LOCATION_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:location</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
265
- 27: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:from</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
266
- 28: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SENDMAIL_SENDER_EMAIL_VALIDATION1</span>
267
- 29: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-regexp re">/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:from</span>].<span class="ruby-identifier">strip</span>)
268
- 30: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SENDMAIL_SENDER_EMAIL_VALIDATION</span>
269
- 31: <span class="ruby-keyword kw">end</span>
270
- 32:
271
- 33: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:recipients</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
272
- 34: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SENDMAIL_RECIPIENT_EMAIL_VALIDATION1</span>
273
- 35: <span class="ruby-keyword kw">else</span>
274
- 36: <span class="ruby-identifier">flag</span> = <span class="ruby-value">0</span>
275
- 37: <span class="ruby-identifier">str1</span> = <span class="ruby-value str">&quot;&lt;ul&gt;&quot;</span>
276
- 38: <span class="ruby-identifier">recipients</span> = <span class="ruby-identifier">sendmail</span>[<span class="ruby-identifier">:recipients</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;,&quot;</span>)
277
- 39: <span class="ruby-identifier">recipients</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">recipient</span><span class="ruby-operator">|</span>
278
- 40: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-regexp re">/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">recipient</span>.<span class="ruby-identifier">strip</span>)
279
- 41: <span class="ruby-identifier">flag</span> = <span class="ruby-value">1</span>
280
- 42: <span class="ruby-identifier">str1</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;li&gt;#{recipient.strip}&lt;/li&gt;&quot;</span>
281
- 43: <span class="ruby-keyword kw">end</span>
282
- 44: <span class="ruby-keyword kw">end</span>
283
- 45: <span class="ruby-identifier">str1</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&lt;/ul&gt;&quot;</span>
284
- 46: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;li&gt;#{SENDMAIL_RECIPIENT_EMAIL_VALIDATION}-#{str1}&lt;/li&gt;&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">flag</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
285
- 47: <span class="ruby-keyword kw">end</span>
286
- 48: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>
287
- 49: <span class="ruby-keyword kw">end</span>
288
- </pre>
289
- </div>
290
- </div>
291
- </div>
292
-
293
- <div id="method-M000023" class="method-detail">
294
- <a name="M000023"></a>
295
-
296
- <div class="method-heading">
297
- <a href="#M000023" class="method-signature">
298
- <span class="method-name">validate_smtp_specification</span><span class="method-args">(smtp)</span>
299
- </a>
300
- </div>
301
-
302
- <div class="method-description">
303
- <p><a class="source-toggle" href="#"
304
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
305
- <div class="method-source-code" id="M000023-source">
306
- <pre>
307
- <span class="ruby-comment cmt"># File app/models/mail_specification.rb, line 74</span>
308
- 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_smtp_specification</span>(<span class="ruby-identifier">smtp</span>)
309
- 75: <span class="ruby-identifier">str</span> = <span class="ruby-value str">&quot;&quot;</span>
310
- 76: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SMTP_ADDRESS_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:address</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
311
- 77: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SMTP_PORT_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:port</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
312
- 78: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SMTP_DOMAIN_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:domain</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
313
- 79: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SMTP_AUTHENTICATION_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:authentication</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
314
- 80: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SMTP_USER_NAME_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:user_name</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
315
- 81: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SMTP_PASSWORD_VALIDATION</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:password</span>].<span class="ruby-identifier">length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
316
- 82:
317
- 83: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:from</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
318
- 84: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SENDMAIL_SENDER_EMAIL_VALIDATION1</span>
319
- 85: <span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-regexp re">/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:from</span>].<span class="ruby-identifier">strip</span>)
320
- 86: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SENDMAIL_SENDER_EMAIL_VALIDATION</span>
321
- 87: <span class="ruby-keyword kw">end</span>
322
- 88:
323
- 89: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:recipients</span>].<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
324
- 90: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">SENDMAIL_RECIPIENT_EMAIL_VALIDATION1</span>
325
- 91: <span class="ruby-keyword kw">else</span>
326
- 92: <span class="ruby-identifier">flag</span> = <span class="ruby-value">0</span>
327
- 93: <span class="ruby-identifier">str1</span> = <span class="ruby-value str">&quot;&lt;ul&gt;&quot;</span>
328
- 94: <span class="ruby-identifier">recipients</span> = <span class="ruby-identifier">smtp</span>[<span class="ruby-identifier">:recipients</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;,&quot;</span>)
329
- 95: <span class="ruby-identifier">recipients</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">recipient</span><span class="ruby-operator">|</span>
330
- 96: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-regexp re">/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">recipient</span>.<span class="ruby-identifier">strip</span>)
331
- 97: <span class="ruby-identifier">flag</span> = <span class="ruby-value">1</span>
332
- 98: <span class="ruby-identifier">str1</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;li&gt;#{recipient.strip}&lt;/li&gt;&quot;</span>
333
- 99: <span class="ruby-keyword kw">end</span>
334
- 100: <span class="ruby-keyword kw">end</span>
335
- 101: <span class="ruby-identifier">str1</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;&lt;/ul&gt;&quot;</span>
336
- 102: <span class="ruby-identifier">str</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;&lt;li&gt;#{SENDMAIL_RECIPIENT_EMAIL_VALIDATION}-#{str1}&lt;/li&gt;&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">flag</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
337
- 103: <span class="ruby-keyword kw">end</span>
338
- 104: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">str</span>
339
- 105: <span class="ruby-keyword kw">end</span>
340
- </pre>
341
- </div>
342
- </div>
343
- </div>
344
-
345
-
346
- </div>
347
-
348
-
349
- </div>
350
-
351
-
352
- <div id="validator-badges">
353
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
354
- </div>
355
-
356
- </body>
357
- </html>