diff --git a/Rakefile b/Rakefile index b91c5b29..ba6b733d 100644 --- a/Rakefile +++ b/Rakefile @@ -3,4 +3,4 @@ require File.expand_path('../config/application', __FILE__) -Tracksapp::Application.load_tasks +Rails.application.load_tasks diff --git a/config/application.rb b/config/application.rb index e081c524..80c2a1de 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,7 +4,7 @@ require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) +Bundler.require(*Rails.groups) require 'yaml' SITE_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), 'site.yml')) diff --git a/config/boot.rb b/config/boot.rb index 35967366..5e5f0c1f 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index 4a07573b..ee8d90dc 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ -# Load the rails application. +# Load the Rails application. require File.expand_path('../application', __FILE__) -# Initialize the rails application. -Tracksapp::Application.initialize! +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 164a7542..6df6a80f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,5 +1,5 @@ -Tracksapp::Application.configure do - # Settings specified here will take precedence over those in config/application.rb +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development diff --git a/config/environments/production.rb b/config/environments/production.rb index e7559e97..8f5552e9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,4 @@ -Tracksapp::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. diff --git a/config/environments/test.rb b/config/environments/test.rb index 76f8aee0..8e4c34fc 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,4 @@ -Tracksapp::Application.configure do +Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 29d542cf..dff12be6 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,3 +1,3 @@ # Be sure to restart your server when you modify this file. -Tracksapp::Application.config.session_store :cookie_store, key: '_tracksapp_session' +Rails.application.config.session_store :cookie_store, key: '_tracksapp_session' diff --git a/config/routes.rb b/config/routes.rb index 5e2be629..eeca5489 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,4 @@ -Tracksapp::Application.routes.draw do +Rails.application.routes.draw do mount Tolk::Engine => '/tolk', :as => 'tolk' if Rails.env=='development' root :to => 'todos#index' diff --git a/test/test_helper.rb b/test/test_helper.rb index 19c74096..6e7a07e6 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,4 @@ ENV["RAILS_ENV"] ||= "test" - require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' @@ -8,7 +7,7 @@ require 'rails/test_help' class ActiveSupport::TestCase ActiveRecord::Migration.check_pending! - # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting