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,95 +0,0 @@
1
- namespace :doc do
2
- desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""
3
- Rake::RDocTask.new("app") { |rdoc|
4
- rdoc.rdoc_dir = 'doc/app'
5
- rdoc.template = ENV['template'] if ENV['template']
6
- rdoc.title = ENV['title'] || "Rails Application Documentation"
7
- rdoc.options << '--line-numbers' << '--inline-source'
8
- rdoc.options << '--charset' << 'utf-8'
9
- rdoc.rdoc_files.include('doc/README_FOR_APP')
10
- rdoc.rdoc_files.include('app/**/*.rb')
11
- rdoc.rdoc_files.include('lib/**/*.rb')
12
- }
13
-
14
- desc "Generate documentation for the Rails framework"
15
- Rake::RDocTask.new("rails") { |rdoc|
16
- rdoc.rdoc_dir = 'doc/api'
17
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
18
- rdoc.title = "Rails Framework Documentation"
19
- rdoc.options << '--line-numbers' << '--inline-source'
20
- rdoc.rdoc_files.include('README')
21
- rdoc.rdoc_files.include('vendor/rails/railties/CHANGELOG')
22
- rdoc.rdoc_files.include('vendor/rails/railties/MIT-LICENSE')
23
- rdoc.rdoc_files.include('vendor/rails/railties/README')
24
- rdoc.rdoc_files.include('vendor/rails/railties/lib/{*.rb,commands/*.rb,rails_generator/*.rb}')
25
- rdoc.rdoc_files.include('vendor/rails/activerecord/README')
26
- rdoc.rdoc_files.include('vendor/rails/activerecord/CHANGELOG')
27
- rdoc.rdoc_files.include('vendor/rails/activerecord/lib/active_record/**/*.rb')
28
- rdoc.rdoc_files.exclude('vendor/rails/activerecord/lib/active_record/vendor/*')
29
- rdoc.rdoc_files.include('vendor/rails/activeresource/README')
30
- rdoc.rdoc_files.include('vendor/rails/activeresource/CHANGELOG')
31
- rdoc.rdoc_files.include('vendor/rails/activeresource/lib/active_resource.rb')
32
- rdoc.rdoc_files.include('vendor/rails/activeresource/lib/active_resource/*')
33
- rdoc.rdoc_files.include('vendor/rails/actionpack/README')
34
- rdoc.rdoc_files.include('vendor/rails/actionpack/CHANGELOG')
35
- rdoc.rdoc_files.include('vendor/rails/actionpack/lib/action_controller/**/*.rb')
36
- rdoc.rdoc_files.include('vendor/rails/actionpack/lib/action_view/**/*.rb')
37
- rdoc.rdoc_files.include('vendor/rails/actionmailer/README')
38
- rdoc.rdoc_files.include('vendor/rails/actionmailer/CHANGELOG')
39
- rdoc.rdoc_files.include('vendor/rails/actionmailer/lib/action_mailer/base.rb')
40
- rdoc.rdoc_files.include('vendor/rails/activesupport/README')
41
- rdoc.rdoc_files.include('vendor/rails/activesupport/CHANGELOG')
42
- rdoc.rdoc_files.include('vendor/rails/activesupport/lib/active_support/**/*.rb')
43
- }
44
-
45
- plugins = FileList['vendor/plugins/**'].collect { |plugin| File.basename(plugin) }
46
-
47
- desc "Generate documentation for all installed plugins"
48
- task :plugins => plugins.collect { |plugin| "doc:plugins:#{plugin}" }
49
-
50
- desc "Remove plugin documentation"
51
- task :clobber_plugins do
52
- rm_rf 'doc/plugins' rescue nil
53
- end
54
-
55
- desc "Generate Rails guides"
56
- task :guides do
57
- source = File.join(RAILTIES_PATH, "doc/guides")
58
- destination = File.join(RAILS_ROOT, "doc/guides")
59
- FileUtils.rm_r(destination) if File.directory?(destination)
60
- FileUtils.mkdir(destination)
61
-
62
- FileUtils.cp_r File.join(source, 'html/.'), File.join(destination)
63
- # Copy images and css files to html directory. These dirs are in .gitigore and shouldn't be source controlled.
64
- FileUtils.cp_r File.join(source, 'source/images'), File.join(destination)
65
- FileUtils.cp_r File.join(source, 'source/stylesheets'), File.join(destination, 'stylesheets')
66
- end
67
-
68
- namespace :plugins do
69
- # Define doc tasks for each plugin
70
- plugins.each do |plugin|
71
- desc "Generate documentation for the #{plugin} plugin"
72
- task(plugin => :environment) do
73
- plugin_base = "vendor/plugins/#{plugin}"
74
- options = []
75
- files = Rake::FileList.new
76
- options << "-o doc/plugins/#{plugin}"
77
- options << "--title '#{plugin.titlecase} Plugin Documentation'"
78
- options << '--line-numbers' << '--inline-source'
79
- options << '--charset' << 'utf-8'
80
- options << '-T html'
81
-
82
- files.include("#{plugin_base}/lib/**/*.rb")
83
- if File.exist?("#{plugin_base}/README")
84
- files.include("#{plugin_base}/README")
85
- options << "--main '#{plugin_base}/README'"
86
- end
87
- files.include("#{plugin_base}/CHANGELOG") if File.exist?("#{plugin_base}/CHANGELOG")
88
-
89
- options << files.to_s
90
-
91
- sh %(rdoc #{options * ' '})
92
- end
93
- end
94
- end
95
- end
@@ -1,118 +0,0 @@
1
- namespace :rails do
2
- namespace :freeze do
3
- desc "Lock this application to the current gems (by unpacking them into vendor/rails)"
4
- task :gems do
5
- deps = %w(actionpack activerecord actionmailer activesupport activeresource)
6
- require 'rubygems'
7
- require 'rubygems/gem_runner'
8
-
9
- rails = (version = ENV['VERSION']) ?
10
- Gem.cache.find_name('rails', "= #{version}").first :
11
- Gem.cache.find_name('rails').sort_by { |g| g.version }.last
12
-
13
- version ||= rails.version
14
-
15
- unless rails
16
- puts "No rails gem #{version} is installed. Do 'gem list rails' to see what you have available."
17
- exit
18
- end
19
-
20
- puts "Freezing to the gems for Rails #{rails.version}"
21
- rm_rf "vendor/rails"
22
- mkdir_p "vendor/rails"
23
-
24
- begin
25
- chdir("vendor/rails") do
26
- rails.dependencies.select { |g| deps.include? g.name }.each do |g|
27
- Gem::GemRunner.new.run(["unpack", g.name, "--version", g.version_requirements.to_s])
28
- mv(Dir.glob("#{g.name}*").first, g.name)
29
- end
30
-
31
- Gem::GemRunner.new.run(["unpack", "rails", "--version", "=#{version}"])
32
- FileUtils.mv(Dir.glob("rails*").first, "railties")
33
- end
34
- rescue Exception
35
- rm_rf "vendor/rails"
36
- raise
37
- end
38
- end
39
-
40
- desc 'Lock to latest Edge Rails, for a specific release use RELEASE=1.2.0'
41
- task :edge do
42
- require 'open-uri'
43
- version = ENV["RELEASE"] || "edge"
44
- target = "rails_#{version}.zip"
45
- commits = "http://github.com/api/v1/yaml/rails/rails/commits/master"
46
- url = "http://dev.rubyonrails.org/archives/#{target}"
47
-
48
- chdir 'vendor' do
49
- latest_revision = YAML.load(open(commits))["commits"].first["id"]
50
-
51
- puts "Downloading Rails from #{url}"
52
- File.open('rails.zip', 'wb') do |dst|
53
- open url do |src|
54
- while chunk = src.read(4096)
55
- dst << chunk
56
- end
57
- end
58
- end
59
-
60
- puts 'Unpacking Rails'
61
- rm_rf 'rails'
62
- `unzip rails.zip`
63
- %w(rails.zip rails/Rakefile rails/cleanlogs.sh rails/pushgems.rb rails/release.rb).each do |goner|
64
- rm_f goner
65
- end
66
-
67
- touch "rails/REVISION_#{latest_revision}"
68
- end
69
-
70
- puts 'Updating current scripts, javascripts, and configuration settings'
71
- Rake::Task['rails:update'].invoke
72
- end
73
- end
74
-
75
- desc "Unlock this application from freeze of gems or edge and return to a fluid use of system gems"
76
- task :unfreeze do
77
- rm_rf "vendor/rails"
78
- end
79
-
80
- desc "Update both configs, scripts and public/javascripts from Rails"
81
- task :update => [ "update:scripts", "update:javascripts", "update:configs" ]
82
-
83
- namespace :update do
84
- desc "Add new scripts to the application script/ directory"
85
- task :scripts do
86
- local_base = "script"
87
- edge_base = "#{File.dirname(__FILE__)}/../../bin"
88
-
89
- local = Dir["#{local_base}/**/*"].reject { |path| File.directory?(path) }
90
- edge = Dir["#{edge_base}/**/*"].reject { |path| File.directory?(path) }
91
-
92
- edge.each do |script|
93
- base_name = script[(edge_base.length+1)..-1]
94
- next if base_name == "rails"
95
- next if local.detect { |path| base_name == path[(local_base.length+1)..-1] }
96
- if !File.directory?("#{local_base}/#{File.dirname(base_name)}")
97
- mkdir_p "#{local_base}/#{File.dirname(base_name)}"
98
- end
99
- install script, "#{local_base}/#{base_name}", :mode => 0755
100
- end
101
- end
102
-
103
- desc "Update your javascripts from your current rails install"
104
- task :javascripts do
105
- require 'railties_path'
106
- project_dir = RAILS_ROOT + '/public/javascripts/'
107
- scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js']
108
- scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exist?(project_dir + 'application.js')
109
- FileUtils.cp(scripts, project_dir)
110
- end
111
-
112
- desc "Update config/boot.rb from your current rails install"
113
- task :configs do
114
- require 'railties_path'
115
- FileUtils.cp(RAILTIES_PATH + '/environments/boot.rb', RAILS_ROOT + '/config/boot.rb')
116
- end
117
- end
118
- end
data/lib/tasks/gems.rake DELETED
@@ -1,80 +0,0 @@
1
- desc "List the gems that this rails application depends on"
2
- task :gems => 'gems:base' do
3
- Rails.configuration.gems.each do |gem|
4
- print_gem_status(gem)
5
- end
6
- puts
7
- puts "I = Installed"
8
- puts "F = Frozen"
9
- puts "R = Framework (loaded before rails starts)"
10
- end
11
-
12
- def print_gem_status(gem, indent=1)
13
- code = gem.loaded? ? (gem.frozen? ? (gem.framework_gem? ? "R" : "F") : "I") : " "
14
- puts " "*(indent-1)+" - [#{code}] #{gem.name} #{gem.requirement.to_s}"
15
- gem.dependencies.each { |g| print_gem_status(g, indent+1)} if gem.loaded?
16
- end
17
-
18
- namespace :gems do
19
- task :base do
20
- $rails_gem_installer = true
21
- Rake::Task[:environment].invoke
22
- end
23
-
24
- desc "Build any native extensions for unpacked gems"
25
- task :build do
26
- $rails_gem_installer = true
27
- require 'rails/gem_builder'
28
- Dir[File.join(Rails::GemDependency.unpacked_path, '*')].each do |gem_dir|
29
- spec_file = File.join(gem_dir, '.specification')
30
- next unless File.exists?(spec_file)
31
- specification = YAML::load_file(spec_file)
32
- next unless ENV['GEM'].blank? || ENV['GEM'] == specification.name
33
- Rails::GemBuilder.new(specification, gem_dir).build_extensions
34
- puts "Built gem: '#{gem_dir}'"
35
- end
36
- end
37
-
38
- desc "Installs all required gems for this application."
39
- task :install => :base do
40
- require 'rubygems'
41
- require 'rubygems/gem_runner'
42
- Rails.configuration.gems.each { |gem| gem.install unless gem.loaded? }
43
- end
44
-
45
- desc "Unpacks the specified gem into vendor/gems."
46
- task :unpack => :base do
47
- require 'rubygems'
48
- require 'rubygems/gem_runner'
49
- Rails.configuration.gems.each do |gem|
50
- next unless !gem.frozen? && (ENV['GEM'].blank? || ENV['GEM'] == gem.name)
51
- gem.unpack_to(Rails::GemDependency.unpacked_path) if gem.loaded?
52
- end
53
- end
54
-
55
- namespace :unpack do
56
- desc "Unpacks the specified gems and its dependencies into vendor/gems"
57
- task :dependencies => :unpack do
58
- require 'rubygems'
59
- require 'rubygems/gem_runner'
60
- Rails.configuration.gems.each do |gem|
61
- next unless ENV['GEM'].blank? || ENV['GEM'] == gem.name
62
- gem.dependencies.each do |dependency|
63
- next if dependency.frozen?
64
- dependency.unpack_to(Rails::GemDependency.unpacked_path)
65
- end
66
- end
67
- end
68
- end
69
-
70
- desc "Regenerate gem specifications in correct format."
71
- task :refresh_specs => :base do
72
- require 'rubygems'
73
- require 'rubygems/gem_runner'
74
- Rails::VendorGemSourceIndex.silence_spec_warnings = true
75
- Rails.configuration.gems.each do |gem|
76
- next unless gem.frozen? && (ENV['GEM'].blank? || ENV['GEM'] == gem.name)
77
- gem.refresh_spec(Rails::GemDependency.unpacked_path) if gem.loaded?
78
- end
79
- end
80
- end
data/lib/tasks/log.rake DELETED
@@ -1,9 +0,0 @@
1
- namespace :log do
2
- desc "Truncates all *.log files in log/ to zero bytes"
3
- task :clear do
4
- FileList["log/*.log"].each do |log_file|
5
- f = File.open(log_file, "w")
6
- f.close
7
- end
8
- end
9
- end
data/lib/tasks/misc.rake DELETED
@@ -1,56 +0,0 @@
1
- task :default => :test
2
- task :environment do
3
- require(File.join(RAILS_ROOT, 'config', 'environment'))
4
- end
5
-
6
- desc 'Generate a crytographically secure secret key. This is typically used to generate a secret for cookie sessions.'
7
- task :secret do
8
- puts ActiveSupport::SecureRandom.hex(64)
9
- end
10
-
11
- require 'active_support'
12
- namespace :time do
13
- namespace :zones do
14
- desc 'Displays names of all time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6'
15
- task :all do
16
- build_time_zone_list(:all)
17
- end
18
-
19
- desc 'Displays names of US time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6'
20
- task :us do
21
- build_time_zone_list(:us_zones)
22
- end
23
-
24
- desc 'Displays names of time zones recognized by the Rails TimeZone class with the same offset as the system local time'
25
- task :local do
26
- jan_offset = Time.now.beginning_of_year.utc_offset
27
- jul_offset = Time.now.beginning_of_year.change(:month => 7).utc_offset
28
- offset = jan_offset < jul_offset ? jan_offset : jul_offset
29
- build_time_zone_list(:all, offset)
30
- end
31
-
32
- # to find UTC -06:00 zones, OFFSET can be set to either -6, -6:00 or 21600
33
- def build_time_zone_list(method, offset = ENV['OFFSET'])
34
- if offset
35
- offset = if offset.to_s.match(/(\+|-)?(\d+):(\d+)/)
36
- sign = $1 == '-' ? -1 : 1
37
- hours, minutes = $2.to_f, $3.to_f
38
- ((hours * 3600) + (minutes.to_f * 60)) * sign
39
- elsif offset.to_f.abs <= 13
40
- offset.to_f * 3600
41
- else
42
- offset.to_f
43
- end
44
- end
45
- previous_offset = nil
46
- ActiveSupport::TimeZone.__send__(method).each do |zone|
47
- if offset.nil? || offset == zone.utc_offset
48
- puts "\n* UTC #{zone.formatted_offset} *" unless zone.utc_offset == previous_offset
49
- puts zone.name
50
- previous_offset = zone.utc_offset
51
- end
52
- end
53
- puts "\n"
54
- end
55
- end
56
- end
data/lib/tasks/rails.rb DELETED
@@ -1,8 +0,0 @@
1
- $VERBOSE = nil
2
-
3
- # Load Rails rakefile extensions
4
- Dir["#{File.dirname(__FILE__)}/*.rake"].each { |ext| load ext }
5
-
6
- # Load any custom rakefile extensions
7
- Dir["#{RAILS_ROOT}/vendor/plugins/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
8
- Dir["#{RAILS_ROOT}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
@@ -1,17 +0,0 @@
1
- desc 'Print out all defined routes in match order, with names.'
2
- task :routes => :environment do
3
- routes = ActionController::Routing::Routes.routes.collect do |route|
4
- name = ActionController::Routing::Routes.named_routes.routes.index(route).to_s
5
- verb = route.conditions[:method].to_s.upcase
6
- segs = route.segments.inject("") { |str,s| str << s.to_s }
7
- segs.chop! if segs.length > 1
8
- reqs = route.requirements.empty? ? "" : route.requirements.inspect
9
- {:name => name, :verb => verb, :segs => segs, :reqs => reqs}
10
- end
11
- name_width = routes.collect {|r| r[:name]}.collect {|n| n.length}.max
12
- verb_width = routes.collect {|r| r[:verb]}.collect {|v| v.length}.max
13
- segs_width = routes.collect {|r| r[:segs]}.collect {|s| s.length}.max
14
- routes.each do |r|
15
- puts "#{r[:name].rjust(name_width)} #{r[:verb].ljust(verb_width)} #{r[:segs].ljust(segs_width)} #{r[:reqs]}"
16
- end
17
- end
@@ -1,18 +0,0 @@
1
- STATS_DIRECTORIES = [
2
- %w(Controllers app/controllers),
3
- %w(Helpers app/helpers),
4
- %w(Models app/models),
5
- %w(Libraries lib/),
6
- %w(APIs app/apis),
7
- %w(Components components),
8
- %w(Integration\ tests test/integration),
9
- %w(Functional\ tests test/functional),
10
- %w(Unit\ tests test/unit)
11
-
12
- ].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
13
-
14
- desc "Report code statistics (KLOCs, etc) from the application"
15
- task :stats do
16
- require 'code_statistics'
17
- CodeStatistics.new(*STATS_DIRECTORIES).to_s
18
- end
@@ -1,139 +0,0 @@
1
- TEST_CHANGES_SINCE = Time.now - 600
2
-
3
- # Look up tests for recently modified sources.
4
- def recent_tests(source_pattern, test_path, touched_since = 10.minutes.ago)
5
- FileList[source_pattern].map do |path|
6
- if File.mtime(path) > touched_since
7
- tests = []
8
- source_dir = File.dirname(path).split("/")
9
- source_file = File.basename(path, '.rb')
10
-
11
- # Support subdirs in app/models and app/controllers
12
- modified_test_path = source_dir.length > 2 ? "#{test_path}/" << source_dir[1..source_dir.length].join('/') : test_path
13
-
14
- # For modified files in app/ run the tests for it. ex. /test/functional/account_controller.rb
15
- test = "#{modified_test_path}/#{source_file}_test.rb"
16
- tests.push test if File.exist?(test)
17
-
18
- # For modified files in app, run tests in subdirs too. ex. /test/functional/account/*_test.rb
19
- test = "#{modified_test_path}/#{File.basename(path, '.rb').sub("_controller","")}"
20
- FileList["#{test}/*_test.rb"].each { |f| tests.push f } if File.exist?(test)
21
-
22
- return tests
23
-
24
- end
25
- end.flatten.compact
26
- end
27
-
28
-
29
- # Recreated here from ActiveSupport because :uncommitted needs it before Rails is available
30
- module Kernel
31
- def silence_stderr
32
- old_stderr = STDERR.dup
33
- STDERR.reopen(RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'NUL:' : '/dev/null')
34
- STDERR.sync = true
35
- yield
36
- ensure
37
- STDERR.reopen(old_stderr)
38
- end
39
- end
40
-
41
- desc 'Run all unit, functional and integration tests'
42
- task :test do
43
- errors = %w(test:units test:functionals test:integration).collect do |task|
44
- begin
45
- Rake::Task[task].invoke
46
- nil
47
- rescue => e
48
- task
49
- end
50
- end.compact
51
- abort "Errors running #{errors.to_sentence}!" if errors.any?
52
- end
53
-
54
- namespace :test do
55
- Rake::TestTask.new(:recent => "db:test:prepare") do |t|
56
- since = TEST_CHANGES_SINCE
57
- touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } +
58
- recent_tests('app/models/**/*.rb', 'test/unit', since) +
59
- recent_tests('app/controllers/**/*.rb', 'test/functional', since)
60
-
61
- t.libs << 'test'
62
- t.verbose = true
63
- t.test_files = touched.uniq
64
- end
65
- Rake::Task['test:recent'].comment = "Test recent changes"
66
-
67
- Rake::TestTask.new(:uncommitted => "db:test:prepare") do |t|
68
- def t.file_list
69
- if File.directory?(".svn")
70
- changed_since_checkin = silence_stderr { `svn status` }.map { |path| path.chomp[7 .. -1] }
71
- elsif File.directory?(".git")
72
- changed_since_checkin = silence_stderr { `git ls-files --modified --others` }.map { |path| path.chomp }
73
- else
74
- abort "Not a Subversion or Git checkout."
75
- end
76
-
77
- models = changed_since_checkin.select { |path| path =~ /app[\\\/]models[\\\/].*\.rb$/ }
78
- controllers = changed_since_checkin.select { |path| path =~ /app[\\\/]controllers[\\\/].*\.rb$/ }
79
-
80
- unit_tests = models.map { |model| "test/unit/#{File.basename(model, '.rb')}_test.rb" }
81
- functional_tests = controllers.map { |controller| "test/functional/#{File.basename(controller, '.rb')}_test.rb" }
82
-
83
- unit_tests.uniq + functional_tests.uniq
84
- end
85
-
86
- t.libs << 'test'
87
- t.verbose = true
88
- end
89
- Rake::Task['test:uncommitted'].comment = "Test changes since last checkin (only Subversion and Git)"
90
-
91
- Rake::TestTask.new(:units => "db:test:prepare") do |t|
92
- t.libs << "test"
93
- t.pattern = 'test/unit/**/*_test.rb'
94
- t.verbose = true
95
- end
96
- Rake::Task['test:units'].comment = "Run the unit tests in test/unit"
97
-
98
- Rake::TestTask.new(:functionals => "db:test:prepare") do |t|
99
- t.libs << "test"
100
- t.pattern = 'test/functional/**/*_test.rb'
101
- t.verbose = true
102
- end
103
- Rake::Task['test:functionals'].comment = "Run the functional tests in test/functional"
104
-
105
- Rake::TestTask.new(:integration => "db:test:prepare") do |t|
106
- t.libs << "test"
107
- t.pattern = 'test/integration/**/*_test.rb'
108
- t.verbose = true
109
- end
110
- Rake::Task['test:integration'].comment = "Run the integration tests in test/integration"
111
-
112
- Rake::TestTask.new(:benchmark => 'db:test:prepare') do |t|
113
- t.libs << 'test'
114
- t.pattern = 'test/performance/**/*_test.rb'
115
- t.verbose = true
116
- t.options = '-- --benchmark'
117
- end
118
- Rake::Task['test:benchmark'].comment = 'Benchmark the performance tests'
119
-
120
- Rake::TestTask.new(:profile => 'db:test:prepare') do |t|
121
- t.libs << 'test'
122
- t.pattern = 'test/performance/**/*_test.rb'
123
- t.verbose = true
124
- end
125
- Rake::Task['test:profile'].comment = 'Profile the performance tests'
126
-
127
- Rake::TestTask.new(:plugins => :environment) do |t|
128
- t.libs << "test"
129
-
130
- if ENV['PLUGIN']
131
- t.pattern = "vendor/plugins/#{ENV['PLUGIN']}/test/**/*_test.rb"
132
- else
133
- t.pattern = 'vendor/plugins/*/**/test/**/*_test.rb'
134
- end
135
-
136
- t.verbose = true
137
- end
138
- Rake::Task['test:plugins'].comment = "Run the plugin tests in vendor/plugins/*/**/test (or specify with PLUGIN=name)"
139
- end