Permalink
Browse files

update to the latest edge rails

  • Loading branch information...
1 parent 51d03a8 commit 4e23df3df629e6a748fa77404386479e12497c6f @ralph committed Jan 6, 2010
View
@@ -1,7 +1,7 @@
# Edit this Gemfile to bundle your application's dependencies.
gem "arel", "0.2.pre", :git => "git://github.com/rails/arel.git"
-gem "rack", "1.0.1", :git => "git://github.com/rails/rack.git"
+gem "rack", "1.1.0", :git => "git://github.com/rack/rack.git"
gem "rails", "3.0.pre", :git => "git://github.com/rails/rails.git"
## Bundle edge rails:
View
@@ -7,4 +7,4 @@ require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
-SampleRails3Project.load_tasks
+SampleRails30Project::Application.load_tasks
View
@@ -1,5 +1,4 @@
-# Require your environment file to bootstrap Rails
-require ::File.expand_path('../config/environment', __FILE__)
+# This file is used by Rack-based servers to start the application.
-# Dispatch the request
-run SampleRails3Project
+require ::File.expand_path('../config/environment', __FILE__)
+run SampleRails30Project::Application.instance
View
@@ -1,37 +1,34 @@
require File.expand_path('../boot', __FILE__)
-class SampleRails3Project < Rails::Application
- # Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
-
- # Add additional load paths for your own custom dirs
- # config.load_paths += %W( #{root}/extras )
-
- # Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
- # Skip frameworks you're not going to use. To use Rails without a database,
- # you must remove the Active Record framework.
- # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
-
- # Activate observers that should always be running
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
-
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names.
- config.time_zone = 'UTC'
-
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
- # config.i18n.default_locale = :de
-
- # Configure generators values. Many other options are available, be sure to
- # check the documentation.
- # config.generators do |g|
- # g.orm :active_record
- # g.template_engine :erb
- # g.test_framework :test_unit, :fixture => true
- # end
+module SampleRails30Project
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Add additional load paths for your own custom dirs
+ # config.load_paths += %W( #{config.root}/extras )
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
+ # config.i18n.default_locale = :de
+
+ # Configure generators values. Many other options are available, be sure to check the documentation.
+ # config.generators do |g|
+ # g.orm :active_record
+ # g.template_engine :erb
+ # g.test_framework :test_unit, :fixture => true
+ # end
+ end
end
View
@@ -13,4 +13,13 @@
require 'rubygems'
end
-require 'rails'
+require 'rails/all'
+# To pick the frameworks you want, remove 'require "rails/all"'
+# and list the framework railties that you want:
+#
+# require "active_model/railtie"
+# require "active_record/railtie"
+# require "action_controller/railtie"
+# require "action_view/railtie"
+# require "action_mailer/railtie"
+# require "active_resource/railtie"
View
@@ -2,4 +2,4 @@
require File.expand_path('../application', __FILE__)
# Initialize the rails application
-SampleRails3Project.initialize!
+SampleRails30Project::Application.initialize!
@@ -1,17 +1,19 @@
-# Settings specified here will take precedence over those in config/environment.rb
+SampleRails30Project::Application.configure do
+ # Settings specified here will take precedence over those in config/environment.rb
-# In the development environment your application's code is reloaded on
-# every request. This slows down response time but is perfect for development
-# since you don't have to restart the webserver when you make code changes.
-config.cache_classes = false
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the webserver when you make code changes.
+ config.cache_classes = false
-# Log error messages when you accidentally call methods on nil.
-config.whiny_nils = true
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
-# Show full error reports and disable caching
-config.action_controller.consider_all_requests_local = true
-config.action_view.debug_rjs = true
-config.action_controller.perform_caching = false
+ # Show full error reports and disable caching
+ config.action_controller.consider_all_requests_local = true
+ config.action_view.debug_rjs = true
+ config.action_controller.perform_caching = false
-# Don't care if the mailer can't send
-config.action_mailer.raise_delivery_errors = false
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+end
@@ -1,31 +1,33 @@
-# Settings specified here will take precedence over those in config/environment.rb
+SampleRails30Project::Application.configure do
+ # Settings specified here will take precedence over those in config/environment.rb
-# The production environment is meant for finished, "live" apps.
-# Code is not reloaded between requests
-config.cache_classes = true
+ # The production environment is meant for finished, "live" apps.
+ # Code is not reloaded between requests
+ config.cache_classes = true
-# Full error reports are disabled and caching is turned on
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching = true
+ # Full error reports are disabled and caching is turned on
+ config.action_controller.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
-# See everything in the log (default is :info)
-# config.log_level = :debug
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
-# Use a different logger for distributed setups
-# config.logger = SyslogLogger.new
+ # Use a different logger for distributed setups
+ # config.logger = SyslogLogger.new
-# Use a different cache store in production
-# config.cache_store = :mem_cache_store
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
-# Disable Rails's static asset server
-# In production, Apache or nginx will already do this
-config.serve_static_assets = false
+ # Disable Rails's static asset server
+ # In production, Apache or nginx will already do this
+ config.serve_static_assets = false
-# Enable serving of images, stylesheets, and javascripts from an asset server
-# config.action_controller.asset_host = "http://assets.example.com"
+ # Enable serving of images, stylesheets, and javascripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
-# Disable delivery errors, bad email addresses will be ignored
-# config.action_mailer.raise_delivery_errors = false
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
-# Enable threaded mode
-# config.threadsafe!
+ # Enable threaded mode
+ # config.threadsafe!
+end
@@ -1,27 +1,29 @@
-# Settings specified here will take precedence over those in config/environment.rb
+SampleRails30Project::Application.configure do
+ # Settings specified here will take precedence over those in config/environment.rb
-# The test environment is used exclusively to run your application's
-# test suite. You never need to work with it otherwise. Remember that
-# your test database is "scratch space" for the test suite and is wiped
-# and recreated between test runs. Don't rely on the data there!
-config.cache_classes = true
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
-# Log error messages when you accidentally call methods on nil.
-config.whiny_nils = true
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
-# Show full error reports and disable caching
-config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching = false
+ # Show full error reports and disable caching
+ config.action_controller.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
-# Disable request forgery protection in test environment
-config.action_controller.allow_forgery_protection = false
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
-# Tell Action Mailer not to deliver emails to the real world.
-# The :test delivery method accumulates sent emails in the
-# ActionMailer::Base.deliveries array.
-config.action_mailer.delivery_method = :test
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
-# Use SQL instead of Active Record's schema dumper when creating the test database.
-# This is necessary if your schema can't be completely dumped by the schema dumper,
-# like if you have constraints or database-specific column types
-# config.active_record.schema_format = :sql
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+end
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+ActionController::Base.cookie_verifier_secret = '1446aea3a45edfcfd35e66ae282d8a1d036336f63bbaccc236de757acc7190d5d6ee8367e49fc572a78fa2731779cd4980c5ac6f914e2c79843aa96c9265231f';
View
@@ -1,4 +1,4 @@
-ActionController::Routing::Routes.draw do |map|
+SampleRails30Project::Application.routes.draw do |map|
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -7,7 +7,7 @@
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
- # match 'products/:id/purchase', :to => 'catalog#purchase', :as => :purchase
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
@@ -48,7 +48,7 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
- # root :to => "welcome"
+ # root :to => "welcome#index"
# See how all your routes lay out with "rake routes"
View
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require File.expand_path('../../config/application', __FILE__)
require 'rails/commands/console'
-Rails::Console.start(SampleRails3Project)
+Rails::Console.start(SampleRails30Project::Application.instance)
View
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require File.expand_path('../../config/application', __FILE__)
require 'rails/commands/dbconsole'
-Rails::DBConsole.start(SampleRails3Project)
+Rails::DBConsole.start(SampleRails30Project::Application.instance)
View
@@ -1,4 +1,6 @@
#!/usr/bin/env ruby
-require File.expand_path('../../config/application', __FILE__)
+require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands/server'
-Rails::Server.start(SampleRails3Project)
+
+Dir.chdir(File.expand_path('../..', __FILE__))
+Rails::Server.start
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 4e23df3

Please sign in to comment.