diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/Rakefile | 3 | ||||
-rw-r--r-- | railties/environments/shared.rb | 11 | ||||
-rw-r--r-- | railties/environments/shared_for_gem.rb | 10 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 1 |
4 files changed, 12 insertions, 13 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index 855075bfc0..f64f15b149 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -15,7 +15,7 @@ PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}" BASE_DIRS = %w( app config/environments db doc log lib public script test vendor ) -APP_DIRS = %w( models controllers helpers views views/layouts ) +APP_DIRS = %w( apis models controllers helpers views views/layouts ) PUBLIC_DIRS = %w( images javascripts stylesheets _doc ) TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/testing ) @@ -246,6 +246,7 @@ spec = Gem::Specification.new do |s| s.add_dependency('activerecord', '>= 1.6.0') s.add_dependency('actionpack', '>= 1.4.0') s.add_dependency('actionmailer', '>= 0.6.1') + s.add_dependency('actionservice', '>= 0.4.0') s.rdoc_options << '--exclude' << '.' s.has_rdoc = false diff --git a/railties/environments/shared.rb b/railties/environments/shared.rb index 9b261ba59e..3638f6f1fc 100644 --- a/railties/environments/shared.rb +++ b/railties/environments/shared.rb @@ -14,6 +14,7 @@ ADDITIONAL_LOAD_PATHS.concat %w( app/models app/controllers app/helpers + app/apis config lib vendor @@ -23,6 +24,7 @@ ADDITIONAL_LOAD_PATHS.concat %w( vendor/activerecord/lib vendor/actionpack/lib vendor/actionmailer/lib + vendor/actionservice/lib ).map { |dir| "#{RAILS_ROOT}/#{dir}" } # Prepend to $LOAD_PATH @@ -34,6 +36,7 @@ require 'active_support' require 'active_record' require 'action_controller' require 'action_mailer' +require 'action_service' # Environment-specific configuration. @@ -54,12 +57,8 @@ rescue StandardError ) end -[ActiveRecord::Base, ActionController::Base, ActionMailer::Base].each do |klass| - klass.logger ||= RAILS_DEFAULT_LOGGER -end -[ActionController::Base, ActionMailer::Base].each do |klass| - klass.template_root ||= "#{RAILS_ROOT}/app/views/" -end +[ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER } +[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" } ActionController::Routing::Routes.reload # Include your app's configuration here: diff --git a/railties/environments/shared_for_gem.rb b/railties/environments/shared_for_gem.rb index 6ee762de6a..dd2c7c2d29 100644 --- a/railties/environments/shared_for_gem.rb +++ b/railties/environments/shared_for_gem.rb @@ -14,6 +14,7 @@ ADDITIONAL_LOAD_PATHS.concat %w( app/models app/controllers app/helpers + app/apis config lib vendor @@ -29,6 +30,7 @@ require_gem 'activesupport' require_gem 'activerecord' require_gem 'actionpack' require_gem 'actionmailer' +require_gem 'actionservice' require_gem 'rails' @@ -50,12 +52,8 @@ rescue StandardError ) end -[ActiveRecord::Base, ActionController::Base, ActionMailer::Base].each do |klass| - klass.logger ||= RAILS_DEFAULT_LOGGER -end -[ActionController::Base, ActionMailer::Base].each do |klass| - klass.template_root ||= "#{RAILS_ROOT}/app/views/" -end +[ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER } +[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" } ActionController::Routing::Routes.reload # Include your app's configuration here: diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 4a04757ddd..bf29240908 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -96,6 +96,7 @@ class AppGenerator < Rails::Generator::Base # Installation skeleton. Intermediate directories are automatically # created so don't sweat their absence here. BASEDIRS = %w( + app/apis app/controllers app/helpers app/models |