From a42351acbc5406ab0825befe641144b4cb1ee6bf Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 16 Jan 2017 22:27:51 +0900 Subject: Add `app:update` task to engines Occasionally we update the file generated by engine. Therefore, I think that there is a task for updating as well as application in the engine, it is convenient for updating. --- railties/lib/rails/tasks/engine.rake | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/engine.rake b/railties/lib/rails/tasks/engine.rake index c92b42f6c1..177b138090 100644 --- a/railties/lib/rails/tasks/engine.rake +++ b/railties/lib/rails/tasks/engine.rake @@ -1,6 +1,17 @@ task "load_app" do namespace :app do load APP_RAKEFILE + + desc "Update some initially generated files" + task update: [ "update:bin" ] + + namespace :update do + require "rails/engine/updater" + # desc "Adds new executables to the engine bin/ directory" + task :bin do + Rails::Engine::Updater.run(:create_bin_files) + end + end end task environment: "app:environment" -- cgit v1.2.3 From e7c4fe581c6eab18df706875eb57df82e27a1e8f Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 24 Mar 2017 08:31:30 +0900 Subject: Remove unnecessary files to API-only Applications when `app:task` task executed --- railties/lib/rails/tasks/framework.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index f5586b53f0..32a6b109bc 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -63,7 +63,7 @@ namespace :app do # desc "Adds new executables to the application bin/ directory" task :bin do - RailsUpdate.invoke_from_app_generator :create_bin_files + RailsUpdate.invoke_from_app_generator :update_bin_files end task :upgrade_guide_info do -- cgit v1.2.3 From 40bdbce191ad90dfea43dad51fac5c4726b89392 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Mon, 15 May 2017 14:17:28 +0000 Subject: Define path with __dir__ ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f --- railties/lib/rails/tasks/framework.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 32a6b109bc..80720a42ff 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -16,7 +16,7 @@ namespace :app do namespace :templates do # desc "Copy all the templates from rails to the application directory for customization. Already existing local copies will be overwritten" task :copy do - generators_lib = File.expand_path("../../generators", __FILE__) + generators_lib = File.expand_path("../generators", __dir__) project_templates = "#{Rails.root}/lib/templates" default_templates = { "erb" => %w{controller mailer scaffold}, -- cgit v1.2.3 From 6fbd405a2eb585591bb57de5adae71f890a24af3 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Thu, 22 Jun 2017 22:17:18 +0900 Subject: Clear screenshots files in `tmp:clear` task If system test fails, it creates screenshot under `tmp/screenshots`. https://github.com/rails/rails/blob/34fe2a4fc778d18b7fe6bdf3629c1481bee789b9/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#L45 But currently, screenshot files is not cleared by `tmp:clear` task. This patch make clears screenshot files with `tmp:clear` task as well as other tmp files. --- railties/lib/rails/tasks/tmp.rake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/tmp.rake b/railties/lib/rails/tasks/tmp.rake index d42a890cb6..3d8ced1bf3 100644 --- a/railties/lib/rails/tasks/tmp.rake +++ b/railties/lib/rails/tasks/tmp.rake @@ -1,6 +1,6 @@ namespace :tmp do - desc "Clear cache and socket files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear)" - task clear: ["tmp:cache:clear", "tmp:sockets:clear"] + desc "Clear cache, socket and screenshot files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear, tmp:screenshots:clear)" + task clear: ["tmp:cache:clear", "tmp:sockets:clear", "tmp:screenshots:clear"] tmp_dirs = [ "tmp/cache", "tmp/sockets", @@ -32,4 +32,11 @@ namespace :tmp do rm Dir["tmp/pids/[^.]*"], verbose: false end end + + namespace :screenshots do + # desc "Clears all files in tmp/screenshots" + task :clear do + rm Dir["tmp/screenshots/[^.]*"], verbose: false + end + end end -- cgit v1.2.3 From cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 22 Jun 2017 22:59:18 -0400 Subject: Enforce frozen string in Rubocop --- railties/lib/rails/tasks/annotations.rake | 1 + railties/lib/rails/tasks/dev.rake | 1 + railties/lib/rails/tasks/engine.rake | 1 + railties/lib/rails/tasks/framework.rake | 1 + railties/lib/rails/tasks/initializers.rake | 1 + railties/lib/rails/tasks/log.rake | 1 + railties/lib/rails/tasks/middleware.rake | 1 + railties/lib/rails/tasks/misc.rake | 1 + railties/lib/rails/tasks/restart.rake | 1 + railties/lib/rails/tasks/routes.rake | 1 + railties/lib/rails/tasks/statistics.rake | 1 + railties/lib/rails/tasks/tmp.rake | 1 + railties/lib/rails/tasks/yarn.rake | 1 + 13 files changed, 13 insertions(+) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/annotations.rake b/railties/lib/rails/tasks/annotations.rake index 9a69eb9934..802ef93bf3 100644 --- a/railties/lib/rails/tasks/annotations.rake +++ b/railties/lib/rails/tasks/annotations.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/source_annotation_extractor" desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake index 334e968123..5f6070ae42 100644 --- a/railties/lib/rails/tasks/dev.rake +++ b/railties/lib/rails/tasks/dev.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "rails/dev_caching" namespace :dev do diff --git a/railties/lib/rails/tasks/engine.rake b/railties/lib/rails/tasks/engine.rake index 177b138090..fb9f6ce1c2 100644 --- a/railties/lib/rails/tasks/engine.rake +++ b/railties/lib/rails/tasks/engine.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true task "load_app" do namespace :app do load APP_RAKEFILE diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 80720a42ff..d63af956bc 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :app do desc "Update configs and some other initially generated files (or use just update:configs or update:bin)" task update: [ "update:configs", "update:bin", "update:upgrade_guide_info" ] diff --git a/railties/lib/rails/tasks/initializers.rake b/railties/lib/rails/tasks/initializers.rake index 6522f2ae5a..fa475c06be 100644 --- a/railties/lib/rails/tasks/initializers.rake +++ b/railties/lib/rails/tasks/initializers.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true desc "Print out all defined initializers in the order they are invoked by Rails." task initializers: :environment do Rails.application.initializers.tsort_each do |initializer| diff --git a/railties/lib/rails/tasks/log.rake b/railties/lib/rails/tasks/log.rake index ba796845d7..39b08f5433 100644 --- a/railties/lib/rails/tasks/log.rake +++ b/railties/lib/rails/tasks/log.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :log do ## diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake index fd98be1ea9..d0d061bf7d 100644 --- a/railties/lib/rails/tasks/middleware.rake +++ b/railties/lib/rails/tasks/middleware.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true desc "Prints out your Rack middleware stack" task middleware: :environment do Rails.configuration.middleware.each do |middleware| diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake index 29ea0ff804..4ac7f60fe9 100644 --- a/railties/lib/rails/tasks/misc.rake +++ b/railties/lib/rails/tasks/misc.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)." task :secret do require "securerandom" diff --git a/railties/lib/rails/tasks/restart.rake b/railties/lib/rails/tasks/restart.rake index 03177d9954..05840f6562 100644 --- a/railties/lib/rails/tasks/restart.rake +++ b/railties/lib/rails/tasks/restart.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true desc "Restart app by touching tmp/restart.txt" task :restart do verbose(false) do diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 215fb2ceb5..ac04b84d87 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "optparse" desc "Print out all defined routes in match order, with names. Target specific controller with -c option, or grep routes using -g option" diff --git a/railties/lib/rails/tasks/statistics.rake b/railties/lib/rails/tasks/statistics.rake index cb569be58b..c80f44a7ce 100644 --- a/railties/lib/rails/tasks/statistics.rake +++ b/railties/lib/rails/tasks/statistics.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true # While global constants are bad, many 3rd party tools depend on this one (e.g # rspec-rails & cucumber-rails). So a deprecation warning is needed if we want # to remove it. diff --git a/railties/lib/rails/tasks/tmp.rake b/railties/lib/rails/tasks/tmp.rake index d42a890cb6..95769a38be 100644 --- a/railties/lib/rails/tasks/tmp.rake +++ b/railties/lib/rails/tasks/tmp.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :tmp do desc "Clear cache and socket files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear)" task clear: ["tmp:cache:clear", "tmp:sockets:clear"] diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake index 87476b1b8c..1d3a69e455 100644 --- a/railties/lib/rails/tasks/yarn.rake +++ b/railties/lib/rails/tasks/yarn.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :yarn do desc "Install all JavaScript dependencies as specified via Yarn" task :install do -- cgit v1.2.3 From 618268b4b9382f4bcf004a945fe2d85c0bd03e32 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 30 Jun 2017 13:55:31 +0900 Subject: [Railties] require => require_relative --- railties/lib/rails/tasks/annotations.rake | 2 +- railties/lib/rails/tasks/dev.rake | 2 +- railties/lib/rails/tasks/engine.rake | 2 +- railties/lib/rails/tasks/framework.rake | 8 ++++---- railties/lib/rails/tasks/statistics.rake | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'railties/lib/rails/tasks') 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 -- cgit v1.2.3 From 87b3e226d65ac1ed371620bfdcd2f950c87cfece Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sun, 2 Jul 2017 02:15:17 +0930 Subject: Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. --- railties/lib/rails/tasks/annotations.rake | 1 - railties/lib/rails/tasks/dev.rake | 1 - railties/lib/rails/tasks/engine.rake | 1 - railties/lib/rails/tasks/framework.rake | 1 - railties/lib/rails/tasks/initializers.rake | 1 - railties/lib/rails/tasks/log.rake | 1 - railties/lib/rails/tasks/middleware.rake | 1 - railties/lib/rails/tasks/misc.rake | 1 - railties/lib/rails/tasks/restart.rake | 1 - railties/lib/rails/tasks/routes.rake | 1 - railties/lib/rails/tasks/statistics.rake | 1 - railties/lib/rails/tasks/tmp.rake | 1 - railties/lib/rails/tasks/yarn.rake | 1 - 13 files changed, 13 deletions(-) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/annotations.rake b/railties/lib/rails/tasks/annotations.rake index 802ef93bf3..9a69eb9934 100644 --- a/railties/lib/rails/tasks/annotations.rake +++ b/railties/lib/rails/tasks/annotations.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "rails/source_annotation_extractor" desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)" diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake index 5f6070ae42..334e968123 100644 --- a/railties/lib/rails/tasks/dev.rake +++ b/railties/lib/rails/tasks/dev.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "rails/dev_caching" namespace :dev do diff --git a/railties/lib/rails/tasks/engine.rake b/railties/lib/rails/tasks/engine.rake index fb9f6ce1c2..177b138090 100644 --- a/railties/lib/rails/tasks/engine.rake +++ b/railties/lib/rails/tasks/engine.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true task "load_app" do namespace :app do load APP_RAKEFILE diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index d63af956bc..80720a42ff 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true namespace :app do desc "Update configs and some other initially generated files (or use just update:configs or update:bin)" task update: [ "update:configs", "update:bin", "update:upgrade_guide_info" ] diff --git a/railties/lib/rails/tasks/initializers.rake b/railties/lib/rails/tasks/initializers.rake index fa475c06be..6522f2ae5a 100644 --- a/railties/lib/rails/tasks/initializers.rake +++ b/railties/lib/rails/tasks/initializers.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true desc "Print out all defined initializers in the order they are invoked by Rails." task initializers: :environment do Rails.application.initializers.tsort_each do |initializer| diff --git a/railties/lib/rails/tasks/log.rake b/railties/lib/rails/tasks/log.rake index 39b08f5433..ba796845d7 100644 --- a/railties/lib/rails/tasks/log.rake +++ b/railties/lib/rails/tasks/log.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true namespace :log do ## diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake index d0d061bf7d..fd98be1ea9 100644 --- a/railties/lib/rails/tasks/middleware.rake +++ b/railties/lib/rails/tasks/middleware.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true desc "Prints out your Rack middleware stack" task middleware: :environment do Rails.configuration.middleware.each do |middleware| diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake index 4ac7f60fe9..29ea0ff804 100644 --- a/railties/lib/rails/tasks/misc.rake +++ b/railties/lib/rails/tasks/misc.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)." task :secret do require "securerandom" diff --git a/railties/lib/rails/tasks/restart.rake b/railties/lib/rails/tasks/restart.rake index 05840f6562..03177d9954 100644 --- a/railties/lib/rails/tasks/restart.rake +++ b/railties/lib/rails/tasks/restart.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true desc "Restart app by touching tmp/restart.txt" task :restart do verbose(false) do diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index ac04b84d87..215fb2ceb5 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "optparse" desc "Print out all defined routes in match order, with names. Target specific controller with -c option, or grep routes using -g option" diff --git a/railties/lib/rails/tasks/statistics.rake b/railties/lib/rails/tasks/statistics.rake index c80f44a7ce..cb569be58b 100644 --- a/railties/lib/rails/tasks/statistics.rake +++ b/railties/lib/rails/tasks/statistics.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true # While global constants are bad, many 3rd party tools depend on this one (e.g # rspec-rails & cucumber-rails). So a deprecation warning is needed if we want # to remove it. diff --git a/railties/lib/rails/tasks/tmp.rake b/railties/lib/rails/tasks/tmp.rake index 2e082a309f..3d8ced1bf3 100644 --- a/railties/lib/rails/tasks/tmp.rake +++ b/railties/lib/rails/tasks/tmp.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true namespace :tmp do desc "Clear cache, socket and screenshot files from tmp/ (narrow w/ tmp:cache:clear, tmp:sockets:clear, tmp:screenshots:clear)" task clear: ["tmp:cache:clear", "tmp:sockets:clear", "tmp:screenshots:clear"] diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake index 1d3a69e455..87476b1b8c 100644 --- a/railties/lib/rails/tasks/yarn.rake +++ b/railties/lib/rails/tasks/yarn.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true namespace :yarn do desc "Install all JavaScript dependencies as specified via Yarn" task :install do -- cgit v1.2.3 From 5803640261a324bd7d7665a2bad5b5dc6da29255 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 26 Jun 2017 05:46:12 +0900 Subject: Do not generate unused components contents in `app:update` task Currently, `app:update` generates all contents regardless of the component using in application. For example, even if not using Action Cable, `app:update` will generate a contents related to Action Cable. This is a little inconvenient. This PR checks the existence of the component and does not generate unnecessary contents. Can not check all options in this way. However, it will be able to prevent the generation of unnecessary files. --- railties/lib/rails/tasks/framework.rake | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'railties/lib/rails/tasks') diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index f7e8f4f340..6c6e86d78d 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -36,38 +36,21 @@ namespace :app do end namespace :update do - class RailsUpdate - def self.invoke_from_app_generator(method) - app_generator.send(method) - end - - def self.app_generator - @app_generator ||= begin - 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 - File.exist?(Rails.root.join("config", "application.rb")) ? - gen.send(:app_const) : gen.send(:valid_const?) - gen - end - end - end + require_relative "../app_updater" # desc "Update config/boot.rb from your current rails install" task :configs do - RailsUpdate.invoke_from_app_generator :create_boot_file - RailsUpdate.invoke_from_app_generator :update_config_files + Rails::AppUpdater.invoke_from_app_generator :create_boot_file + Rails::AppUpdater.invoke_from_app_generator :update_config_files end # desc "Adds new executables to the application bin/ directory" task :bin do - RailsUpdate.invoke_from_app_generator :update_bin_files + Rails::AppUpdater.invoke_from_app_generator :update_bin_files end task :upgrade_guide_info do - RailsUpdate.invoke_from_app_generator :display_upgrade_guide_info + Rails::AppUpdater.invoke_from_app_generator :display_upgrade_guide_info end end end -- cgit v1.2.3