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.
- data/CHANGELOG +267 -2
- data/MIT-LICENSE +1 -1
- data/README +62 -63
- data/Rakefile +26 -15
- data/bin/process/inspector +3 -0
- data/configs/databases/frontbase.yml +28 -0
- data/configs/databases/mysql.yml +3 -2
- data/configs/databases/oracle.yml +10 -1
- data/configs/databases/sqlite3.yml +3 -0
- data/configs/lighttpd.conf +1 -0
- data/configs/routes.rb +1 -0
- data/environments/boot.rb +4 -3
- data/environments/environment.rb +9 -2
- data/environments/production.rb +1 -1
- data/helpers/application.rb +5 -2
- data/html/404.html +27 -5
- data/html/500.html +27 -5
- data/html/javascripts/controls.js +41 -23
- data/html/javascripts/dragdrop.js +105 -76
- data/html/javascripts/effects.js +293 -163
- data/html/javascripts/prototype.js +897 -389
- data/lib/breakpoint.rb +31 -1
- data/lib/breakpoint_client.rb +5 -5
- data/lib/code_statistics.rb +1 -1
- data/lib/commands/performance/profiler.rb +25 -9
- data/lib/commands/plugin.rb +69 -23
- data/lib/commands/process/inspector.rb +68 -0
- data/lib/commands/process/reaper.rb +88 -69
- data/lib/commands/process/spawner.rb +148 -33
- data/lib/commands/runner.rb +27 -6
- data/lib/commands/server.rb +18 -9
- data/lib/commands/servers/base.rb +19 -0
- data/lib/commands/servers/lighttpd.rb +20 -18
- data/lib/commands/servers/mongrel.rb +65 -0
- data/lib/console_sandbox.rb +2 -2
- data/lib/dispatcher.rb +67 -11
- data/lib/fcgi_handler.rb +52 -34
- data/lib/initializer.rb +190 -111
- data/lib/rails/version.rb +2 -2
- data/lib/rails_generator/base.rb +82 -24
- data/lib/rails_generator/commands.rb +87 -25
- data/lib/rails_generator/generated_attribute.rb +42 -0
- data/lib/rails_generator/generators/applications/app/app_generator.rb +13 -10
- data/lib/rails_generator/generators/components/controller/controller_generator.rb +1 -2
- data/lib/rails_generator/generators/components/mailer/mailer_generator.rb +10 -8
- data/lib/rails_generator/generators/components/mailer/templates/fixture.rhtml +1 -1
- data/lib/rails_generator/generators/components/mailer/templates/unit_test.rb +4 -4
- data/lib/rails_generator/generators/components/mailer/templates/view.rhtml +1 -1
- data/lib/rails_generator/generators/components/migration/templates/migration.rb +1 -1
- data/lib/rails_generator/generators/components/model/USAGE +19 -12
- data/lib/rails_generator/generators/components/model/model_generator.rb +4 -0
- data/lib/rails_generator/generators/components/model/templates/fixtures.yml +8 -2
- data/lib/rails_generator/generators/components/model/templates/migration.rb +3 -1
- data/lib/rails_generator/generators/components/observer/USAGE +15 -0
- data/lib/rails_generator/generators/components/observer/observer_generator.rb +16 -0
- data/lib/rails_generator/generators/components/observer/templates/observer.rb +2 -0
- data/lib/rails_generator/generators/components/observer/templates/unit_test.rb +10 -0
- data/lib/rails_generator/generators/components/plugin/plugin_generator.rb +4 -0
- data/lib/rails_generator/generators/components/plugin/templates/uninstall.rb +1 -0
- data/lib/rails_generator/generators/components/resource/resource_generator.rb +76 -0
- data/lib/rails_generator/generators/components/resource/templates/USAGE +18 -0
- data/lib/rails_generator/generators/components/resource/templates/controller.rb +2 -0
- data/lib/rails_generator/generators/components/resource/templates/fixtures.yml +11 -0
- data/lib/rails_generator/generators/components/resource/templates/functional_test.rb +20 -0
- data/lib/rails_generator/generators/components/resource/templates/helper.rb +2 -0
- data/lib/rails_generator/generators/components/resource/templates/migration.rb +13 -0
- data/lib/rails_generator/generators/components/resource/templates/model.rb +2 -0
- data/lib/rails_generator/generators/components/resource/templates/unit_test.rb +10 -0
- data/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +10 -1
- data/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +11 -7
- data/lib/rails_generator/generators/components/scaffold/templates/layout.rhtml +5 -1
- data/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +2 -2
- data/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml +1 -1
- data/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +2 -2
- data/lib/rails_generator/generators/components/scaffold_resource/USAGE +29 -0
- data/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +92 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +79 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +11 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +57 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +2 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml +17 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +13 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +2 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +74 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +10 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml +19 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml +24 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml +18 -0
- data/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml +10 -0
- data/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb +7 -1
- data/lib/rails_generator/generators/components/session_migration/templates/migration.rb +5 -4
- data/lib/rails_generator/lookup.rb +1 -2
- data/lib/rails_generator/options.rb +6 -3
- data/lib/tasks/databases.rake +46 -20
- data/lib/tasks/documentation.rake +1 -0
- data/lib/tasks/framework.rake +1 -3
- data/lib/tasks/pre_namespace_aliases.rake +34 -27
- data/lib/tasks/rails.rb +2 -2
- data/lib/tasks/statistics.rake +6 -5
- data/lib/tasks/testing.rake +28 -13
- data/lib/tasks/tmp.rake +8 -1
- data/lib/test_help.rb +3 -2
- data/lib/webrick_server.rb +6 -8
- metadata +50 -9
data/lib/tasks/tmp.rake
CHANGED
@@ -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
|
data/lib/test_help.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
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)
|
data/lib/webrick_server.rb
CHANGED
@@ -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
|
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]
|
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.
|
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.
|
7
|
-
date:
|
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.
|
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.
|
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.
|
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.
|
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.
|
355
|
+
version: 1.2.0
|
315
356
|
version:
|