diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-06-30 13:55:31 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-07-01 18:35:43 +0900 |
commit | 618268b4b9382f4bcf004a945fe2d85c0bd03e32 (patch) | |
tree | a9531ff4a342a479a7a3ea56413cf05b0010e129 /railties/lib/rails/tasks | |
parent | 1613eaf829a1f64f5be30b070184f6b3378d5801 (diff) | |
download | rails-618268b4b9382f4bcf004a945fe2d85c0bd03e32.tar.gz rails-618268b4b9382f4bcf004a945fe2d85c0bd03e32.tar.bz2 rails-618268b4b9382f4bcf004a945fe2d85c0bd03e32.zip |
[Railties] require => require_relative
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r-- | railties/lib/rails/tasks/annotations.rake | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/dev.rake | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/engine.rake | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 8 | ||||
-rw-r--r-- | railties/lib/rails/tasks/statistics.rake | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/railties/lib/rails/tasks/annotations.rake b/railties/lib/rails/tasks/annotations.rake index 9a69eb9934..ae427249ef 100644 --- a/railties/lib/rails/tasks/annotations.rake +++ b/railties/lib/rails/tasks/annotations.rake @@ -1,4 +1,4 @@ -require "rails/source_annotation_extractor" +require_relative "../source_annotation_extractor" desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" task :notes do diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake index 334e968123..b2447cbcfc 100644 --- a/railties/lib/rails/tasks/dev.rake +++ b/railties/lib/rails/tasks/dev.rake @@ -1,4 +1,4 @@ -require "rails/dev_caching" +require_relative "../dev_caching" namespace :dev do desc "Toggle development mode caching on/off" diff --git a/railties/lib/rails/tasks/engine.rake b/railties/lib/rails/tasks/engine.rake index 177b138090..a8d67322da 100644 --- a/railties/lib/rails/tasks/engine.rake +++ b/railties/lib/rails/tasks/engine.rake @@ -6,7 +6,7 @@ task "load_app" do task update: [ "update:bin" ] namespace :update do - require "rails/engine/updater" + require_relative "../engine/updater" # desc "Adds new executables to the engine bin/ directory" task :bin do Rails::Engine::Updater.run(:create_bin_files) diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 80720a42ff..f7e8f4f340 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -7,8 +7,8 @@ namespace :app do template = ENV["LOCATION"] raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank? template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} - require "rails/generators" - require "rails/generators/rails/app/app_generator" + require_relative "../generators" + require_relative "../generators/rails/app/app_generator" generator = Rails::Generators::AppGenerator.new [Rails.root], {}, destination_root: Rails.root generator.apply template, verbose: false end @@ -43,8 +43,8 @@ namespace :app do def self.app_generator @app_generator ||= begin - require "rails/generators" - require "rails/generators/rails/app/app_generator" + require_relative "../generators" + require_relative "../generators/rails/app/app_generator" gen = Rails::Generators::AppGenerator.new ["rails"], { api: !!Rails.application.config.api_only, update: true }, destination_root: Rails.root diff --git a/railties/lib/rails/tasks/statistics.rake b/railties/lib/rails/tasks/statistics.rake index cb569be58b..0670050d34 100644 --- a/railties/lib/rails/tasks/statistics.rake +++ b/railties/lib/rails/tasks/statistics.rake @@ -24,6 +24,6 @@ end.select { |name, dir| File.directory?(dir) } desc "Report code statistics (KLOCs, etc) from the application or engine" task :stats do - require "rails/code_statistics" + require_relative "../code_statistics" CodeStatistics.new(*STATS_DIRECTORIES).to_s end |