rails 2.2.3 → 2.3.2
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 +272 -191
- data/MIT-LICENSE +1 -1
- data/README +6 -19
- data/Rakefile +24 -71
- data/bin/rails +1 -0
- data/builtin/rails_info/rails/info.rb +12 -8
- data/configs/databases/mysql.yml +3 -0
- data/configs/initializers/backtrace_silencers.rb +7 -0
- data/configs/initializers/new_rails_defaults.rb +2 -0
- data/configs/initializers/session_store.rb +15 -0
- data/dispatches/config.ru +7 -0
- data/doc/README_FOR_APP +2 -5
- data/environments/boot.rb +1 -0
- data/environments/environment.rb +14 -48
- data/environments/production.rb +11 -7
- data/environments/test.rb +6 -0
- data/helpers/application_controller.rb +10 -0
- data/helpers/test_helper.rb +1 -1
- data/html/500.html +0 -3
- data/html/index.html +1 -0
- data/lib/commands/about.rb +1 -1
- data/lib/commands/dbconsole.rb +18 -2
- data/lib/commands/plugin.rb +4 -3
- data/lib/commands/runner.rb +13 -7
- data/lib/commands/server.rb +98 -33
- data/lib/console_app.rb +4 -4
- data/lib/console_with_helpers.rb +2 -23
- data/lib/dispatcher.rb +1 -1
- data/lib/fcgi_handler.rb +12 -10
- data/lib/initializer.rb +108 -41
- data/lib/rails/backtrace_cleaner.rb +54 -0
- data/lib/rails/gem_dependency.rb +124 -94
- data/lib/rails/plugin.rb +49 -6
- data/lib/rails/plugin/loader.rb +66 -27
- data/lib/rails/plugin/locator.rb +1 -1
- data/lib/rails/rack.rb +3 -1
- data/lib/rails/rack/debugger.rb +21 -0
- data/lib/rails/rack/log_tailer.rb +35 -0
- data/lib/rails/rack/metal.rb +51 -0
- data/lib/rails/rack/static.rb +15 -4
- data/lib/rails/version.rb +2 -2
- data/lib/rails_generator/base.rb +3 -0
- data/lib/rails_generator/commands.rb +8 -3
- data/lib/rails_generator/generators/applications/app/app_generator.rb +210 -136
- data/lib/rails_generator/generators/applications/app/scm/git.rb +16 -0
- data/lib/rails_generator/generators/applications/app/scm/scm.rb +8 -0
- data/lib/rails_generator/generators/applications/app/scm/svn.rb +7 -0
- data/lib/rails_generator/generators/applications/app/template_runner.rb +401 -0
- data/lib/rails_generator/generators/components/controller/USAGE +12 -11
- data/lib/rails_generator/generators/components/controller/controller_generator.rb +7 -1
- data/lib/rails_generator/generators/components/controller/templates/helper_test.rb +4 -0
- data/lib/rails_generator/generators/components/helper/USAGE +24 -0
- data/lib/rails_generator/generators/components/helper/helper_generator.rb +25 -0
- data/lib/rails_generator/generators/components/helper/templates/helper.rb +2 -0
- data/lib/rails_generator/generators/components/helper/templates/helper_test.rb +4 -0
- data/lib/rails_generator/generators/components/metal/USAGE +8 -0
- data/lib/rails_generator/generators/components/metal/metal_generator.rb +8 -0
- data/lib/rails_generator/generators/components/metal/templates/metal.rb +12 -0
- data/lib/rails_generator/generators/components/resource/USAGE +2 -2
- data/lib/rails_generator/generators/components/resource/resource_generator.rb +2 -0
- data/lib/rails_generator/generators/components/resource/templates/helper_test.rb +4 -0
- data/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +2 -0
- data/lib/rails_generator/generators/components/scaffold/templates/controller.rb +1 -1
- data/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +4 -4
- data/lib/rails_generator/generators/components/scaffold/templates/helper_test.rb +4 -0
- data/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb +1 -1
- data/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +2 -2
- data/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +2 -2
- data/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +2 -2
- data/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb +1 -1
- data/lib/rails_generator/secret_key_generator.rb +2 -0
- data/lib/tasks/databases.rake +13 -6
- data/lib/tasks/documentation.rake +2 -9
- data/lib/tasks/framework.rake +26 -1
- data/lib/tasks/gems.rake +33 -48
- data/lib/tasks/middleware.rake +7 -0
- data/lib/tasks/misc.rake +7 -0
- data/lib/tasks/statistics.rake +0 -1
- data/lib/tasks/testing.rake +5 -5
- data/lib/tasks/tmp.rake +2 -2
- data/lib/test_help.rb +16 -8
- metadata +92 -159
- data/bin/performance/request +0 -3
- data/bin/process/inspector +0 -3
- data/bin/process/reaper +0 -3
- data/bin/process/spawner +0 -3
- data/config.ru +0 -17
- data/configs/apache.conf +0 -40
- data/configs/lighttpd.conf +0 -54
- data/doc/guides/html/2_2_release_notes.html +0 -1185
- data/doc/guides/html/actioncontroller_basics.html +0 -1270
- data/doc/guides/html/activerecord_validations_callbacks.html +0 -749
- data/doc/guides/html/association_basics.html +0 -2585
- data/doc/guides/html/authors.html +0 -240
- data/doc/guides/html/benchmarking_and_profiling.html +0 -1018
- data/doc/guides/html/caching_with_rails.html +0 -583
- data/doc/guides/html/command_line.html +0 -434
- data/doc/guides/html/configuring.html +0 -438
- data/doc/guides/html/creating_plugins.html +0 -1594
- data/doc/guides/html/debugging_rails_applications.html +0 -1175
- data/doc/guides/html/finders.html +0 -1090
- data/doc/guides/html/form_helpers.html +0 -638
- data/doc/guides/html/getting_started_with_rails.html +0 -2066
- data/doc/guides/html/index.html +0 -349
- data/doc/guides/html/layouts_and_rendering.html +0 -1406
- data/doc/guides/html/migrations.html +0 -921
- data/doc/guides/html/routing_outside_in.html +0 -2213
- data/doc/guides/html/security.html +0 -1346
- data/doc/guides/html/testing_rails_applications.html +0 -1859
- data/doc/guides/source/2_2_release_notes.txt +0 -435
- data/doc/guides/source/actioncontroller_basics/changelog.txt +0 -5
- data/doc/guides/source/actioncontroller_basics/cookies.txt +0 -34
- data/doc/guides/source/actioncontroller_basics/csrf.txt +0 -32
- data/doc/guides/source/actioncontroller_basics/filters.txt +0 -119
- data/doc/guides/source/actioncontroller_basics/http_auth.txt +0 -24
- data/doc/guides/source/actioncontroller_basics/index.txt +0 -40
- data/doc/guides/source/actioncontroller_basics/introduction.txt +0 -9
- data/doc/guides/source/actioncontroller_basics/methods.txt +0 -39
- data/doc/guides/source/actioncontroller_basics/parameter_filtering.txt +0 -14
- data/doc/guides/source/actioncontroller_basics/params.txt +0 -93
- data/doc/guides/source/actioncontroller_basics/request_response_objects.txt +0 -43
- data/doc/guides/source/actioncontroller_basics/rescue.txt +0 -67
- data/doc/guides/source/actioncontroller_basics/session.txt +0 -187
- data/doc/guides/source/actioncontroller_basics/streaming.txt +0 -91
- data/doc/guides/source/actioncontroller_basics/verification.txt +0 -40
- data/doc/guides/source/active_record_basics.txt +0 -181
- data/doc/guides/source/activerecord_validations_callbacks.txt +0 -404
- data/doc/guides/source/association_basics.txt +0 -1840
- data/doc/guides/source/authors.txt +0 -39
- data/doc/guides/source/benchmarking_and_profiling/appendix.txt +0 -95
- data/doc/guides/source/benchmarking_and_profiling/digging_deeper.txt +0 -105
- data/doc/guides/source/benchmarking_and_profiling/edge_rails_features.txt +0 -185
- data/doc/guides/source/benchmarking_and_profiling/gameplan.txt +0 -27
- data/doc/guides/source/benchmarking_and_profiling/index.txt +0 -242
- data/doc/guides/source/benchmarking_and_profiling/rubyprof.txt +0 -179
- data/doc/guides/source/benchmarking_and_profiling/statistics.txt +0 -57
- data/doc/guides/source/caching_with_rails.txt +0 -367
- data/doc/guides/source/command_line.txt +0 -147
- data/doc/guides/source/configuring.txt +0 -225
- data/doc/guides/source/creating_plugins/acts_as_yaffle.txt +0 -191
- data/doc/guides/source/creating_plugins/appendix.txt +0 -46
- data/doc/guides/source/creating_plugins/controllers.txt +0 -59
- data/doc/guides/source/creating_plugins/core_ext.txt +0 -123
- data/doc/guides/source/creating_plugins/custom_route.txt +0 -69
- data/doc/guides/source/creating_plugins/gem.txt +0 -1
- data/doc/guides/source/creating_plugins/generator_method.txt +0 -89
- data/doc/guides/source/creating_plugins/helpers.txt +0 -51
- data/doc/guides/source/creating_plugins/index.txt +0 -52
- data/doc/guides/source/creating_plugins/migration_generator.txt +0 -156
- data/doc/guides/source/creating_plugins/models.txt +0 -76
- data/doc/guides/source/creating_plugins/odds_and_ends.txt +0 -69
- data/doc/guides/source/creating_plugins/test_setup.txt +0 -230
- data/doc/guides/source/debugging_rails_applications.txt +0 -733
- data/doc/guides/source/finders.txt +0 -668
- data/doc/guides/source/form_helpers.txt +0 -345
- data/doc/guides/source/getting_started_with_rails.txt +0 -1256
- data/doc/guides/source/images/belongs_to.png +0 -0
- data/doc/guides/source/images/bullet.gif +0 -0
- data/doc/guides/source/images/csrf.png +0 -0
- data/doc/guides/source/images/habtm.png +0 -0
- data/doc/guides/source/images/has_many.png +0 -0
- data/doc/guides/source/images/has_many_through.png +0 -0
- data/doc/guides/source/images/has_one.png +0 -0
- data/doc/guides/source/images/has_one_through.png +0 -0
- data/doc/guides/source/images/header_backdrop.png +0 -0
- data/doc/guides/source/images/icons/README +0 -5
- data/doc/guides/source/images/icons/callouts/1.png +0 -0
- data/doc/guides/source/images/icons/callouts/10.png +0 -0
- data/doc/guides/source/images/icons/callouts/11.png +0 -0
- data/doc/guides/source/images/icons/callouts/12.png +0 -0
- data/doc/guides/source/images/icons/callouts/13.png +0 -0
- data/doc/guides/source/images/icons/callouts/14.png +0 -0
- data/doc/guides/source/images/icons/callouts/15.png +0 -0
- data/doc/guides/source/images/icons/callouts/2.png +0 -0
- data/doc/guides/source/images/icons/callouts/3.png +0 -0
- data/doc/guides/source/images/icons/callouts/4.png +0 -0
- data/doc/guides/source/images/icons/callouts/5.png +0 -0
- data/doc/guides/source/images/icons/callouts/6.png +0 -0
- data/doc/guides/source/images/icons/callouts/7.png +0 -0
- data/doc/guides/source/images/icons/callouts/8.png +0 -0
- data/doc/guides/source/images/icons/callouts/9.png +0 -0
- data/doc/guides/source/images/icons/caution.png +0 -0
- data/doc/guides/source/images/icons/example.png +0 -0
- data/doc/guides/source/images/icons/home.png +0 -0
- data/doc/guides/source/images/icons/important.png +0 -0
- data/doc/guides/source/images/icons/next.png +0 -0
- data/doc/guides/source/images/icons/note.png +0 -0
- data/doc/guides/source/images/icons/prev.png +0 -0
- data/doc/guides/source/images/icons/tip.png +0 -0
- data/doc/guides/source/images/icons/up.png +0 -0
- data/doc/guides/source/images/icons/warning.png +0 -0
- data/doc/guides/source/images/polymorphic.png +0 -0
- data/doc/guides/source/images/rails_logo_remix.gif +0 -0
- data/doc/guides/source/images/ruby_on_rails_by_mike_rundle2.gif +0 -0
- data/doc/guides/source/images/session_fixation.png +0 -0
- data/doc/guides/source/index.txt +0 -118
- data/doc/guides/source/layouts_and_rendering.txt +0 -982
- data/doc/guides/source/migrations/anatomy_of_a_migration.txt +0 -85
- data/doc/guides/source/migrations/changelog.txt +0 -5
- data/doc/guides/source/migrations/creating_a_migration.txt +0 -109
- data/doc/guides/source/migrations/foreign_keys.txt +0 -8
- data/doc/guides/source/migrations/index.txt +0 -22
- data/doc/guides/source/migrations/rakeing_around.txt +0 -111
- data/doc/guides/source/migrations/scheming.txt +0 -47
- data/doc/guides/source/migrations/using_models_in_migrations.txt +0 -46
- data/doc/guides/source/migrations/writing_a_migration.txt +0 -159
- data/doc/guides/source/routing_outside_in.txt +0 -986
- data/doc/guides/source/security.txt +0 -984
- data/doc/guides/source/stylesheets/base.css +0 -358
- data/doc/guides/source/stylesheets/forms.css +0 -35
- data/doc/guides/source/stylesheets/more.css +0 -82
- data/doc/guides/source/templates/guides.html.erb +0 -97
- data/doc/guides/source/templates/inline.css +0 -165
- data/doc/guides/source/testing_rails_applications.txt +0 -995
- data/helpers/application.rb +0 -15
- data/lib/commands/performance/request.rb +0 -6
- data/lib/commands/process/inspector.rb +0 -68
- data/lib/commands/process/reaper.rb +0 -149
- data/lib/commands/process/spawner.rb +0 -219
- data/lib/commands/process/spinner.rb +0 -57
- data/lib/commands/servers/base.rb +0 -31
- data/lib/commands/servers/lighttpd.rb +0 -94
- data/lib/commands/servers/mongrel.rb +0 -69
- data/lib/commands/servers/new_mongrel.rb +0 -16
- data/lib/commands/servers/thin.rb +0 -25
- data/lib/commands/servers/webrick.rb +0 -66
- data/lib/rails/mongrel_server/commands.rb +0 -342
- data/lib/rails/mongrel_server/handler.rb +0 -55
- data/lib/rails/rack/logger.rb +0 -28
data/MIT-LICENSE
CHANGED
data/README
CHANGED
@@ -36,32 +36,19 @@ link:files/vendor/rails/actionpack/README.html.
|
|
36
36
|
|
37
37
|
== Web Servers
|
38
38
|
|
39
|
-
By default, Rails will try to use Mongrel
|
40
|
-
|
41
|
-
Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures
|
42
|
-
that you can always get up and running quickly.
|
39
|
+
By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails
|
40
|
+
with a variety of other web servers.
|
43
41
|
|
44
42
|
Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
|
45
43
|
suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
|
46
44
|
getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
|
47
45
|
More info at: http://mongrel.rubyforge.org
|
48
46
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from
|
53
|
-
http://www.lighttpd.net.
|
47
|
+
Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or
|
48
|
+
Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use
|
49
|
+
FCGI or proxy to a pack of Mongrels/Thin/Ebb servers.
|
54
50
|
|
55
|
-
|
56
|
-
web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not
|
57
|
-
for production.
|
58
|
-
|
59
|
-
But of course its also possible to run Rails on any platform that supports FCGI.
|
60
|
-
Apache, LiteSpeed, IIS are just a few. For more information on FCGI,
|
61
|
-
please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
|
62
|
-
|
63
|
-
|
64
|
-
== Apache .htaccess example
|
51
|
+
== Apache .htaccess example for FCGI/CGI
|
65
52
|
|
66
53
|
# General Apache options
|
67
54
|
AddHandler fastcgi-script .fcgi
|
data/Rakefile
CHANGED
@@ -28,7 +28,8 @@ task :default => :test
|
|
28
28
|
## we can see the failures
|
29
29
|
task :test do
|
30
30
|
Dir['test/**/*_test.rb'].all? do |file|
|
31
|
-
|
31
|
+
ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
|
32
|
+
system(ruby, '-Itest', file)
|
32
33
|
end or raise "Failures"
|
33
34
|
end
|
34
35
|
|
@@ -45,7 +46,6 @@ BASE_DIRS = %w(
|
|
45
46
|
config/environments
|
46
47
|
config/initializers
|
47
48
|
config/locales
|
48
|
-
components
|
49
49
|
db
|
50
50
|
doc
|
51
51
|
log
|
@@ -54,7 +54,6 @@ BASE_DIRS = %w(
|
|
54
54
|
public
|
55
55
|
script
|
56
56
|
script/performance
|
57
|
-
script/process
|
58
57
|
test
|
59
58
|
vendor
|
60
59
|
vendor/plugins
|
@@ -72,7 +71,7 @@ LOG_FILES = %w( server.log development.log test.log production.log )
|
|
72
71
|
HTML_FILES = %w( 422.html 404.html 500.html index.html robots.txt favicon.ico images/rails.png
|
73
72
|
javascripts/prototype.js javascripts/application.js
|
74
73
|
javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
|
75
|
-
BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler
|
74
|
+
BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler runner server plugin )
|
76
75
|
|
77
76
|
VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport activeresource railties )
|
78
77
|
|
@@ -175,9 +174,6 @@ task :copy_dispatches do
|
|
175
174
|
|
176
175
|
copy_with_rewritten_ruby_path("dispatches/dispatch.fcgi", "#{PKG_DESTINATION}/public/dispatch.fcgi")
|
177
176
|
chmod 0755, "#{PKG_DESTINATION}/public/dispatch.fcgi"
|
178
|
-
|
179
|
-
# copy_with_rewritten_ruby_path("dispatches/gateway.cgi", "#{PKG_DESTINATION}/public/gateway.cgi")
|
180
|
-
# chmod 0755, "#{PKG_DESTINATION}/public/gateway.cgi"
|
181
177
|
end
|
182
178
|
|
183
179
|
task :copy_html_files do
|
@@ -185,7 +181,7 @@ task :copy_html_files do
|
|
185
181
|
end
|
186
182
|
|
187
183
|
task :copy_application do
|
188
|
-
cp "helpers/
|
184
|
+
cp "helpers/application_controller.rb", "#{PKG_DESTINATION}/app/controllers/application_controller.rb"
|
189
185
|
cp "helpers/application_helper.rb", "#{PKG_DESTINATION}/app/helpers/application_helper.rb"
|
190
186
|
end
|
191
187
|
|
@@ -197,8 +193,10 @@ task :copy_configs do
|
|
197
193
|
|
198
194
|
cp "configs/routes.rb", "#{PKG_DESTINATION}/config/routes.rb"
|
199
195
|
|
200
|
-
cp "configs/initializers/
|
201
|
-
cp "configs/initializers/
|
196
|
+
cp "configs/initializers/backtrace_silencers.rb", "#{PKG_DESTINATION}/config/initializers/backtrace_silencers.rb"
|
197
|
+
cp "configs/initializers/inflections.rb", "#{PKG_DESTINATION}/config/initializers/inflections.rb"
|
198
|
+
cp "configs/initializers/mime_types.rb", "#{PKG_DESTINATION}/config/initializers/mime_types.rb"
|
199
|
+
cp "configs/initializers/new_rails_defaults.rb", "#{PKG_DESTINATION}/config/initializers/new_rails_defaults.rb"
|
202
200
|
|
203
201
|
cp "configs/locales/en.yml", "#{PKG_DESTINATION}/config/locales/en.yml"
|
204
202
|
|
@@ -247,6 +245,11 @@ def copy_with_rewritten_ruby_path(src_file, dest_file)
|
|
247
245
|
end
|
248
246
|
end
|
249
247
|
|
248
|
+
desc 'Generate guides (for authors), use ONLY=foo to process just "foo.textile"'
|
249
|
+
task :guides do
|
250
|
+
ruby "guides/rails_guides.rb"
|
251
|
+
end
|
252
|
+
|
250
253
|
|
251
254
|
# Generate documentation ------------------------------------------------------------------
|
252
255
|
|
@@ -275,59 +278,6 @@ Rake::RDocTask.new { |rdoc|
|
|
275
278
|
rdoc.rdoc_files.include('lib/commands/**/*.rb')
|
276
279
|
}
|
277
280
|
|
278
|
-
desc "Generate guides for the framework"
|
279
|
-
task :guides do
|
280
|
-
require 'mizuho/generator'
|
281
|
-
|
282
|
-
source = "doc/guides/source/"
|
283
|
-
html = "doc/guides/html/"
|
284
|
-
FileUtils.rm_r(html) if File.directory?(html)
|
285
|
-
FileUtils.mkdir(html)
|
286
|
-
|
287
|
-
template = File.expand_path("doc/guides/source/templates/guides.html.erb")
|
288
|
-
|
289
|
-
ignore = ['..', 'icons', 'images', 'templates', 'stylesheets']
|
290
|
-
ignore << 'active_record_basics.txt'
|
291
|
-
|
292
|
-
indexless = ['index.txt', 'authors.txt']
|
293
|
-
|
294
|
-
# Traverse all entries in doc/guides/source/
|
295
|
-
Dir.entries(source).each do |entry|
|
296
|
-
next if ignore.include?(entry)
|
297
|
-
|
298
|
-
if File.directory?(File.join(source, entry))
|
299
|
-
# If the current entry is a directory, then we will want to compile
|
300
|
-
# the 'index.txt' file inside this directory.
|
301
|
-
if entry == '.'
|
302
|
-
input = File.join(source, 'index.txt')
|
303
|
-
output = File.join(html, "index.html")
|
304
|
-
else
|
305
|
-
input = File.join(source, entry, 'index.txt')
|
306
|
-
output = File.join(html, "#{entry}.html")
|
307
|
-
end
|
308
|
-
else
|
309
|
-
# If the current entry is a file, then we will want to compile this file.
|
310
|
-
input = File.join(source, entry)
|
311
|
-
output = File.join(html, entry).sub(/\.txt$/, '.html')
|
312
|
-
end
|
313
|
-
|
314
|
-
begin
|
315
|
-
puts "GENERATING => #{output}"
|
316
|
-
ENV['MANUALSONRAILS_TOC'] = 'no' if indexless.include?(entry)
|
317
|
-
Mizuho::Generator.new(input, :output => output, :template => template).start
|
318
|
-
rescue Mizuho::GenerationError
|
319
|
-
STDERR.puts "*** ERROR"
|
320
|
-
exit 2
|
321
|
-
ensure
|
322
|
-
ENV.delete('MANUALSONRAILS_TOC')
|
323
|
-
end
|
324
|
-
end
|
325
|
-
|
326
|
-
# Copy images and css files to html directory. These dirs are in .gitigore and shouldn't be source controlled.
|
327
|
-
FileUtils.cp_r File.join(source, 'images'), File.join(html, 'images')
|
328
|
-
FileUtils.cp_r File.join(source, 'stylesheets'), File.join(html, 'stylesheets')
|
329
|
-
end
|
330
|
-
|
331
281
|
# Generate GEM ----------------------------------------------------------------------------
|
332
282
|
|
333
283
|
task :copy_gem_environment do
|
@@ -361,11 +311,11 @@ spec = Gem::Specification.new do |s|
|
|
361
311
|
EOF
|
362
312
|
|
363
313
|
s.add_dependency('rake', '>= 0.8.3')
|
364
|
-
s.add_dependency('activesupport', '= 2.2
|
365
|
-
s.add_dependency('activerecord', '= 2.2
|
366
|
-
s.add_dependency('actionpack', '= 2.2
|
367
|
-
s.add_dependency('actionmailer', '= 2.2
|
368
|
-
s.add_dependency('activeresource', '= 2.2
|
314
|
+
s.add_dependency('activesupport', '= 2.3.2' + PKG_BUILD)
|
315
|
+
s.add_dependency('activerecord', '= 2.3.2' + PKG_BUILD)
|
316
|
+
s.add_dependency('actionpack', '= 2.3.2' + PKG_BUILD)
|
317
|
+
s.add_dependency('actionmailer', '= 2.3.2' + PKG_BUILD)
|
318
|
+
s.add_dependency('activeresource', '= 2.3.2' + PKG_BUILD)
|
369
319
|
|
370
320
|
s.rdoc_options << '--exclude' << '.'
|
371
321
|
s.has_rdoc = false
|
@@ -394,9 +344,12 @@ task :pgem => [:gem] do
|
|
394
344
|
`ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
|
395
345
|
end
|
396
346
|
|
397
|
-
desc "Publish the
|
398
|
-
task :
|
399
|
-
|
347
|
+
desc "Publish the guides"
|
348
|
+
task :pguides => :guides do
|
349
|
+
mkdir_p 'pkg'
|
350
|
+
`tar -czf pkg/guides.gz guides/output`
|
351
|
+
Rake::SshFilePublisher.new("web.rubyonrails.org", "/u/sites/guides.rubyonrails.org/public", "pkg", "guides.gz").upload
|
352
|
+
`ssh web.rubyonrails.org 'cd /u/sites/guides.rubyonrails.org/public/ && tar -xvzf guides.gz && mv guides/output/* . && rm -rf guides*'`
|
400
353
|
end
|
401
354
|
|
402
355
|
desc "Publish the release files to RubyForge."
|
data/bin/rails
CHANGED
@@ -20,13 +20,13 @@ module Rails
|
|
20
20
|
rescue Exception
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def frameworks
|
24
24
|
%w( active_record action_pack active_resource action_mailer active_support )
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
28
|
-
require "#{
|
29
|
-
"#{
|
27
|
+
def framework_version(framework)
|
28
|
+
require "#{framework}/version"
|
29
|
+
"#{framework.classify}::VERSION::STRING".constantize
|
30
30
|
end
|
31
31
|
|
32
32
|
def edge_rails_revision(info = git_info)
|
@@ -85,16 +85,20 @@ module Rails
|
|
85
85
|
Gem::RubyGemsVersion
|
86
86
|
end
|
87
87
|
|
88
|
+
property 'Rack version' do
|
89
|
+
::Rack.release
|
90
|
+
end
|
91
|
+
|
88
92
|
# The Rails version.
|
89
93
|
property 'Rails version' do
|
90
94
|
Rails::VERSION::STRING
|
91
95
|
end
|
92
96
|
|
93
|
-
# Versions of each Rails
|
97
|
+
# Versions of each Rails framework (Active Record, Action Pack,
|
94
98
|
# Active Resource, Action Mailer, and Active Support).
|
95
|
-
|
96
|
-
property "#{
|
97
|
-
|
99
|
+
frameworks.each do |framework|
|
100
|
+
property "#{framework.titlecase} version" do
|
101
|
+
framework_version(framework)
|
98
102
|
end
|
99
103
|
end
|
100
104
|
|
data/configs/databases/mysql.yml
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
development:
|
18
18
|
adapter: mysql
|
19
19
|
encoding: utf8
|
20
|
+
reconnect: false
|
20
21
|
database: <%= app_name %>_development
|
21
22
|
pool: 5
|
22
23
|
username: root
|
@@ -33,6 +34,7 @@ development:
|
|
33
34
|
test:
|
34
35
|
adapter: mysql
|
35
36
|
encoding: utf8
|
37
|
+
reconnect: false
|
36
38
|
database: <%= app_name %>_test
|
37
39
|
pool: 5
|
38
40
|
username: root
|
@@ -46,6 +48,7 @@ test:
|
|
46
48
|
production:
|
47
49
|
adapter: mysql
|
48
50
|
encoding: utf8
|
51
|
+
reconnect: false
|
49
52
|
database: <%= app_name %>_production
|
50
53
|
pool: 5
|
51
54
|
username: root
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying cookie session data integrity.
|
4
|
+
# If you change this key, all old sessions will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
ActionController::Base.session = {
|
8
|
+
:key => '_<%= app_name %>_session',
|
9
|
+
:secret => '<%= app_secret %>'
|
10
|
+
}
|
11
|
+
|
12
|
+
# Use the database for sessions instead of the cookie-based default,
|
13
|
+
# which shouldn't be used to store highly confidential information
|
14
|
+
# (create the session table with "rake db:sessions:create")
|
15
|
+
# ActionController::Base.session_store = :active_record_store
|
data/doc/README_FOR_APP
CHANGED
@@ -1,5 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* Install source-highlighter (http://www.gnu.org/software/src-highlite/source-highlight.html)
|
4
|
-
* Install the mizuho gem (http://github.com/FooBarWidget/mizuho/tree/master)
|
5
|
-
* Run `rake guides` from the railties directory
|
1
|
+
Use this README file to introduce your application and point to useful places in the API for learning more.
|
2
|
+
Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
|
data/environments/boot.rb
CHANGED
data/environments/environment.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file
|
2
2
|
|
3
|
-
# Uncomment below to force Rails into production mode when
|
4
|
-
# you don't control web/app server and can't set it the proper way
|
5
|
-
# ENV['RAILS_ENV'] ||= 'production'
|
6
|
-
|
7
3
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
4
|
<%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION
|
9
5
|
|
@@ -14,62 +10,32 @@ Rails::Initializer.run do |config|
|
|
14
10
|
# Settings in config/environments/* take precedence over those specified here.
|
15
11
|
# Application configuration should go into files in config/initializers
|
16
12
|
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
# See Rails::Configuration for more options.
|
18
13
|
|
19
|
-
#
|
20
|
-
#
|
21
|
-
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
|
14
|
+
# Add additional load paths for your own custom dirs
|
15
|
+
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
22
16
|
|
23
|
-
# Specify gems that this application depends on
|
24
|
-
# They can then be installed with "rake gems:install" on new installations.
|
25
|
-
# You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
|
17
|
+
# Specify gems that this application depends on and have them installed with rake gems:install
|
26
18
|
# config.gem "bj"
|
27
19
|
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
|
28
20
|
# config.gem "sqlite3-ruby", :lib => "sqlite3"
|
29
21
|
# config.gem "aws-s3", :lib => "aws/s3"
|
30
22
|
|
31
|
-
# Only load the plugins named here, in the order given
|
32
|
-
# in vendor/plugins are loaded in alphabetical order.
|
23
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
33
24
|
# :all can be used as a placeholder for all plugins not explicitly named
|
34
25
|
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
35
26
|
|
36
|
-
#
|
37
|
-
#
|
27
|
+
# Skip frameworks you're not going to use. To use Rails without a database,
|
28
|
+
# you must remove the Active Record framework.
|
29
|
+
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
|
38
30
|
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# config.log_level = :debug
|
31
|
+
# Activate observers that should always be running
|
32
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
42
33
|
|
43
|
-
#
|
44
|
-
#
|
45
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
|
34
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
35
|
+
# Run "rake -D time" for a list of tasks for finding time zone names.
|
46
36
|
config.time_zone = 'UTC'
|
47
37
|
|
48
|
-
# The
|
49
|
-
#
|
50
|
-
# config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
|
38
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
39
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
|
51
40
|
# config.i18n.default_locale = :de
|
52
|
-
|
53
|
-
# Your secret key for verifying cookie session data integrity.
|
54
|
-
# If you change this key, all old sessions will become invalid!
|
55
|
-
# Make sure the secret is at least 30 characters and all random,
|
56
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
57
|
-
config.action_controller.session = {
|
58
|
-
:session_key => '_<%= app_name %>_session',
|
59
|
-
:secret => '<%= app_secret %>'
|
60
|
-
}
|
61
|
-
|
62
|
-
# Use the database for sessions instead of the cookie-based default,
|
63
|
-
# which shouldn't be used to store highly confidential information
|
64
|
-
# (create the session table with "rake db:sessions:create")
|
65
|
-
# config.action_controller.session_store = :active_record_store
|
66
|
-
|
67
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
68
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
69
|
-
# like if you have constraints or database-specific column types
|
70
|
-
# config.active_record.schema_format = :sql
|
71
|
-
|
72
|
-
# Activate observers that should always be running
|
73
|
-
# Please note that observers generated using script/generate observer need to have an _observer suffix
|
74
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
75
|
-
end
|
41
|
+
end
|
data/environments/production.rb
CHANGED
@@ -4,21 +4,25 @@
|
|
4
4
|
# Code is not reloaded between requests
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
|
-
# Enable threaded mode
|
8
|
-
# config.threadsafe!
|
9
|
-
|
10
|
-
# Use a different logger for distributed setups
|
11
|
-
# config.logger = SyslogLogger.new
|
12
|
-
|
13
7
|
# Full error reports are disabled and caching is turned on
|
14
8
|
config.action_controller.consider_all_requests_local = false
|
15
9
|
config.action_controller.perform_caching = true
|
10
|
+
config.action_view.cache_template_loading = true
|
11
|
+
|
12
|
+
# See everything in the log (default is :info)
|
13
|
+
# config.log_level = :debug
|
14
|
+
|
15
|
+
# Use a different logger for distributed setups
|
16
|
+
# config.logger = SyslogLogger.new
|
16
17
|
|
17
18
|
# Use a different cache store in production
|
18
19
|
# config.cache_store = :mem_cache_store
|
19
20
|
|
20
21
|
# Enable serving of images, stylesheets, and javascripts from an asset server
|
21
|
-
# config.action_controller.asset_host
|
22
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
22
23
|
|
23
24
|
# Disable delivery errors, bad email addresses will be ignored
|
24
25
|
# config.action_mailer.raise_delivery_errors = false
|
26
|
+
|
27
|
+
# Enable threaded mode
|
28
|
+
# config.threadsafe!
|