From 08e894e8e8d7080525f81e2840e7cbf34f012ed6 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sun, 13 Aug 2017 23:34:08 +0300 Subject: Register `--api` option for plugin generator by PASSTHROUGH_OPTIONS constant --- railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index a40fa78132..89e7b1c04a 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -87,14 +87,13 @@ task default: :test PASSTHROUGH_OPTIONS = [ :skip_active_record, :skip_action_mailer, :skip_javascript, :skip_action_cable, :skip_sprockets, :database, - :javascript, :quiet, :pretend, :force, :skip + :javascript, :api, :quiet, :pretend, :force, :skip ] def generate_test_dummy(force = false) opts = (options || {}).slice(*PASSTHROUGH_OPTIONS) opts[:force] = force opts[:skip_bundle] = true - opts[:api] = options.api? opts[:skip_listen] = true opts[:skip_git] = true opts[:skip_turbolinks] = true -- cgit v1.2.3 From cc15b343e5bc9a1b974020537e82aa8733f5f7e1 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sun, 13 Aug 2017 23:38:24 +0300 Subject: Remove `:force` from PASSTHROUGH_OPTIONS for plugin generator `:force` is setted inside the method `generate_test_dummy` --- railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 89e7b1c04a..6ab9a6e5bb 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -87,7 +87,7 @@ task default: :test PASSTHROUGH_OPTIONS = [ :skip_active_record, :skip_action_mailer, :skip_javascript, :skip_action_cable, :skip_sprockets, :database, - :javascript, :api, :quiet, :pretend, :force, :skip + :javascript, :api, :quiet, :pretend, :skip ] def generate_test_dummy(force = false) -- cgit v1.2.3