rails 2.2.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails might be problematic. Click here for more details.

Files changed (336) hide show
  1. data/bin/rails +8 -18
  2. metadata +118 -452
  3. data/CHANGELOG +0 -2071
  4. data/MIT-LICENSE +0 -20
  5. data/README +0 -256
  6. data/Rakefile +0 -411
  7. data/bin/about +0 -4
  8. data/bin/console +0 -3
  9. data/bin/dbconsole +0 -3
  10. data/bin/destroy +0 -3
  11. data/bin/generate +0 -3
  12. data/bin/performance/benchmarker +0 -3
  13. data/bin/performance/profiler +0 -3
  14. data/bin/performance/request +0 -3
  15. data/bin/plugin +0 -3
  16. data/bin/process/inspector +0 -3
  17. data/bin/process/reaper +0 -3
  18. data/bin/process/spawner +0 -3
  19. data/bin/runner +0 -3
  20. data/bin/server +0 -3
  21. data/builtin/rails_info/rails/info.rb +0 -125
  22. data/builtin/rails_info/rails/info_controller.rb +0 -9
  23. data/builtin/rails_info/rails/info_helper.rb +0 -2
  24. data/builtin/rails_info/rails_info_controller.rb +0 -2
  25. data/config.ru +0 -17
  26. data/configs/apache.conf +0 -40
  27. data/configs/databases/frontbase.yml +0 -28
  28. data/configs/databases/ibm_db.yml +0 -62
  29. data/configs/databases/mysql.yml +0 -57
  30. data/configs/databases/oracle.yml +0 -39
  31. data/configs/databases/postgresql.yml +0 -51
  32. data/configs/databases/sqlite2.yml +0 -19
  33. data/configs/databases/sqlite3.yml +0 -22
  34. data/configs/empty.log +0 -0
  35. data/configs/initializers/inflections.rb +0 -10
  36. data/configs/initializers/mime_types.rb +0 -5
  37. data/configs/initializers/new_rails_defaults.rb +0 -17
  38. data/configs/lighttpd.conf +0 -54
  39. data/configs/locales/en.yml +0 -5
  40. data/configs/routes.rb +0 -43
  41. data/dispatches/dispatch.fcgi +0 -24
  42. data/dispatches/dispatch.rb +0 -10
  43. data/dispatches/gateway.cgi +0 -97
  44. data/doc/README_FOR_APP +0 -5
  45. data/doc/guides/html/2_2_release_notes.html +0 -1185
  46. data/doc/guides/html/actioncontroller_basics.html +0 -1270
  47. data/doc/guides/html/activerecord_validations_callbacks.html +0 -749
  48. data/doc/guides/html/association_basics.html +0 -2585
  49. data/doc/guides/html/authors.html +0 -240
  50. data/doc/guides/html/benchmarking_and_profiling.html +0 -1018
  51. data/doc/guides/html/caching_with_rails.html +0 -583
  52. data/doc/guides/html/command_line.html +0 -434
  53. data/doc/guides/html/configuring.html +0 -438
  54. data/doc/guides/html/creating_plugins.html +0 -1594
  55. data/doc/guides/html/debugging_rails_applications.html +0 -1175
  56. data/doc/guides/html/finders.html +0 -1090
  57. data/doc/guides/html/form_helpers.html +0 -638
  58. data/doc/guides/html/getting_started_with_rails.html +0 -2066
  59. data/doc/guides/html/index.html +0 -349
  60. data/doc/guides/html/layouts_and_rendering.html +0 -1406
  61. data/doc/guides/html/migrations.html +0 -921
  62. data/doc/guides/html/routing_outside_in.html +0 -2213
  63. data/doc/guides/html/security.html +0 -1346
  64. data/doc/guides/html/testing_rails_applications.html +0 -1859
  65. data/doc/guides/source/2_2_release_notes.txt +0 -435
  66. data/doc/guides/source/actioncontroller_basics/changelog.txt +0 -5
  67. data/doc/guides/source/actioncontroller_basics/cookies.txt +0 -34
  68. data/doc/guides/source/actioncontroller_basics/csrf.txt +0 -32
  69. data/doc/guides/source/actioncontroller_basics/filters.txt +0 -119
  70. data/doc/guides/source/actioncontroller_basics/http_auth.txt +0 -24
  71. data/doc/guides/source/actioncontroller_basics/index.txt +0 -40
  72. data/doc/guides/source/actioncontroller_basics/introduction.txt +0 -9
  73. data/doc/guides/source/actioncontroller_basics/methods.txt +0 -39
  74. data/doc/guides/source/actioncontroller_basics/parameter_filtering.txt +0 -14
  75. data/doc/guides/source/actioncontroller_basics/params.txt +0 -93
  76. data/doc/guides/source/actioncontroller_basics/request_response_objects.txt +0 -43
  77. data/doc/guides/source/actioncontroller_basics/rescue.txt +0 -67
  78. data/doc/guides/source/actioncontroller_basics/session.txt +0 -187
  79. data/doc/guides/source/actioncontroller_basics/streaming.txt +0 -91
  80. data/doc/guides/source/actioncontroller_basics/verification.txt +0 -40
  81. data/doc/guides/source/active_record_basics.txt +0 -181
  82. data/doc/guides/source/activerecord_validations_callbacks.txt +0 -404
  83. data/doc/guides/source/association_basics.txt +0 -1840
  84. data/doc/guides/source/authors.txt +0 -39
  85. data/doc/guides/source/benchmarking_and_profiling/appendix.txt +0 -95
  86. data/doc/guides/source/benchmarking_and_profiling/digging_deeper.txt +0 -105
  87. data/doc/guides/source/benchmarking_and_profiling/edge_rails_features.txt +0 -185
  88. data/doc/guides/source/benchmarking_and_profiling/gameplan.txt +0 -27
  89. data/doc/guides/source/benchmarking_and_profiling/index.txt +0 -242
  90. data/doc/guides/source/benchmarking_and_profiling/rubyprof.txt +0 -179
  91. data/doc/guides/source/benchmarking_and_profiling/statistics.txt +0 -57
  92. data/doc/guides/source/caching_with_rails.txt +0 -367
  93. data/doc/guides/source/command_line.txt +0 -147
  94. data/doc/guides/source/configuring.txt +0 -225
  95. data/doc/guides/source/creating_plugins/acts_as_yaffle.txt +0 -191
  96. data/doc/guides/source/creating_plugins/appendix.txt +0 -46
  97. data/doc/guides/source/creating_plugins/controllers.txt +0 -59
  98. data/doc/guides/source/creating_plugins/core_ext.txt +0 -123
  99. data/doc/guides/source/creating_plugins/custom_route.txt +0 -69
  100. data/doc/guides/source/creating_plugins/gem.txt +0 -1
  101. data/doc/guides/source/creating_plugins/generator_method.txt +0 -89
  102. data/doc/guides/source/creating_plugins/helpers.txt +0 -51
  103. data/doc/guides/source/creating_plugins/index.txt +0 -52
  104. data/doc/guides/source/creating_plugins/migration_generator.txt +0 -156
  105. data/doc/guides/source/creating_plugins/models.txt +0 -76
  106. data/doc/guides/source/creating_plugins/odds_and_ends.txt +0 -69
  107. data/doc/guides/source/creating_plugins/test_setup.txt +0 -230
  108. data/doc/guides/source/debugging_rails_applications.txt +0 -733
  109. data/doc/guides/source/finders.txt +0 -668
  110. data/doc/guides/source/form_helpers.txt +0 -345
  111. data/doc/guides/source/getting_started_with_rails.txt +0 -1256
  112. data/doc/guides/source/images/belongs_to.png +0 -0
  113. data/doc/guides/source/images/bullet.gif +0 -0
  114. data/doc/guides/source/images/csrf.png +0 -0
  115. data/doc/guides/source/images/habtm.png +0 -0
  116. data/doc/guides/source/images/has_many.png +0 -0
  117. data/doc/guides/source/images/has_many_through.png +0 -0
  118. data/doc/guides/source/images/has_one.png +0 -0
  119. data/doc/guides/source/images/has_one_through.png +0 -0
  120. data/doc/guides/source/images/header_backdrop.png +0 -0
  121. data/doc/guides/source/images/icons/README +0 -5
  122. data/doc/guides/source/images/icons/callouts/1.png +0 -0
  123. data/doc/guides/source/images/icons/callouts/10.png +0 -0
  124. data/doc/guides/source/images/icons/callouts/11.png +0 -0
  125. data/doc/guides/source/images/icons/callouts/12.png +0 -0
  126. data/doc/guides/source/images/icons/callouts/13.png +0 -0
  127. data/doc/guides/source/images/icons/callouts/14.png +0 -0
  128. data/doc/guides/source/images/icons/callouts/15.png +0 -0
  129. data/doc/guides/source/images/icons/callouts/2.png +0 -0
  130. data/doc/guides/source/images/icons/callouts/3.png +0 -0
  131. data/doc/guides/source/images/icons/callouts/4.png +0 -0
  132. data/doc/guides/source/images/icons/callouts/5.png +0 -0
  133. data/doc/guides/source/images/icons/callouts/6.png +0 -0
  134. data/doc/guides/source/images/icons/callouts/7.png +0 -0
  135. data/doc/guides/source/images/icons/callouts/8.png +0 -0
  136. data/doc/guides/source/images/icons/callouts/9.png +0 -0
  137. data/doc/guides/source/images/icons/caution.png +0 -0
  138. data/doc/guides/source/images/icons/example.png +0 -0
  139. data/doc/guides/source/images/icons/home.png +0 -0
  140. data/doc/guides/source/images/icons/important.png +0 -0
  141. data/doc/guides/source/images/icons/next.png +0 -0
  142. data/doc/guides/source/images/icons/note.png +0 -0
  143. data/doc/guides/source/images/icons/prev.png +0 -0
  144. data/doc/guides/source/images/icons/tip.png +0 -0
  145. data/doc/guides/source/images/icons/up.png +0 -0
  146. data/doc/guides/source/images/icons/warning.png +0 -0
  147. data/doc/guides/source/images/polymorphic.png +0 -0
  148. data/doc/guides/source/images/rails_logo_remix.gif +0 -0
  149. data/doc/guides/source/images/ruby_on_rails_by_mike_rundle2.gif +0 -0
  150. data/doc/guides/source/images/session_fixation.png +0 -0
  151. data/doc/guides/source/index.txt +0 -118
  152. data/doc/guides/source/layouts_and_rendering.txt +0 -982
  153. data/doc/guides/source/migrations/anatomy_of_a_migration.txt +0 -85
  154. data/doc/guides/source/migrations/changelog.txt +0 -5
  155. data/doc/guides/source/migrations/creating_a_migration.txt +0 -109
  156. data/doc/guides/source/migrations/foreign_keys.txt +0 -8
  157. data/doc/guides/source/migrations/index.txt +0 -22
  158. data/doc/guides/source/migrations/rakeing_around.txt +0 -111
  159. data/doc/guides/source/migrations/scheming.txt +0 -47
  160. data/doc/guides/source/migrations/using_models_in_migrations.txt +0 -46
  161. data/doc/guides/source/migrations/writing_a_migration.txt +0 -159
  162. data/doc/guides/source/routing_outside_in.txt +0 -986
  163. data/doc/guides/source/security.txt +0 -984
  164. data/doc/guides/source/stylesheets/base.css +0 -358
  165. data/doc/guides/source/stylesheets/forms.css +0 -35
  166. data/doc/guides/source/stylesheets/more.css +0 -82
  167. data/doc/guides/source/templates/guides.html.erb +0 -97
  168. data/doc/guides/source/templates/inline.css +0 -165
  169. data/doc/guides/source/testing_rails_applications.txt +0 -995
  170. data/environments/boot.rb +0 -109
  171. data/environments/development.rb +0 -17
  172. data/environments/environment.rb +0 -75
  173. data/environments/production.rb +0 -24
  174. data/environments/test.rb +0 -22
  175. data/fresh_rakefile +0 -10
  176. data/helpers/application.rb +0 -15
  177. data/helpers/application_helper.rb +0 -3
  178. data/helpers/performance_test.rb +0 -9
  179. data/helpers/test_helper.rb +0 -38
  180. data/html/404.html +0 -30
  181. data/html/422.html +0 -30
  182. data/html/500.html +0 -33
  183. data/html/favicon.ico +0 -0
  184. data/html/images/rails.png +0 -0
  185. data/html/index.html +0 -274
  186. data/html/javascripts/application.js +0 -2
  187. data/html/javascripts/controls.js +0 -963
  188. data/html/javascripts/dragdrop.js +0 -973
  189. data/html/javascripts/effects.js +0 -1128
  190. data/html/javascripts/prototype.js +0 -4320
  191. data/html/robots.txt +0 -5
  192. data/lib/code_statistics.rb +0 -107
  193. data/lib/commands.rb +0 -17
  194. data/lib/commands/about.rb +0 -3
  195. data/lib/commands/console.rb +0 -45
  196. data/lib/commands/dbconsole.rb +0 -67
  197. data/lib/commands/destroy.rb +0 -6
  198. data/lib/commands/generate.rb +0 -6
  199. data/lib/commands/ncgi/listener +0 -86
  200. data/lib/commands/ncgi/tracker +0 -69
  201. data/lib/commands/performance/benchmarker.rb +0 -24
  202. data/lib/commands/performance/profiler.rb +0 -50
  203. data/lib/commands/performance/request.rb +0 -6
  204. data/lib/commands/plugin.rb +0 -967
  205. data/lib/commands/process/inspector.rb +0 -68
  206. data/lib/commands/process/reaper.rb +0 -149
  207. data/lib/commands/process/spawner.rb +0 -219
  208. data/lib/commands/process/spinner.rb +0 -57
  209. data/lib/commands/runner.rb +0 -48
  210. data/lib/commands/server.rb +0 -49
  211. data/lib/commands/servers/base.rb +0 -31
  212. data/lib/commands/servers/lighttpd.rb +0 -94
  213. data/lib/commands/servers/mongrel.rb +0 -69
  214. data/lib/commands/servers/new_mongrel.rb +0 -16
  215. data/lib/commands/servers/thin.rb +0 -25
  216. data/lib/commands/servers/webrick.rb +0 -66
  217. data/lib/commands/update.rb +0 -4
  218. data/lib/console_app.rb +0 -30
  219. data/lib/console_sandbox.rb +0 -6
  220. data/lib/console_with_helpers.rb +0 -26
  221. data/lib/dispatcher.rb +0 -24
  222. data/lib/fcgi_handler.rb +0 -237
  223. data/lib/initializer.rb +0 -1038
  224. data/lib/performance_test_help.rb +0 -5
  225. data/lib/rails/gem_builder.rb +0 -21
  226. data/lib/rails/gem_dependency.rb +0 -251
  227. data/lib/rails/mongrel_server/commands.rb +0 -342
  228. data/lib/rails/mongrel_server/handler.rb +0 -55
  229. data/lib/rails/plugin.rb +0 -124
  230. data/lib/rails/plugin/loader.rb +0 -152
  231. data/lib/rails/plugin/locator.rb +0 -100
  232. data/lib/rails/rack.rb +0 -6
  233. data/lib/rails/rack/logger.rb +0 -28
  234. data/lib/rails/rack/static.rb +0 -35
  235. data/lib/rails/vendor_gem_source_index.rb +0 -140
  236. data/lib/rails/version.rb +0 -9
  237. data/lib/rails_generator.rb +0 -43
  238. data/lib/rails_generator/base.rb +0 -263
  239. data/lib/rails_generator/commands.rb +0 -616
  240. data/lib/rails_generator/generated_attribute.rb +0 -46
  241. data/lib/rails_generator/generators/applications/app/USAGE +0 -9
  242. data/lib/rails_generator/generators/applications/app/app_generator.rb +0 -184
  243. data/lib/rails_generator/generators/components/controller/USAGE +0 -29
  244. data/lib/rails_generator/generators/components/controller/controller_generator.rb +0 -37
  245. data/lib/rails_generator/generators/components/controller/templates/controller.rb +0 -7
  246. data/lib/rails_generator/generators/components/controller/templates/functional_test.rb +0 -8
  247. data/lib/rails_generator/generators/components/controller/templates/helper.rb +0 -2
  248. data/lib/rails_generator/generators/components/controller/templates/view.html.erb +0 -2
  249. data/lib/rails_generator/generators/components/integration_test/USAGE +0 -8
  250. data/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb +0 -16
  251. data/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb +0 -10
  252. data/lib/rails_generator/generators/components/mailer/USAGE +0 -16
  253. data/lib/rails_generator/generators/components/mailer/mailer_generator.rb +0 -30
  254. data/lib/rails_generator/generators/components/mailer/templates/fixture.erb +0 -3
  255. data/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +0 -0
  256. data/lib/rails_generator/generators/components/mailer/templates/mailer.rb +0 -15
  257. data/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +0 -20
  258. data/lib/rails_generator/generators/components/mailer/templates/view.erb +0 -3
  259. data/lib/rails_generator/generators/components/mailer/templates/view.rhtml +0 -0
  260. data/lib/rails_generator/generators/components/migration/USAGE +0 -29
  261. data/lib/rails_generator/generators/components/migration/migration_generator.rb +0 -20
  262. data/lib/rails_generator/generators/components/migration/templates/migration.rb +0 -11
  263. data/lib/rails_generator/generators/components/model/USAGE +0 -27
  264. data/lib/rails_generator/generators/components/model/model_generator.rb +0 -45
  265. data/lib/rails_generator/generators/components/model/templates/fixtures.yml +0 -19
  266. data/lib/rails_generator/generators/components/model/templates/migration.rb +0 -16
  267. data/lib/rails_generator/generators/components/model/templates/model.rb +0 -5
  268. data/lib/rails_generator/generators/components/model/templates/unit_test.rb +0 -8
  269. data/lib/rails_generator/generators/components/observer/USAGE +0 -13
  270. data/lib/rails_generator/generators/components/observer/observer_generator.rb +0 -16
  271. data/lib/rails_generator/generators/components/observer/templates/observer.rb +0 -2
  272. data/lib/rails_generator/generators/components/observer/templates/unit_test.rb +0 -8
  273. data/lib/rails_generator/generators/components/performance_test/USAGE +0 -8
  274. data/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb +0 -16
  275. data/lib/rails_generator/generators/components/performance_test/templates/performance_test.rb +0 -9
  276. data/lib/rails_generator/generators/components/plugin/USAGE +0 -25
  277. data/lib/rails_generator/generators/components/plugin/plugin_generator.rb +0 -39
  278. data/lib/rails_generator/generators/components/plugin/templates/MIT-LICENSE +0 -20
  279. data/lib/rails_generator/generators/components/plugin/templates/README +0 -13
  280. data/lib/rails_generator/generators/components/plugin/templates/Rakefile +0 -23
  281. data/lib/rails_generator/generators/components/plugin/templates/USAGE +0 -8
  282. data/lib/rails_generator/generators/components/plugin/templates/generator.rb +0 -8
  283. data/lib/rails_generator/generators/components/plugin/templates/init.rb +0 -1
  284. data/lib/rails_generator/generators/components/plugin/templates/install.rb +0 -1
  285. data/lib/rails_generator/generators/components/plugin/templates/plugin.rb +0 -1
  286. data/lib/rails_generator/generators/components/plugin/templates/tasks.rake +0 -4
  287. data/lib/rails_generator/generators/components/plugin/templates/test_helper.rb +0 -3
  288. data/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +0 -1
  289. data/lib/rails_generator/generators/components/plugin/templates/unit_test.rb +0 -8
  290. data/lib/rails_generator/generators/components/resource/USAGE +0 -23
  291. data/lib/rails_generator/generators/components/resource/resource_generator.rb +0 -74
  292. data/lib/rails_generator/generators/components/resource/templates/controller.rb +0 -2
  293. data/lib/rails_generator/generators/components/resource/templates/functional_test.rb +0 -8
  294. data/lib/rails_generator/generators/components/resource/templates/helper.rb +0 -2
  295. data/lib/rails_generator/generators/components/scaffold/USAGE +0 -29
  296. data/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +0 -100
  297. data/lib/rails_generator/generators/components/scaffold/templates/controller.rb +0 -85
  298. data/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +0 -45
  299. data/lib/rails_generator/generators/components/scaffold/templates/helper.rb +0 -2
  300. data/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +0 -17
  301. data/lib/rails_generator/generators/components/scaffold/templates/style.css +0 -54
  302. data/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +0 -18
  303. data/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +0 -24
  304. data/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +0 -17
  305. data/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +0 -10
  306. data/lib/rails_generator/generators/components/session_migration/USAGE +0 -10
  307. data/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +0 -18
  308. data/lib/rails_generator/generators/components/session_migration/templates/migration.rb +0 -16
  309. data/lib/rails_generator/lookup.rb +0 -249
  310. data/lib/rails_generator/manifest.rb +0 -53
  311. data/lib/rails_generator/options.rb +0 -150
  312. data/lib/rails_generator/scripts.rb +0 -89
  313. data/lib/rails_generator/scripts/destroy.rb +0 -29
  314. data/lib/rails_generator/scripts/generate.rb +0 -7
  315. data/lib/rails_generator/scripts/update.rb +0 -12
  316. data/lib/rails_generator/secret_key_generator.rb +0 -22
  317. data/lib/rails_generator/simple_logger.rb +0 -46
  318. data/lib/rails_generator/spec.rb +0 -44
  319. data/lib/railties_path.rb +0 -1
  320. data/lib/ruby_version_check.rb +0 -17
  321. data/lib/rubyprof_ext.rb +0 -35
  322. data/lib/source_annotation_extractor.rb +0 -102
  323. data/lib/tasks/annotations.rake +0 -20
  324. data/lib/tasks/databases.rake +0 -416
  325. data/lib/tasks/documentation.rake +0 -95
  326. data/lib/tasks/framework.rake +0 -118
  327. data/lib/tasks/gems.rake +0 -80
  328. data/lib/tasks/log.rake +0 -9
  329. data/lib/tasks/misc.rake +0 -56
  330. data/lib/tasks/rails.rb +0 -8
  331. data/lib/tasks/routes.rake +0 -17
  332. data/lib/tasks/statistics.rake +0 -18
  333. data/lib/tasks/testing.rake +0 -139
  334. data/lib/tasks/tmp.rake +0 -37
  335. data/lib/test_help.rb +0 -27
  336. data/lib/webrick_server.rb +0 -156
