rails 1.1.6 → 1.2.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 (104) hide show
  1. data/CHANGELOG +267 -2
  2. data/MIT-LICENSE +1 -1
  3. data/README +62 -63
  4. data/Rakefile +26 -15
  5. data/bin/process/inspector +3 -0
  6. data/configs/databases/frontbase.yml +28 -0
  7. data/configs/databases/mysql.yml +3 -2
  8. data/configs/databases/oracle.yml +10 -1
  9. data/configs/databases/sqlite3.yml +3 -0
  10. data/configs/lighttpd.conf +1 -0
  11. data/configs/routes.rb +1 -0
  12. data/environments/boot.rb +4 -3
  13. data/environments/environment.rb +9 -2
  14. data/environments/production.rb +1 -1
  15. data/helpers/application.rb +5 -2
  16. data/html/404.html +27 -5
  17. data/html/500.html +27 -5
  18. data/html/javascripts/controls.js +41 -23
  19. data/html/javascripts/dragdrop.js +105 -76
  20. data/html/javascripts/effects.js +293 -163
  21. data/html/javascripts/prototype.js +897 -389
  22. data/lib/breakpoint.rb +31 -1
  23. data/lib/breakpoint_client.rb +5 -5
  24. data/lib/code_statistics.rb +1 -1
  25. data/lib/commands/performance/profiler.rb +25 -9
  26. data/lib/commands/plugin.rb +69 -23
  27. data/lib/commands/process/inspector.rb +68 -0
  28. data/lib/commands/process/reaper.rb +88 -69
  29. data/lib/commands/process/spawner.rb +148 -33
  30. data/lib/commands/runner.rb +27 -6
  31. data/lib/commands/server.rb +18 -9
  32. data/lib/commands/servers/base.rb +19 -0
  33. data/lib/commands/servers/lighttpd.rb +20 -18
  34. data/lib/commands/servers/mongrel.rb +65 -0
  35. data/lib/console_sandbox.rb +2 -2
  36. data/lib/dispatcher.rb +67 -11
  37. data/lib/fcgi_handler.rb +52 -34
  38. data/lib/initializer.rb +190 -111
  39. data/lib/rails/version.rb +2 -2
  40. data/lib/rails_generator/base.rb +82 -24
  41. data/lib/rails_generator/commands.rb +87 -25
  42. data/lib/rails_generator/generated_attribute.rb +42 -0
  43. data/lib/rails_generator/generators/applications/app/app_generator.rb +13 -10
  44. data/lib/rails_generator/generators/components/controller/controller_generator.rb +1 -2
  45. data/lib/rails_generator/generators/components/mailer/mailer_generator.rb +10 -8
  46. data/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +1 -1
  47. data/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +4 -4
  48. data/lib/rails_generator/generators/components/mailer/templates/view.rhtml +1 -1
  49. data/lib/rails_generator/generators/components/migration/templates/migration.rb +1 -1
  50. data/lib/rails_generator/generators/components/model/USAGE +19 -12
  51. data/lib/rails_generator/generators/components/model/model_generator.rb +4 -0
  52. data/lib/rails_generator/generators/components/model/templates/fixtures.yml +8 -2
  53. data/lib/rails_generator/generators/components/model/templates/migration.rb +3 -1
  54. data/lib/rails_generator/generators/components/observer/USAGE +15 -0
  55. data/lib/rails_generator/generators/components/observer/observer_generator.rb +16 -0
  56. data/lib/rails_generator/generators/components/observer/templates/observer.rb +2 -0
  57. data/lib/rails_generator/generators/components/observer/templates/unit_test.rb +10 -0
  58. data/lib/rails_generator/generators/components/plugin/plugin_generator.rb +4 -0
  59. data/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +1 -0
  60. data/lib/rails_generator/generators/components/resource/resource_generator.rb +76 -0
  61. data/lib/rails_generator/generators/components/resource/templates/USAGE +18 -0
  62. data/lib/rails_generator/generators/components/resource/templates/controller.rb +2 -0
  63. data/lib/rails_generator/generators/components/resource/templates/fixtures.yml +11 -0
  64. data/lib/rails_generator/generators/components/resource/templates/functional_test.rb +20 -0
  65. data/lib/rails_generator/generators/components/resource/templates/helper.rb +2 -0
  66. data/lib/rails_generator/generators/components/resource/templates/migration.rb +13 -0
  67. data/lib/rails_generator/generators/components/resource/templates/model.rb +2 -0
  68. data/lib/rails_generator/generators/components/resource/templates/unit_test.rb +10 -0
  69. data/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +10 -1
  70. data/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +11 -7
  71. data/lib/rails_generator/generators/components/scaffold/templates/layout.rhtml +5 -1
  72. data/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +2 -2
  73. data/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml +1 -1
  74. data/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +2 -2
  75. data/lib/rails_generator/generators/components/scaffold_resource/USAGE +29 -0
  76. data/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +92 -0
  77. data/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +79 -0
  78. data/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +11 -0
  79. data/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +57 -0
  80. data/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +2 -0
  81. data/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml +17 -0
  82. data/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +13 -0
  83. data/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +2 -0
  84. data/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +74 -0
  85. data/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +10 -0
  86. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml +19 -0
  87. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml +24 -0
  88. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml +18 -0
  89. data/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml +10 -0
  90. data/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +7 -1
  91. data/lib/rails_generator/generators/components/session_migration/templates/migration.rb +5 -4
  92. data/lib/rails_generator/lookup.rb +1 -2
  93. data/lib/rails_generator/options.rb +6 -3
  94. data/lib/tasks/databases.rake +46 -20
  95. data/lib/tasks/documentation.rake +1 -0
  96. data/lib/tasks/framework.rake +1 -3
  97. data/lib/tasks/pre_namespace_aliases.rake +34 -27
  98. data/lib/tasks/rails.rb +2 -2
  99. data/lib/tasks/statistics.rake +6 -5
  100. data/lib/tasks/testing.rake +28 -13
  101. data/lib/tasks/tmp.rake +8 -1
  102. data/lib/test_help.rb +3 -2
  103. data/lib/webrick_server.rb +6 -8
  104. metadata +50 -9
