diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-03-20 12:34:21 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-03-20 12:34:21 -0500 |
commit | f38e89cfbad6886a2812b1176e0c47b7d95cda43 (patch) | |
tree | deacf96a79eb778e4fa02c6ba89b96d856f86498 | |
parent | f868c2afa9190604015b6c5fd3bcc58371f03570 (diff) | |
download | rails-f38e89cfbad6886a2812b1176e0c47b7d95cda43.tar.gz rails-f38e89cfbad6886a2812b1176e0c47b7d95cda43.tar.bz2 rails-f38e89cfbad6886a2812b1176e0c47b7d95cda43.zip |
Move railties/builtin into lib
-rw-r--r-- | railties/builtin/rails_info/rails/info_helper.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/info.rb (renamed from railties/builtin/rails_info/rails/info.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/info_controller.rb (renamed from railties/builtin/rails_info/rails/info_controller.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/info_routes.rb (renamed from railties/builtin/routes.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/railties_path.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/tasks/documentation.rake | 7 | ||||
-rw-r--r-- | railties/lib/rails/tasks/misc.rake | 7 | ||||
-rw-r--r-- | railties/railties.gemspec | 2 | ||||
-rw-r--r-- | railties/test/abstract_unit.rb | 1 |
12 files changed, 12 insertions, 17 deletions
diff --git a/railties/builtin/rails_info/rails/info_helper.rb b/railties/builtin/rails_info/rails/info_helper.rb deleted file mode 100644 index e5605a8d9b..0000000000 --- a/railties/builtin/rails_info/rails/info_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Rails::InfoHelper -end diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index f43e8847ac..8b355dd76c 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,5 +1,4 @@ require 'fileutils' -require 'rails/railties_path' require 'rails/plugin' require 'rails/engine' diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index d3a0ecb243..52f869b877 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -78,7 +78,7 @@ module Rails end def builtin_controller - File.join(RAILTIES_PATH, "builtin", "rails_info") if Rails.env.development? + File.expand_path('../info_routes', __FILE__) if Rails.env.development? end def log_level @@ -96,4 +96,4 @@ module Rails end end end -end
\ No newline at end of file +end diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index cb38d5a5db..978490f25f 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -23,7 +23,7 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - app.routes_reloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + app.routes_reloader.paths << File.expand_path('../../info_routes.rb', __FILE__) end end @@ -45,4 +45,4 @@ module Rails end end end -end
\ No newline at end of file +end diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/lib/rails/info.rb index 5a496f6536..5a496f6536 100644 --- a/railties/builtin/rails_info/rails/info.rb +++ b/railties/lib/rails/info.rb diff --git a/railties/builtin/rails_info/rails/info_controller.rb b/railties/lib/rails/info_controller.rb index 196eeb4a6c..196eeb4a6c 100644 --- a/railties/builtin/rails_info/rails/info_controller.rb +++ b/railties/lib/rails/info_controller.rb diff --git a/railties/builtin/routes.rb b/railties/lib/rails/info_routes.rb index bd58034d8f..bd58034d8f 100644 --- a/railties/builtin/routes.rb +++ b/railties/lib/rails/info_routes.rb diff --git a/railties/lib/rails/railties_path.rb b/railties/lib/rails/railties_path.rb deleted file mode 100644 index e291fc23ea..0000000000 --- a/railties/lib/rails/railties_path.rb +++ /dev/null @@ -1 +0,0 @@ -RAILTIES_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index abf9b33ae5..f2fee45594 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -66,13 +66,14 @@ namespace :doc do task :plugins => plugins.collect { |plugin| "doc:plugins:#{plugin}" } desc "Remove plugin documentation" - task :clobber_plugins do + task :clobber_plugins do rm_rf 'doc/plugins' rescue nil end desc "Generate Rails guides" task :guides do - require File.join(RAILTIES_PATH, "guides/rails_guides") + # FIXME: Reaching outside lib directory is a bad idea + require File.expand_path('../../../../guides/rails_guides', __FILE__) RailsGuides::Generator.new(Rails.root.join("doc/guides")).generate end @@ -92,7 +93,7 @@ namespace :doc do files.include("#{plugin_base}/lib/**/*.rb") if File.exist?("#{plugin_base}/README") - files.include("#{plugin_base}/README") + files.include("#{plugin_base}/README") options << "--main '#{plugin_base}/README'" end files.include("#{plugin_base}/CHANGELOG") if File.exist?("#{plugin_base}/CHANGELOG") diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake index 48fce92215..2309c91d83 100644 --- a/railties/lib/rails/tasks/misc.rake +++ b/railties/lib/rails/tasks/misc.rake @@ -15,7 +15,6 @@ end desc 'Explain the current environment' task :about do - $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" require 'rails/info' puts Rails::Info end @@ -26,12 +25,12 @@ namespace :time do task :all do build_time_zone_list(:all) end - + desc 'Displays names of US time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6' task :us do build_time_zone_list(:us_zones) end - + desc 'Displays names of time zones recognized by the Rails TimeZone class with the same offset as the system local time' task :local do require 'active_support' @@ -41,7 +40,7 @@ namespace :time do offset = jan_offset < jul_offset ? jan_offset : jul_offset build_time_zone_list(:all, offset) end - + # to find UTC -06:00 zones, OFFSET can be set to either -6, -6:00 or 21600 def build_time_zone_list(method, offset = ENV['OFFSET']) require 'active_support' diff --git a/railties/railties.gemspec b/railties/railties.gemspec index b9d2739539..aea07efe96 100644 --- a/railties/railties.gemspec +++ b/railties/railties.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.homepage = 'http://www.rubyonrails.org' s.rubyforge_project = 'rails' - s.files = Dir['CHANGELOG', 'README', 'bin/**/*', 'builtin/**/*', 'guides/**/*', 'lib/**/{*,.[a-z]*}'] + s.files = Dir['CHANGELOG', 'README', 'bin/**/*', 'guides/**/*', 'lib/**/{*,.[a-z]*}'] s.require_path = 'lib' s.bindir = 'bin' s.executables = ['rails'] diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb index aa66dbb9be..d04a2aa1f3 100644 --- a/railties/test/abstract_unit.rb +++ b/railties/test/abstract_unit.rb @@ -1,7 +1,6 @@ ORIG_ARGV = ARGV.dup require File.expand_path("../../../load_paths", __FILE__) -$:.unshift File.expand_path("../../builtin/rails_info", __FILE__) require 'stringio' require 'test/unit' |