passenger 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/DEVELOPERS.TXT +13 -3
- data/Rakefile +42 -33
- data/bin/passenger-install-apache2-module +1 -2
- data/bin/passenger-install-nginx-module +7 -19
- data/bin/passenger-status +64 -15
- data/bin/passenger-stress-test +2 -2
- data/doc/ApplicationPool algorithm.txt +26 -22
- data/doc/Users guide Apache.html +374 -149
- data/doc/Users guide Apache.txt +318 -51
- data/doc/Users guide Nginx.html +13 -13
- data/doc/Users guide Nginx.txt +7 -2
- data/doc/cxxapi/Bucket_8h-source.html +62 -25
- data/doc/cxxapi/Configuration_8h-source.html +343 -326
- data/doc/cxxapi/DirectoryMapper_8h-source.html +12 -12
- data/doc/cxxapi/Hooks_8h-source.html +1 -1
- data/doc/cxxapi/annotated.html +1 -1
- data/doc/cxxapi/classHooks-members.html +1 -1
- data/doc/cxxapi/classHooks.html +1 -1
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +2 -2
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +9 -9
- data/doc/cxxapi/classes.html +1 -1
- data/doc/cxxapi/definitions_8h-source.html +1 -1
- data/doc/cxxapi/files.html +1 -1
- data/doc/cxxapi/functions.html +2 -2
- data/doc/cxxapi/functions_func.html +2 -2
- data/doc/cxxapi/graph_legend.html +1 -1
- data/doc/cxxapi/group__Configuration.html +1 -1
- data/doc/cxxapi/group__Core.html +1 -1
- data/doc/cxxapi/group__Hooks.html +1 -1
- data/doc/cxxapi/group__Support.html +1 -1
- data/doc/cxxapi/main.html +1 -1
- data/doc/cxxapi/modules.html +1 -1
- data/doc/rdoc/classes/ConditionVariable.html +194 -0
- data/doc/rdoc/classes/Exception.html +120 -0
- data/doc/rdoc/classes/GC.html +113 -0
- data/doc/rdoc/classes/IO.html +169 -0
- data/doc/rdoc/classes/PhusionPassenger.html +238 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +517 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +719 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +598 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +317 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +138 -0
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +154 -0
- data/doc/rdoc/classes/PhusionPassenger/Application.html +283 -0
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +175 -0
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +489 -0
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +350 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +188 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +194 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +95 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +442 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +200 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +436 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +155 -0
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +402 -0
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +805 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +188 -0
- data/doc/rdoc/classes/PlatformInfo.html +831 -0
- data/doc/rdoc/classes/RakeExtensions.html +197 -0
- data/doc/rdoc/classes/Signal.html +131 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/DEVELOPERS_TXT.html +255 -0
- data/doc/rdoc/files/README.html +157 -0
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +92 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +131 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +134 -0
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +133 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +143 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +145 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +161 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +175 -0
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +129 -0
- data/doc/rdoc/files/misc/rake/extensions_rb.html +130 -0
- data/doc/rdoc/fr_class_index.html +90 -0
- data/doc/rdoc/fr_file_index.html +76 -0
- data/doc/rdoc/fr_method_index.html +200 -0
- data/doc/rdoc/index.html +26 -0
- data/doc/rdoc/rdoc-style.css +187 -0
- data/doc/users_guide_snippets/rackup_specifications.txt +2 -8
- data/ext/apache2/Bucket.cpp +71 -38
- data/ext/apache2/Bucket.h +53 -16
- data/ext/apache2/Configuration.cpp +15 -0
- data/ext/apache2/Configuration.h +19 -2
- data/ext/apache2/DirectoryMapper.h +10 -10
- data/ext/apache2/Hooks.cpp +334 -74
- data/ext/boost/mpl/apply.hpp +5 -1
- data/ext/boost/mpl/apply_wrap.hpp +5 -2
- data/ext/boost/mpl/aux_/full_lambda.hpp +5 -1
- data/ext/boost/mpl/bind.hpp +5 -1
- data/ext/common/Application.h +11 -31
- data/ext/common/ApplicationPool.h +2 -1
- data/ext/common/ApplicationPoolServer.h +61 -20
- data/ext/common/ApplicationPoolServerExecutable.cpp +132 -4
- data/ext/common/ApplicationPoolStatusReporter.h +189 -65
- data/ext/common/Base64.cpp +143 -0
- data/ext/common/Base64.h +57 -0
- data/ext/common/CachedFileStat.cpp +25 -82
- data/ext/common/CachedFileStat.h +11 -125
- data/ext/common/CachedFileStat.hpp +243 -0
- data/ext/common/Exceptions.h +13 -0
- data/ext/common/FileChangeChecker.h +209 -0
- data/ext/common/Logging.h +3 -2
- data/ext/common/MessageChannel.h +10 -10
- data/ext/common/PoolOptions.h +72 -5
- data/ext/common/SpawnManager.h +11 -8
- data/ext/common/StandardApplicationPool.h +38 -39
- data/ext/common/StaticString.h +1 -0
- data/ext/common/StringListCreator.h +83 -0
- data/ext/common/SystemTime.h +3 -2
- data/ext/common/Timer.h +88 -0
- data/ext/common/Utils.cpp +161 -42
- data/ext/common/Utils.h +62 -31
- data/ext/common/Version.h +1 -1
- data/ext/nginx/Configuration.c +0 -4
- data/ext/nginx/ContentHandler.c +8 -6
- data/ext/nginx/HelperServer.cpp +45 -55
- data/ext/nginx/HttpStatusExtractor.h +4 -0
- data/ext/nginx/StaticContentHandler.c +25 -5
- data/ext/nginx/config +3 -0
- data/ext/nginx/ngx_http_passenger_module.c +72 -17
- data/ext/nginx/ngx_http_passenger_module.h +2 -2
- data/lib/phusion_passenger/abstract_request_handler.rb +15 -7
- data/lib/phusion_passenger/abstract_server.rb +16 -2
- data/lib/phusion_passenger/admin_tools/control_process.rb +36 -25
- data/lib/phusion_passenger/constants.rb +1 -1
- data/lib/phusion_passenger/dependencies.rb +10 -0
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/rack/application_spawner.rb +21 -2
- data/lib/phusion_passenger/rack/request_handler.rb +10 -0
- data/lib/phusion_passenger/railz/application_spawner.rb +38 -2
- data/lib/phusion_passenger/railz/framework_spawner.rb +26 -28
- data/lib/phusion_passenger/railz/request_handler.rb +5 -1
- data/lib/phusion_passenger/spawn_manager.rb +6 -2
- data/lib/phusion_passenger/utils.rb +79 -27
- data/misc/rake/cplusplus.rb +5 -5
- data/test/ApplicationPoolServerTest.cpp +42 -0
- data/test/ApplicationPoolTest.cpp +255 -267
- data/test/Base64Test.cpp +48 -0
- data/test/CachedFileStatTest.cpp +243 -103
- data/test/FileChangeCheckerTest.cpp +331 -0
- data/test/PoolOptionsTest.cpp +80 -0
- data/test/UtilsTest.cpp +5 -17
- data/test/integration_tests/apache2_tests.rb +15 -4
- data/test/integration_tests/mycook_spec.rb +3 -4
- data/test/oxt/syscall_interruption_test.cpp +2 -14
- data/test/ruby/abstract_server_collection_spec.rb +1 -1
- data/test/ruby/abstract_server_spec.rb +35 -1
- data/test/ruby/rack/application_spawner_spec.rb +23 -6
- data/test/ruby/rails/application_spawner_spec.rb +6 -6
- data/test/ruby/rails/framework_spawner_spec.rb +6 -5
- data/test/ruby/rails/minimal_spawner_spec.rb +19 -0
- data/test/ruby/rails/spawner_error_handling_spec.rb +62 -7
- data/test/ruby/spawn_manager_spec.rb +10 -7
- data/test/ruby/spawn_server_spec.rb +1 -1
- data/test/ruby/utils_spec.rb +193 -20
- data/test/ruby/wsgi/application_spawner_spec.rb +3 -1
- data/test/stub/apache2/httpd.conf.erb +3 -0
- data/test/stub/rack/config.ru +1 -1
- data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
- data/test/support/Support.cpp +84 -0
- data/test/support/Support.h +66 -8
- data/test/support/config.rb +14 -2
- data/test/support/test_helper.rb +5 -0
- data/vendor/rack-1.0.0-git/lib/rack/auth/openid.rb +123 -116
- data/vendor/rack-1.0.0-git/lib/rack/cascade.rb +17 -12
- data/vendor/rack-1.0.0-git/lib/rack/commonlogger.rb +34 -43
- data/vendor/rack-1.0.0-git/lib/rack/handler/cgi.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/fastcgi.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/lsws.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/mongrel.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/scgi.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/webrick.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/mock.rb +4 -17
- data/vendor/rack-1.0.0-git/lib/rack/request.rb +3 -9
- data/vendor/rack-1.0.0-git/lib/rack/rewindable_input.rb +2 -0
- data/vendor/rack-1.0.0-git/lib/rack/utils.rb +38 -12
- metadata +231 -186
- data/ext/common/FileChecker.h +0 -112
- data/test/FileCheckerTest.cpp +0 -79
- data/test/stub/minimal-railsapp/README +0 -3
- data/test/stub/minimal-railsapp/config/application.rb +0 -0
- data/test/stub/minimal-railsapp/config/environment.rb +0 -3
- data/test/stub/minimal-railsapp/vendor/rails/actionmailer/lib/action_mailer.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_controller.rb +0 -10
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_pack.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_view.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activerecord/lib/active_record.rb +0 -7
- data/test/stub/minimal-railsapp/vendor/rails/activeresource/lib/active_resource.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support.rb +0 -17
- data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/dispatcher.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/initializer.rb +0 -8
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/ruby_version_check.rb +0 -1
- data/test/stub/railsapp/app/controllers/application.rb +0 -12
- data/test/stub/railsapp/app/controllers/bar_controller.rb +0 -5
- data/test/stub/railsapp/app/controllers/bar_controller_1.txt +0 -5
- data/test/stub/railsapp/app/controllers/bar_controller_2.txt +0 -5
- data/test/stub/railsapp/app/controllers/foo_controller.rb +0 -9
- data/test/stub/railsapp/app/helpers/application_helper.rb +0 -3
- data/test/stub/railsapp/config/boot.rb +0 -108
- data/test/stub/railsapp/config/database.yml +0 -19
- data/test/stub/railsapp/config/environment.rb +0 -59
- data/test/stub/railsapp/config/environments/development.rb +0 -18
- data/test/stub/railsapp/config/environments/production.rb +0 -19
- data/test/stub/railsapp/config/initializers/inflections.rb +0 -10
- data/test/stub/railsapp/config/initializers/mime_types.rb +0 -5
- data/test/stub/railsapp/config/routes.rb +0 -35
- data/test/stub/railsapp/public/useless.txt +0 -1
- data/test/stub/railsapp2/app/controllers/application.rb +0 -12
- data/test/stub/railsapp2/app/controllers/foo_controller.rb +0 -5
- data/test/stub/railsapp2/app/helpers/application_helper.rb +0 -3
- data/test/stub/railsapp2/config/boot.rb +0 -108
- data/test/stub/railsapp2/config/database.yml +0 -19
- data/test/stub/railsapp2/config/environment.rb +0 -59
- data/test/stub/railsapp2/config/environments/development.rb +0 -18
- data/test/stub/railsapp2/config/environments/production.rb +0 -19
- data/test/stub/railsapp2/config/initializers/inflections.rb +0 -10
- data/test/stub/railsapp2/config/initializers/mime_types.rb +0 -5
- data/test/stub/railsapp2/config/routes.rb +0 -35
- data/test/stub/railsapp2/public/useless.txt +0 -1
@@ -1,59 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file
|
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
|
-
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
-
RAILS_GEM_VERSION = '~> 2.0.0' unless defined? RAILS_GEM_VERSION
|
9
|
-
|
10
|
-
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
12
|
-
|
13
|
-
Rails::Initializer.run do |config|
|
14
|
-
# Settings in config/environments/* take precedence over those specified here.
|
15
|
-
# Application configuration should go into files in config/initializers
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
# See Rails::Configuration for more options.
|
18
|
-
|
19
|
-
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
20
|
-
# To use Rails without a database, you must remove the Active Record framework
|
21
|
-
config.frameworks -= [ :active_record, :action_mailer, :active_resource ]
|
22
|
-
|
23
|
-
# Only load the plugins named here, in the order given. By default, all plugins
|
24
|
-
# in vendor/plugins are loaded in alphabetical order.
|
25
|
-
# :all can be used as a placeholder for all plugins not explicitly named
|
26
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
27
|
-
|
28
|
-
# Add additional load paths for your own custom dirs
|
29
|
-
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
30
|
-
|
31
|
-
# Force all environments to use the same logger level
|
32
|
-
# (by default production uses :info, the others :debug)
|
33
|
-
# config.log_level = :debug
|
34
|
-
|
35
|
-
# Your secret key for verifying cookie session data integrity.
|
36
|
-
# If you change this key, all old sessions will become invalid!
|
37
|
-
# Make sure the secret is at least 30 characters and all random,
|
38
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
39
|
-
config.action_controller.session = {
|
40
|
-
:session_key => '_railsapp_session',
|
41
|
-
:secret => '3b50a6869d4e48696e5d407cab7b390124b3d815b4a8ab3e452a6ae1972ce1dc9615db09977915b6715944170fec0d46847b5b8fbdb1a4634d5d7247e4db32c8'
|
42
|
-
}
|
43
|
-
|
44
|
-
# Use the database for sessions instead of the cookie-based default,
|
45
|
-
# which shouldn't be used to store highly confidential information
|
46
|
-
# (create the session table with 'rake db:sessions:create')
|
47
|
-
# config.action_controller.session_store = :active_record_store
|
48
|
-
|
49
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
50
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
51
|
-
# like if you have constraints or database-specific column types
|
52
|
-
# config.active_record.schema_format = :sql
|
53
|
-
|
54
|
-
# Activate observers that should always be running
|
55
|
-
# config.active_record.observers = :cacher, :garbage_collector
|
56
|
-
|
57
|
-
# Make Active Record use UTC-base instead of local time
|
58
|
-
# config.active_record.default_timezone = :utc
|
59
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
-
|
3
|
-
# In the development environment your application's code is reloaded on
|
4
|
-
# every request. This slows down response time but is perfect for development
|
5
|
-
# since you don't have to restart the webserver when you make code changes.
|
6
|
-
config.cache_classes = false
|
7
|
-
|
8
|
-
# Log error messages when you accidentally call methods on nil.
|
9
|
-
config.whiny_nils = true
|
10
|
-
|
11
|
-
# Show full error reports and disable caching
|
12
|
-
config.action_controller.consider_all_requests_local = true
|
13
|
-
config.action_view.debug_rjs = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
config.action_view.cache_template_extensions = false
|
16
|
-
|
17
|
-
# Don't care if the mailer can't send
|
18
|
-
config.action_mailer.raise_delivery_errors = false
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
-
|
3
|
-
# The production environment is meant for finished, "live" apps.
|
4
|
-
# Code is not reloaded between requests
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Use a different logger for distributed setups
|
8
|
-
# config.logger = SyslogLogger.new
|
9
|
-
|
10
|
-
# Full error reports are disabled and caching is turned on
|
11
|
-
config.action_controller.consider_all_requests_local = false
|
12
|
-
config.action_controller.perform_caching = true
|
13
|
-
config.action_view.cache_template_loading = true
|
14
|
-
|
15
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
16
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
17
|
-
|
18
|
-
# Disable delivery errors, bad email addresses will be ignored
|
19
|
-
# config.action_mailer.raise_delivery_errors = false
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
ActionController::Routing::Routes.draw do |map|
|
2
|
-
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
-
|
4
|
-
# Sample of regular route:
|
5
|
-
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
-
# Keep in mind you can assign values other than :controller and :action
|
7
|
-
|
8
|
-
# Sample of named route:
|
9
|
-
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
-
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
-
|
12
|
-
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
-
# map.resources :products
|
14
|
-
|
15
|
-
# Sample resource route with options:
|
16
|
-
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
-
|
18
|
-
# Sample resource route with sub-resources:
|
19
|
-
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
-
|
21
|
-
# Sample resource route within a namespace:
|
22
|
-
# map.namespace :admin do |admin|
|
23
|
-
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
24
|
-
# admin.resources :products
|
25
|
-
# end
|
26
|
-
|
27
|
-
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
28
|
-
# map.root :controller => "welcome"
|
29
|
-
|
30
|
-
# See how all your routes lay out with "rake routes"
|
31
|
-
|
32
|
-
# Install the default routes as the lowest priority.
|
33
|
-
map.connect ':controller/:action/:id'
|
34
|
-
map.connect ':controller/:action/:id.:format'
|
35
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
This useless file prevents git from removing this directory.
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Filters added to this controller apply to all controllers in the application.
|
2
|
-
# Likewise, all the methods added will be available for all controllers.
|
3
|
-
|
4
|
-
class ApplicationController < ActionController::Base
|
5
|
-
helper :all # include all helpers, all the time
|
6
|
-
|
7
|
-
# See ActionController::RequestForgeryProtection for details
|
8
|
-
# Uncomment the :secret if you're not using the cookie session store
|
9
|
-
protect_from_forgery # :secret => 'cd5f8fbe429e4b3cca1f5bc1ee91d179'
|
10
|
-
|
11
|
-
session :off
|
12
|
-
end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
# Don't change this file!
|
2
|
-
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
|
-
|
4
|
-
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
5
|
-
|
6
|
-
module Rails
|
7
|
-
class << self
|
8
|
-
def boot!
|
9
|
-
unless booted?
|
10
|
-
preinitialize
|
11
|
-
pick_boot.run
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def booted?
|
16
|
-
defined? Rails::Initializer
|
17
|
-
end
|
18
|
-
|
19
|
-
def pick_boot
|
20
|
-
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
-
end
|
22
|
-
|
23
|
-
def vendor_rails?
|
24
|
-
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
-
end
|
26
|
-
|
27
|
-
def preinitialize
|
28
|
-
load(preinitializer_path) if File.exist?(preinitializer_path)
|
29
|
-
end
|
30
|
-
|
31
|
-
def preinitializer_path
|
32
|
-
"#{RAILS_ROOT}/config/preinitializer.rb"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
class Boot
|
37
|
-
def run
|
38
|
-
load_initializer
|
39
|
-
Rails::Initializer.run(:set_load_path)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
class VendorBoot < Boot
|
44
|
-
def load_initializer
|
45
|
-
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
class GemBoot < Boot
|
50
|
-
def load_initializer
|
51
|
-
self.class.load_rubygems
|
52
|
-
load_rails_gem
|
53
|
-
require 'initializer'
|
54
|
-
end
|
55
|
-
|
56
|
-
def load_rails_gem
|
57
|
-
if version = self.class.gem_version
|
58
|
-
gem 'rails', version
|
59
|
-
else
|
60
|
-
gem 'rails'
|
61
|
-
end
|
62
|
-
rescue Gem::LoadError => load_error
|
63
|
-
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
64
|
-
exit 1
|
65
|
-
end
|
66
|
-
|
67
|
-
class << self
|
68
|
-
def rubygems_version
|
69
|
-
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
|
70
|
-
end
|
71
|
-
|
72
|
-
def gem_version
|
73
|
-
if defined? RAILS_GEM_VERSION
|
74
|
-
RAILS_GEM_VERSION
|
75
|
-
elsif ENV.include?('RAILS_GEM_VERSION')
|
76
|
-
ENV['RAILS_GEM_VERSION']
|
77
|
-
else
|
78
|
-
parse_gem_version(read_environment_rb)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
def load_rubygems
|
83
|
-
require 'rubygems'
|
84
|
-
|
85
|
-
unless rubygems_version >= '0.9.4'
|
86
|
-
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
87
|
-
exit 1
|
88
|
-
end
|
89
|
-
|
90
|
-
rescue LoadError
|
91
|
-
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
92
|
-
exit 1
|
93
|
-
end
|
94
|
-
|
95
|
-
def parse_gem_version(text)
|
96
|
-
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
97
|
-
end
|
98
|
-
|
99
|
-
private
|
100
|
-
def read_environment_rb
|
101
|
-
File.read("#{RAILS_ROOT}/config/environment.rb")
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
# All that for this:
|
108
|
-
Rails.boot!
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
-
development:
|
4
|
-
adapter: sqlite3
|
5
|
-
database: db/development.sqlite3
|
6
|
-
timeout: 5000
|
7
|
-
|
8
|
-
# Warning: The database defined as 'test' will be erased and
|
9
|
-
# re-generated from your development database when you run 'rake'.
|
10
|
-
# Do not set this db to the same as development or production.
|
11
|
-
test:
|
12
|
-
adapter: sqlite3
|
13
|
-
database: db/test.sqlite3
|
14
|
-
timeout: 5000
|
15
|
-
|
16
|
-
production:
|
17
|
-
adapter: sqlite3
|
18
|
-
database: db/production.sqlite3
|
19
|
-
timeout: 5000
|
@@ -1,59 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file
|
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
|
-
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
-
RAILS_GEM_VERSION = '~> 2.0.1' unless defined? RAILS_GEM_VERSION
|
9
|
-
|
10
|
-
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
12
|
-
|
13
|
-
Rails::Initializer.run do |config|
|
14
|
-
# Settings in config/environments/* take precedence over those specified here.
|
15
|
-
# Application configuration should go into files in config/initializers
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
# See Rails::Configuration for more options.
|
18
|
-
|
19
|
-
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
20
|
-
# To use Rails without a database, you must remove the Active Record framework
|
21
|
-
config.frameworks -= [ :active_record ]
|
22
|
-
|
23
|
-
# Only load the plugins named here, in the order given. By default, all plugins
|
24
|
-
# in vendor/plugins are loaded in alphabetical order.
|
25
|
-
# :all can be used as a placeholder for all plugins not explicitly named
|
26
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
27
|
-
|
28
|
-
# Add additional load paths for your own custom dirs
|
29
|
-
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
30
|
-
|
31
|
-
# Force all environments to use the same logger level
|
32
|
-
# (by default production uses :info, the others :debug)
|
33
|
-
# config.log_level = :debug
|
34
|
-
|
35
|
-
# Your secret key for verifying cookie session data integrity.
|
36
|
-
# If you change this key, all old sessions will become invalid!
|
37
|
-
# Make sure the secret is at least 30 characters and all random,
|
38
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
39
|
-
config.action_controller.session = {
|
40
|
-
:session_key => '_railsapp_session',
|
41
|
-
:secret => '3b50a6869d4e48696e5d407cab7b390124b3d815b4a8ab3e452a6ae1972ce1dc9615db09977915b6715944170fec0d46847b5b8fbdb1a4634d5d7247e4db32c8'
|
42
|
-
}
|
43
|
-
|
44
|
-
# Use the database for sessions instead of the cookie-based default,
|
45
|
-
# which shouldn't be used to store highly confidential information
|
46
|
-
# (create the session table with 'rake db:sessions:create')
|
47
|
-
# config.action_controller.session_store = :active_record_store
|
48
|
-
|
49
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
50
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
51
|
-
# like if you have constraints or database-specific column types
|
52
|
-
# config.active_record.schema_format = :sql
|
53
|
-
|
54
|
-
# Activate observers that should always be running
|
55
|
-
# config.active_record.observers = :cacher, :garbage_collector
|
56
|
-
|
57
|
-
# Make Active Record use UTC-base instead of local time
|
58
|
-
# config.active_record.default_timezone = :utc
|
59
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
-
|
3
|
-
# In the development environment your application's code is reloaded on
|
4
|
-
# every request. This slows down response time but is perfect for development
|
5
|
-
# since you don't have to restart the webserver when you make code changes.
|
6
|
-
config.cache_classes = false
|
7
|
-
|
8
|
-
# Log error messages when you accidentally call methods on nil.
|
9
|
-
config.whiny_nils = true
|
10
|
-
|
11
|
-
# Show full error reports and disable caching
|
12
|
-
config.action_controller.consider_all_requests_local = true
|
13
|
-
config.action_view.debug_rjs = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
config.action_view.cache_template_extensions = false
|
16
|
-
|
17
|
-
# Don't care if the mailer can't send
|
18
|
-
config.action_mailer.raise_delivery_errors = false
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
-
|
3
|
-
# The production environment is meant for finished, "live" apps.
|
4
|
-
# Code is not reloaded between requests
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Use a different logger for distributed setups
|
8
|
-
# config.logger = SyslogLogger.new
|
9
|
-
|
10
|
-
# Full error reports are disabled and caching is turned on
|
11
|
-
config.action_controller.consider_all_requests_local = false
|
12
|
-
config.action_controller.perform_caching = true
|
13
|
-
config.action_view.cache_template_loading = true
|
14
|
-
|
15
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
16
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
17
|
-
|
18
|
-
# Disable delivery errors, bad email addresses will be ignored
|
19
|
-
# config.action_mailer.raise_delivery_errors = false
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
# (all these examples are active by default):
|
5
|
-
# Inflector.inflections do |inflect|
|
6
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
-
# inflect.singular /^(ox)en/i, '\1'
|
8
|
-
# inflect.irregular 'person', 'people'
|
9
|
-
# inflect.uncountable %w( fish sheep )
|
10
|
-
# end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
ActionController::Routing::Routes.draw do |map|
|
2
|
-
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
-
|
4
|
-
# Sample of regular route:
|
5
|
-
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
-
# Keep in mind you can assign values other than :controller and :action
|
7
|
-
|
8
|
-
# Sample of named route:
|
9
|
-
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
-
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
-
|
12
|
-
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
-
# map.resources :products
|
14
|
-
|
15
|
-
# Sample resource route with options:
|
16
|
-
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
-
|
18
|
-
# Sample resource route with sub-resources:
|
19
|
-
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
-
|
21
|
-
# Sample resource route within a namespace:
|
22
|
-
# map.namespace :admin do |admin|
|
23
|
-
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
24
|
-
# admin.resources :products
|
25
|
-
# end
|
26
|
-
|
27
|
-
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
28
|
-
# map.root :controller => "welcome"
|
29
|
-
|
30
|
-
# See how all your routes lay out with "rake routes"
|
31
|
-
|
32
|
-
# Install the default routes as the lowest priority.
|
33
|
-
map.connect ':controller/:action/:id'
|
34
|
-
map.connect ':controller/:action/:id.:format'
|
35
|
-
end
|