@@ -4,7 +4,7 @@ namespace :tmp do
4
4
 
5
5
  desc "Creates tmp directories for sessions, cache, and sockets"
6
6
  task :create do
7
- FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets ))
7
+ FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets tmp/pids ))
8
8
  end
9
9
 
10
10
  namespace :sessions do
@@ -27,4 +27,11 @@ namespace :tmp do
27
27
  FileUtils.rm(Dir['tmp/sockets/[^.]*'])
28
28
  end
29
29
  end
30
+
31
+ namespace :pids do
32
+ desc "Clears all files in tmp/pids"
33
+ task :clear do
34
+ FileUtils.rm(Dir['tmp/pids/[^.]*'])
35
+ end
36
+ end
30
37
  end
@@ -1,6 +1,6 @@
1
- require 'application'
1
+ require_dependency 'application'
2
2
 
3
- # Make double-sure the RAILS_ENV is set to test,
3
+ # Make double-sure the RAILS_ENV is set to test,
4
4
  # so fixtures are loaded to the right database
5
5
  silence_warnings { RAILS_ENV = "test" }
6
6
 
@@ -12,6 +12,7 @@ require 'action_web_service/test_invoke'
12
12
  require 'breakpoint'
13
13
 
14
14
  Test::Unit::TestCase.fixture_path = RAILS_ROOT + "/test/fixtures/"
15
+ ActionController::IntegrationTest.fixture_path = Test::Unit::TestCase.fixture_path
15
16
 
16
17
  def create_fixtures(*table_names)
17
18
  Fixtures.create_fixtures(RAILS_ROOT + "/test/fixtures", table_names)
@@ -3,11 +3,10 @@
3
3
  require 'webrick'
4
4
  require 'cgi'
5
5
  require 'stringio'
6
+ require 'dispatcher'
6
7
 
7
8
  include WEBrick
8
9
 
9
- ABSOLUTE_RAILS_ROOT = File.expand_path(RAILS_ROOT)
10
-
11
10
  class CGI #:nodoc:
12
11
  def stdinput
13
12
  @stdin || $stdin
@@ -60,17 +59,16 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
60
59
  server.mount('/', DispatchServlet, options)
61
60
 
62
61
  trap("INT") { server.shutdown }
63
-
64
- require File.join(@server_options[:server_root], "..", "config", "environment") unless defined?(RAILS_ROOT)
65
- require "dispatcher"
66
-
62
+
67
63
  server.start
68
64
  end
69
65
 
70
66
  def initialize(server, options) #:nodoc:
71
67
  @server_options = options
72
68
  @file_handler = WEBrick::HTTPServlet::FileHandler.new(server, options[:server_root])