@@ -1,39 +0,0 @@
1
- About the Authors
2
- =================
3
-
4
- .Frederick Cheung
5
- [[fcheung]]
6
- ***********************************************************
7
- Frederick Cheung is Chief Wizard at Texperts where he has been using Rails since 2006.
8
- He is based in Cambridge (UK) and when not consuming fine ales he blogs at http://www.spacevatican.org[spacevatican.org].
9
- ***********************************************************
10
-
11
- .Mike Gunderloy
12
- [[mgunderloy]]
13
- ***********************************************************
14
- Mike Gunderloy is an independent consultant who brings 25 years of experience in a variety of languages to bear on his current
15
- work with Rails. His near-daily links and other blogging can be found at http://afreshcup.com[A Fresh Cup].
16
- ***********************************************************
17
-
18
- .Emilio Tagua
19
- [[miloops]]
20
- ***********************************************************
21
- Emilio Tagua -- a.k.a. miloops -- is an Argentinian entrepreneur, developer, open source contributor and Rails evangelist.
22
- Cofounder of http://www.eventioz.com[Eventioz]. He has been using Rails since 2006 and contributing since early 2008.
23
- Can be found at gmail, twitter, freenode, everywhere as miloops.
24
- ***********************************************************
25
-
26
- .Heiko Webers
27
- [[hawe]]
28
- ***********************************************************
29
- Heiko Webers is the founder of http://www.bauland42.de[bauland42], a German web application security consulting and development
30
- company focused on Ruby on Rails. He blogs at http://www.rorsecurity.info. After 10 years of desktop application development,
31
- Heiko has rarely looked back.
32
- ***********************************************************
33
-
34
- .Tore Darell
35
- [[toretore]]
36
- ***********************************************************
37
- Tore Darell is an independent developer based in Menton, France who specialises in cruft-free web applications using Ruby, Rails
38
- and unobtrusive JavaScript. His home on the internet is his blog http://tore.darell.no/[Sneaky Abstractions].
39
- ***********************************************************
@@ -1,95 +0,0 @@
1
- == Other Profiling Tools ==
2
-
3
- There are a lot of great profiling tools out there. Some free, some not so free. This is a sort list detailing some of them.
4
-
5
- === httperf ===
6
- http://www.hpl.hp.com/research/linux/httperf/[http://www.hpl.hp.com/research/linux/httperf/]
7
-
8
- A necessary tool in your arsenal. Very useful for load testing your website.
9
-
10
- #TODO write and link to a short article on how to use httperf. Anybody have a good tutorial availble.
11
-
12
-
13
- === Rails Analyzer ===
14
-
15
- The Rails Analyzer project contains a collection of tools for Rails. It's open source and pretty speedy. It's not being actively worked on but is still contains some very useful tools.
16
-
17
- * The Production Log Analyzer examines Rails log files and gives back a report. It also includes action_grep which will give you all log results for a particular action.
18
-
19
- * The Action Profiler similar to Ruby-Prof profiler.
20
-
21
- * rails_stat which gives a live counter of requests per second of a running Rails app.
22
-
23
- * The SQL Dependency Grapher allows you to visualize the frequency of table dependencies in a Rails application.
24
-
25
- Their project homepage can be found at http://rails-analyzer.rubyforge.org/[http://rails-analyzer.rubyforge.org/]
26
-
27
- The one major caveat is that it needs your log to be in a different format from how rails sets it up specifically SyslogLogger.
28
-
29
-
30
- ==== SyslogLogger ====
31
-
32
- SyslogLogger is a Logger work-alike that logs via syslog instead of to a file. You can add SyslogLogger to your Rails production environment to aggregate logs between multiple machines.
33
-
34
- More information can be found out at http://rails-analyzer.rubyforge.org/hacks/classes/SyslogLogger.html[http://rails-analyzer.rubyforge.org/hacks/classes/SyslogLogger.html]
35
-
36
- If you don't have access to your machines root system or just want something a bit easier to implement there is also a module developed by Geoffrey Grosenbach
37
-
38
- ==== A Hodel 3000 Compliant Logger for the Rest of Us ====
39
-
40
- Directions taken from
41
- http://topfunky.net/svn/plugins/hodel_3000_compliant_logger/lib/hodel_3000_compliant_logger.rb[link to module file]
42
-
43
- Just put the module in your lib directory and add this to your environment.rb in it's config portion.
44
-
45
- ------------------------------------------------------------
46
- require 'hodel_3000_compliant_logger'
47
- config.logger = Hodel3000CompliantLogger.new(config.log_path)
48
- -------------------------------------------------------------
49
-
50
- It's that simple. Your log output on restart should look like this.
51
-
52
- .Hodel 3000 Example
53
- ----------------------------------------------------------------------------
54
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]:
55
- Parameters: {"action"=>"shipping", "controller"=>"checkout"}
56
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]: 
57
- [4;36;1mBook Columns (0.003155) SHOW FIELDS FROM `books`
58
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]: 
59
- [4;35;1mBook Load (0.000881) SELECT * FROM `books` WHERE (`books`.`id` = 1 AND (`books`.`sold` = 1)) 
60
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]: 
61
- [4;36;1mShippingAddress Columns (0.002683) SHOW FIELDS FROM `shipping_addresses`
62
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]: 
63
- [4;35;1mBook Load (0.000362) SELECT ounces FROM `books` WHERE (`books`.`id` = 1) 
64
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]:
65
- Rendering template within layouts/application
66
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]:
67
- Rendering checkout/shipping
68
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]: 
69
- [4;36;1mBook Load (0.000548) SELECT * FROM `books`
70
- WHERE (sold = 0) LIMIT 3
71
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]: 
72
- [4;35;1mAuthor Columns (0.002571) SHOW FIELDS FROM `authors`
73
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]:
74
- Author Load (0.000811) SELECT * FROM `authors` WHERE (`authors`.`id` = 1) 
75
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]:
76
- Rendered store/_new_books (0.01358)
77
- Jul 15 11:45:43 matthew-bergmans-macbook-pro-15 rails[16207]:
78
- Completed in 0.37297 (2 reqs/sec) | Rendering: 0.02971 (7%) | DB: 0.01697 (4%) | 200 OK [https://secure.jeffbooks/checkout/shipping]
79
- ----------------------------------------------------------------------------
80
-
81
- === Palmist ===
82
- An open source mysql query analyzer. Full featured and easy to work with. Also requires Hodel 3000
83
- http://www.flyingmachinestudios.com/projects/[http://www.flyingmachinestudios.com/projects/]
84
-
85
- === New Relic ===
86
- http://www.newrelic.com/[http://www.newrelic.com/]
87
-
88
- Pretty nifty performance tools, pricey though. They do have a basic free
89
- service both for when in development and when you put your application into production. Very simple installation and signup.
90
-
91
- #TODO more in-depth without being like an advertisement.
92
-
93
- ==== Manage ====
94
-
95
- Like new relic a production monitoring tool.
@@ -1,105 +0,0 @@
1
- == Real Life Example ==
2
- === The setup ===
3
-
4
- So I have been building this application for the last month and feel pretty good about the ruby code. I'm readying it for beta testers when I discover to my shock that with less then twenty people it starts to crash. It's a pretty simple Ecommerce site so I'm very confused by what I'm seeing. On running looking through my log files I find to my shock that the lowest time for a page run is running around 240 ms. My database finds aren't the problems so I'm lost as to what is happening to cause all this. Lets run a benchmark.
5
-
6
-
7
- [source, ruby]
8
- ----------------------------------------------------------------------------
9
- class HomepageTest < ActionController::PerformanceTest
10
- # Replace this with your real tests.
11
- def test_homepage
12
- get '/'
13
- end
14
- end
15
- ----------------------------------------------------------------------------
16
-
17
- .Output
18
- ----------------------------------------------------------------------------
19
- HomepageTest#test_homepage (115 ms warmup)
20
- process_time: 591 ms
21
- memory: 3052.90 KB
22
- objects: 59471
23
- ----------------------------------------------------------------------------
24
-
25
-
26
-
27
- Obviously something is very very wrong here. 3052.90 Kb to load my minimal homepage. For Comparison for another site running well I get this for my homepage test.
28
-
29
- .Default
30
- ----------------------------------------------------------------------------
31
- HomepageTest#test_homepage (19 ms warmup)
32
- process_time: 26 ms
33
- memory: 298.79 KB
34
- objects: 1917
35
- ----------------------------------------------------------------------------
36
-
37
- that over a factor of ten difference. Lets look at our flat process time file to see if anything pops out at us.
38
-
39
- .Process time
40
- ----------------------------------------------------------------------------
41
- 20.73 0.39 0.12 0.00 0.27 420 Pathname#cleanpath_aggressive
42
- 17.07 0.14 0.10 0.00 0.04 3186 Pathname#chop_basename
43
- 6.47 0.06 0.04 0.00 0.02 6571 Kernel#===
44
- 5.04 0.06 0.03 0.00 0.03 840 Pathname#initialize
45
- 5.03 0.05 0.03 0.00 0.02 4 ERB::Compiler::ExplicitScanner#scan
46
- 4.51 0.03 0.03 0.00 0.00 9504 String#==
47
- 2.94 0.46 0.02 0.00 0.44 1393 String#gsub
48
- 2.66 0.09 0.02 0.00 0.07 480 Array#each
49
- 2.46 0.01 0.01 0.00 0.00 3606 Regexp#to_s
50
- ----------------------------------------------------------------------------
51
-
52
- Yes indeed we seem to have found the problem. Pathname#cleanpath_aggressive is taking nearly a quarter our process time and Pathname#chop_basename another 17%. From here I do a few more benchmarks to make sure that these processes are slowing down the other pages. They are so now I know what I must do. *If we can get rid of or shorten these processes we can make our pages run much quicker*.
53
-
54
- Now both of these are main ruby processes so are goal right now is to find out what other process is calling them. Glancing at our Graph file I see that #cleanpath is calling #cleanpath_aggressive. #cleanpath is being called by String#gsub and from there some html template errors. But my page seems to be rendering fine. why would it be calling template errors. I'm decide to check my object flat file to see if I can find any more information.
55
-
56
- .Objects Created
57
- ----------------------------------------------------------------------------
58
- 20.74 34800.00 12324.00 0.00 22476.00 420 Pathname#cleanpath_aggressive
59
- 16.79 18696.00 9978.00 0.00 8718.00 3186 Pathname#chop_basename
60
- 11.47 13197.00 6813.00 0.00 6384.00 480 Array#each
61
- 8.51 41964.00 5059.00 0.00 36905.00 1386 String#gsub
62
- 6.07 3606.00 3606.00 0.00 0.00 3606 Regexp#to_s
63
- ----------------------------------------------------------------------------
64
-
65
- nope nothing new here. Lets look at memory usage
66
-
67
- .Memory Consuption
68
- ----------------------------------------------------------------------------
69
- 40.17 1706.80 1223.70 0.00 483.10 3186 Pathname#chop_basename
70
- 14.92 454.47 454.47 0.00 0.00 3606 Regexp#to_s
71
- 7.09 2381.36 215.99 0.00 2165.37 1386 String#gsub
72
- 5.08 231.19 154.73 0.00 76.46 420 Pathname#prepend_prefix
73
- 2.34 71.35 71.35 0.00 0.00 1265 String#initialize_copy
74
- ----------------------------------------------------------------------------
75
-
76
- Ok so it seems Regexp#to_s is the second costliest process. At this point I try to figure out what could be calling a regular expression cause I very rarely use them. Going over my standard layout I discover at the top.
77
-
78
-
79
- [source, html]
80
- ----------------------------------------------------------------------------
81
- <%if request.env["HTTP_USER_AGENT"].match(/Opera/)%>
82
- <%= stylesheet_link_tag "opera" %>
83
- <% end %>
84
- ----------------------------------------------------------------------------
85
-
86
- That's wrong. I mistakenly am using a search function for a simple compare function. Lets fix that.
87
-
88
-
89
- [source, html]
90
- ----------------------------------------------------------------------------
91
- <%if request.env["HTTP_USER_AGENT"] =~ /Opera/%>
92
- <%= stylesheet_link_tag "opera" %>
93
- <% end %>
94
- ----------------------------------------------------------------------------
95
-
96
- I'll now try my test again.
97
-
98
- ----------------------------------------------------------------------------
99
- process_time: 75 ms
100
- memory: 519.95 KB
101
- objects: 6537
102
- ----------------------------------------------------------------------------
103
-
104
- Much better. The problem has been solved. Now I should have realized earlier due to the String#gsub that my problem had to be with reqexp serch function but such knowledge comes with time. Looking through the mass output data is a skill.
105
-
@@ -1,185 +0,0 @@
1
- == Performance Testing Built into Rails ==
2
-
3
- As of June 20, 2008 edge rails has had a new type of Unit test geared towards profiling. Of course like most great things, getting it working takes bit of work. The test relies on statistics gathered from the Garbage Collection that isn't readily available from standard compiled ruby. There is a patch located at http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch[http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch]
4
-
5
- Also the test requires a new version of Ruby-Prof version of 0.6.1. It is not readily available at the moment and can most easily be found as a tarball on github. It's repository is located at git://github.com/jeremy/ruby-prof.git.
6
-
7
- What follows is a description of how to set up an alternative ruby install to use these features
8
-
9
- === Compiling the Interpreter ===
10
-
11
-
12
- [source, shell]
13
- ----------------------------------------------------------------------------
14
- [User ~]$ mkdir rubygc
15
- [User ~]$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
16
- [User ~]$ tar -xzvf ruby-1.8.6-p111.tar.gz
17
- [User ~]$ cd ruby-1.8.6-p111
18
- [User ruby-1.8.6-p111]$ curl http://rubyforge.org/tracker/download.php/1814/7062/17676/3291/ruby186gc.patch | patch -p0
19
-
20
- #I like putting my alternative ruby builds in an opt directory, set the prefix to where ever you feel is most comfortable.
21
-
22
- [User ruby-1.8.6-p111]$ ./configure --prefix=/opt/rubygc
23
- [User ruby-1.8.6-p111]$ sudo make && make install
24
- ----------------------------------------------------------------------------
25
-
26
- Add the following lines in your \~/.profile or \~/.bash\_login for convenience.
27
-
28
- ----------------------------------------------------------------------------
29
- alias gcruby='/opt/rubygc/rubygc/bin/ruby'
30
- alias gcrake='/opt/rubygc/rubygc/bin/rake'
31
- alias gcgem='/opt/rubygc/rubygc/bin/gem'
32
- alias gcirb=/opt/rubygc/rubygc/bin/irb'
33
- alias gcrails='/opt/rubygc/rubygc/bin/rails'
34
- ----------------------------------------------------------------------------
35
-
36
- === Installing RubyGems ===
37
-
38
- Next we need to install rubygems and rails so that we can use the interpreter properly.
39
-
40
-
41
- [source, shell]
42
- ----------------------------------------------------------------------------
43
- [User ~]$ wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
44
- [User ~]$ tar -xzvf rubygems-1.2.0.tgz
45
- [User ~]$ cd rubygems-1.2.0
46
- [User rubygems-1.2.0]$ gcruby setup.rb
47
- [User rubygems-1.2.0]$ cd ~
48
- [User ~]$ gcgem install rake
49
- [User ~]$ gcgem install mysql
50
- [User ~]$ gcgem install rails
51
- ----------------------------------------------------------------------------
52
-
53
- If installing mysql gem fails ( like it did for me ), you will have to manually install it :
54
-
55
- [source, shell]
56
- ----------------------------------------------------------------------------
57
- [User ~]$ cd /Users/lifo/rubygc/lib/ruby/gems/1.8/gems/mysql-2.7/
58
- [User mysql-2.7]$ gcruby extconf.rb --with-mysql-config
59
- [User mysql-2.7]$ make && make install
60
- ----------------------------------------------------------------------------
61
-
62
- === Installing Jeremy Kemper's ruby-prof ===
63
-
64
- We are in the home stretch. All we need now is ruby-proff 0.6.1
65
-
66
-
67
- [source, shell]
68
- ----------------------------------------------------------------------------
69
- [User ~]$ git clone git://github.com/jeremy/ruby-prof.git
70
- [User ~]$ cd ruby-prof/
71
- [User ruby-prof (master)]$ gcrake gem
72
- [User ruby-prof (master)]$ gcgem install pkg/ruby-prof-0.6.1.gem
73
- ----------------------------------------------------------------------------
74
-
75
- Finished, go get yourself a power drink!
76
-
77
- === Ok so I lied, a few more things we need to do ===
78
-
79
- You have everything we need to start profiling through rails Unit Testing. Unfortunately we are still missing a few files. I'm going to do the next step on a fresh Rails app, but it will work just as well on developmental 2.1 rails application.
80
-
81
- ==== The Rails App ====
82
-
83
- First I need to generate a rail app
84
-
85
- [source, shell]
86
- ----------------------------------------------------------------------------
87
- [User ~]$ gcrails profiling_tester -d mysql
88
- [User ~]$ cd profiling_tester
89
- [User profiling_tester]$ script/generate scaffold item name:string
90
- [User profiling_tester]$ gcrake db:create:all
91
- [User profiling_tester]$ gcrake db:migrate
92
- [User profiling_tester (master)]$ rm public/index.html
93
- ----------------------------------------------------------------------------
94
-
95
- Now I'm going to init it as a git repository and add edge rails as a submodule to it.
96
-
97
- [source, shell]
98
- ----------------------------------------------------------------------------
99
- [User profiling_tester]$ git init
100
- [User profiling_tester (master)]$ git submodule add git://github.com/rails/rails.git vendor/rails
101
- ----------------------------------------------------------------------------
102
-
103
- Finally we want to change config.cache_classes to true in our environment.rb
104
-
105
- ----------------------------------------------------------------------------
106
- config.cache_classes = true
107
- ----------------------------------------------------------------------------
108
-
109
- If we don't cache classes, then the time Rails spends reloading and compiling our models and controllers will confound our results. Obviously we will try to make our test setup as similar as possible to our production environment.
110
-
111
- === Generating and Fixing the tests ===
112
-
113
- Ok next we need to generate the test script.
114
-
115
- [source, shell]
116
- ----------------------------------------------------------------------------
117
- [User profiling_tester (master)]$ script/generate performance_test homepage
118
- ----------------------------------------------------------------------------
119
-
120
- This will generate _test/performance/homepage_test.rb_ for you. However, as I have generated the project using Rails 2.1 gem, we'll need to manually generate one more file before we can go ahead.
121
-
122
- We need to put the following inside _test/performance/test_helper.rb
123
-
124
-
125
- [source, ruby]
126
- ----------------------------------------------------------------------------
127
- require 'test_helper'
128
- require 'performance_test_help'
129
- ----------------------------------------------------------------------------
130
-
131
- Though this depends where you run your tests from and your system config. I myself run my tests from the Application root directory
132
-
133
- so instead of
134
-
135
- [source, ruby]
136
- ----------------------------------------------------------------------------
137
- require 'test_helper'
138
-
139
- #I have
140
-
141
- require 'test/test_helper'
142
- ----------------------------------------------------------------------------
143
-
144
- Also I needed to change homepage_test.rb to reflect this also
145
-
146
- [source, ruby]
147
- ----------------------------------------------------------------------------
148
- require 'test/performance/test_helper.rb'
149
- ----------------------------------------------------------------------------
150
-
151
- === Testing ===
152
-
153
- #TODO is there some way to compare multiple request at once like ruby_analyze
154
-
155
- Now, if we look at the generated performance test ( one we generated using _script/generate performance_test_ ), it'll look something like :
156
-
157
- [source, ruby]
158
- ----------------------------------------------------------------------------
159
- .require 'performance/test_helper'
160
-
161
- class HomepageTest < ActionController::PerformanceTest
162
- # Replace this with your real tests.
163
- def test_homepage
164
- get '/'
165
- end
166
- end
167
- ----------------------------------------------------------------------------
168
-
169
-
170
- The format looks very similar to that of an integration test. And guess what, that's what it is. But that doesn't stop you from testing your Model methods. You could very well write something like :
171
-
172
- [source, ruby]
173
- ----------------------------------------------------------------------------
174
- require 'performance/test_helper'
175
-
176
- class UserModelTest < ActionController::PerformanceTest
177
- # Replace this with your real tests.
178
- def test_slow_find
179
- User.this_takes_shlong_to_run
180
- end
181
- end
182
- ----------------------------------------------------------------------------
183
-
184
-
185
- Which is very useful way to profile individual processes.
@@ -1,27 +0,0 @@
1
- == Get Yourself a Game Plan ==
2
-
3
- You end up dealing with a large amount of data whenever you profile an application. It's crucial to use a rigorous approach to analyzing your application's performance else fail miserably in a vortex of numbers. This leads us to -
4
-
5
- === The Analysis Process ===
6
-
7
- I’m going to give an example methodology for conducting your benchmarking and profiling on an application. It is based on your typical scientific method.
8
-
9
- For something as complex as Benchmarking you need to take any methodology with a grain of salt but there are some basic strictures that you can depend on.
10
-
11
- Formulate a question you need to answer which is simple, tests the smallest measurable thing possible, and is exact. This is typically the hardest part of the experiment. From there some steps that you should follow are.
12
-
13
- * Develop a set of variables and processes to measure in order to answer this question!
14
- * Profile based on the question and variables. Key problems to avoid when designing this experiment are:
15
- - Confounding: Test one thing at a time, keep everything the same so you don't poison the data with uncontrolled processes.
16
- - Cross Contamination: Make sure that runs from one test do not harm the other tests.
17
- - Steady States: If you’re testing long running process. You must take the ramp up time and performance hit into your initial measurements.
18
- - Sampling Error: Data should perform have a steady variance or range. If you get wild swings or sudden spikes, etc. then you must either account for the reason why or you have a sampling error.
19
- - Measurement Error: Aka Human error, always go through your calculations at least twice to make sure there are no mathematical errors. .
20
- * Do a small run of the experiment to verify the design.
21
- * Use the small run to determine a proper sample size.
22
- * Run the test.
23
- * Perform the analysis on the results and determine where to go from there.
24
-
25
- Note: Even though we are using the typical scientific method; developing a hypothesis is not always useful in terms of profiling.
26
-
27
-