73
- Dir.chdir(ABSOLUTE_RAILS_ROOT)
69
+ # Change to the RAILS_ROOT, since Webrick::Daemon.start does a Dir::cwd("/")
70
+ # OPTIONS['working_directory'] is an absolute path of the RAILS_ROOT, set in railties/lib/commands/servers/webrick.rb
71
+ Dir.chdir(OPTIONS['working_directory']) if defined?(OPTIONS) && File.directory?(OPTIONS['working_directory'])
74
72
  super
75
73
  end
76
74
 
@@ -145,7 +143,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
145
143
  data.rewind
146
144
  data = data.read
147
145
 
148
- raw_header, body = *data.split(/^[\xd\xa]+/on, 2)
146
+ raw_header, body = *data.split(/^[\xd\xa]{2}/on, 2)
149
147
  header = WEBrick::HTTPUtils::parse_header(raw_header)
150
148
 
151
149
  return header, body
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rails
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.6
7
- date: 2006-08-10 00:00:00 -05:00
6
+ version: 1.2.0
7
+ date: 2007-01-17 00:00:00 -06:00
8
8
  summary: Web-application framework with template engine, control-flow layer, and ORM.
9
9
  require_paths:
10
10
  - lib
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
25
25
  platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
+ post_install_message:
28
29
  authors:
29
30
  - David Heinemeier Hansson
30
31
  files:
@@ -42,7 +43,6 @@ files:
42
43
  - MIT-LICENSE
43
44
  - Rakefile
44
45
  - README
45
- - test
46
46
  - bin/about
47
47
  - bin/breakpointer
48
48
  - bin/console
@@ -56,6 +56,7 @@ files:
56
56
  - bin/server
57
57
  - bin/performance/benchmarker
58
58
  - bin/performance/profiler
59
+ - bin/process/inspector
59
60
  - bin/process/reaper
60
61
  - bin/process/spawner
61
62
  - builtin/rails_info
@@ -69,6 +70,7 @@ files:
69
70
  - configs/empty.log
70
71
  - configs/lighttpd.conf
71
72
  - configs/routes.rb
73
+ - configs/databases/frontbase.yml
72
74
  - configs/databases/mysql.yml
73
75
  - configs/databases/oracle.yml
74
76
  - configs/databases/postgresql.yml
@@ -137,14 +139,18 @@ files:
137
139
  - lib/commands/ncgi/tracker
138
140
  - lib/commands/performance/benchmarker.rb
139
141
  - lib/commands/performance/profiler.rb
142
+ - lib/commands/process/inspector.rb
140
143
  - lib/commands/process/reaper.rb
141
144
  - lib/commands/process/spawner.rb
142
145
  - lib/commands/process/spinner.rb
146
+ - lib/commands/servers/base.rb
143
147
  - lib/commands/servers/lighttpd.rb
148
+ - lib/commands/servers/mongrel.rb
144
149
  - lib/commands/servers/webrick.rb
145
150
  - lib/rails/version.rb
146
151
  - lib/rails_generator/base.rb
147
152
  - lib/rails_generator/commands.rb
153
+ - lib/rails_generator/generated_attribute.rb
148
154
  - lib/rails_generator/generators
149
155
  - lib/rails_generator/lookup.rb
150
156
  - lib/rails_generator/manifest.rb
@@ -163,8 +169,11 @@ files:
163
169
  - lib/rails_generator/generators/components/mailer
164
170
  - lib/rails_generator/generators/components/migration
165
171
  - lib/rails_generator/generators/components/model
172
+ - lib/rails_generator/generators/components/observer
166
173
  - lib/rails_generator/generators/components/plugin
174
+ - lib/rails_generator/generators/components/resource
167
175
  - lib/rails_generator/generators/components/scaffold
176
+ - lib/rails_generator/generators/components/scaffold_resource
168
177
  - lib/rails_generator/generators/components/session_migration
169
178
  - lib/rails_generator/generators/components/web_service
170
179
  - lib/rails_generator/generators/components/controller/controller_generator.rb
@@ -196,6 +205,11 @@ files:
196
205
  - lib/rails_generator/generators/components/model/templates/migration.rb
197
206
  - lib/rails_generator/generators/components/model/templates/model.rb
198
207
  - lib/rails_generator/generators/components/model/templates/unit_test.rb
208
+ - lib/rails_generator/generators/components/observer/observer_generator.rb
209
+ - lib/rails_generator/generators/components/observer/templates
210
+ - lib/rails_generator/generators/components/observer/USAGE
211
+ - lib/rails_generator/generators/components/observer/templates/observer.rb
212
+ - lib/rails_generator/generators/components/observer/templates/unit_test.rb
199
213
  - lib/rails_generator/generators/components/plugin/plugin_generator.rb
200
214
  - lib/rails_generator/generators/components/plugin/templates
201
215
  - lib/rails_generator/generators/components/plugin/USAGE
@@ -206,8 +220,19 @@ files:
206
220
  - lib/rails_generator/generators/components/plugin/templates/Rakefile
207
221
  - lib/rails_generator/generators/components/plugin/templates/README
208
222
  - lib/rails_generator/generators/components/plugin/templates/tasks.rake
223
+ - lib/rails_generator/generators/components/plugin/templates/uninstall.rb
209
224
  - lib/rails_generator/generators/components/plugin/templates/unit_test.rb
210
225
  - lib/rails_generator/generators/components/plugin/templates/USAGE
226
+ - lib/rails_generator/generators/components/resource/resource_generator.rb
227
+ - lib/rails_generator/generators/components/resource/templates
228
+ - lib/rails_generator/generators/components/resource/templates/controller.rb
229
+ - lib/rails_generator/generators/components/resource/templates/fixtures.yml
230
+ - lib/rails_generator/generators/components/resource/templates/functional_test.rb
231
+ - lib/rails_generator/generators/components/resource/templates/helper.rb
232
+ - lib/rails_generator/generators/components/resource/templates/migration.rb
233
+ - lib/rails_generator/generators/components/resource/templates/model.rb
234
+ - lib/rails_generator/generators/components/resource/templates/unit_test.rb
235
+ - lib/rails_generator/generators/components/resource/templates/USAGE
211
236
  - lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
212
237
  - lib/rails_generator/generators/components/scaffold/templates
213
238
  - lib/rails_generator/generators/components/scaffold/USAGE
@@ -222,6 +247,22 @@ files:
222
247
  - lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml
223
248
  - lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml
224
249
  - lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml
250
+ - lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb
251
+ - lib/rails_generator/generators/components/scaffold_resource/templates
252
+ - lib/rails_generator/generators/components/scaffold_resource/USAGE
253
+ - lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb
254
+ - lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml
255
+ - lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb
256
+ - lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb
257
+ - lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml
258
+ - lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb
259
+ - lib/rails_generator/generators/components/scaffold_resource/templates/model.rb
260
+ - lib/rails_generator/generators/components/scaffold_resource/templates/style.css
261
+ - lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb
262
+ - lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml
263
+ - lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml
264
+ - lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml
265
+ - lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml
225
266
  - lib/rails_generator/generators/components/session_migration/session_migration_generator.rb
226
267
  - lib/rails_generator/generators/components/session_migration/templates
227
268
  - lib/rails_generator/generators/components/session_migration/USAGE
@@ -275,7 +316,7 @@ dependencies:
275
316
  requirements:
276
317
  - - "="
277
318
  - !ruby/object:Gem::Version
278
- version: 1.3.1
319
+ version: 1.4.0
279
320
  version:
280
321
  - !ruby/object:Gem::Dependency
281
322
  name: activerecord
@@ -284,7 +325,7 @@ dependencies:
284
325
  requirements:
285
326
  - - "="
286
327
  - !ruby/object:Gem::Version
287
- version: 1.14.4
328
+ version: 1.15.0
288
329
  version:
289
330
  - !ruby/object:Gem::Dependency
290
331
  name: actionpack
@@ -293,7 +334,7 @@ dependencies:
293
334
  requirements:
294
335
  - - "="
295
336
  - !ruby/object:Gem::Version
296
- version: 1.12.5
337
+ version: 1.13.0
297
338
  version:
298
339
  - !ruby/object:Gem::Dependency
299
340
  name: actionmailer
@@ -302,7 +343,7 @@ dependencies:
302
343
  requirements:
303
344
  - - "="
304
345
  - !ruby/object:Gem::Version
305
- version: 1.2.5
346
+ version: 1.3.0
306
347
  version:
307
348
  - !ruby/object:Gem::Dependency
308
349
  name: actionwebservice
@@ -311,5 +352,5 @@ dependencies:
311
352
  requirements:
312
353
  - - "="
313
354
  - !ruby/object:Gem::Version
314
- version: 1.1.6
355
+ version: 1.2.0
315
356
  version: