diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-08-09 18:56:33 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-08-10 08:47:06 +0300 |
commit | 8cc5a6e180f141d9ef3db3dddcad969f1bca9ec7 (patch) | |
tree | 73c4a6030d46271acc2d377d40d308430ade9183 | |
parent | 62442147fc7066935981c629994f77ba2c7e97d8 (diff) | |
download | rails-8cc5a6e180f141d9ef3db3dddcad969f1bca9ec7.tar.gz rails-8cc5a6e180f141d9ef3db3dddcad969f1bca9ec7.tar.bz2 rails-8cc5a6e180f141d9ef3db3dddcad969f1bca9ec7.zip |
`--skip-action-cable` pass throughs `rails plugin new`
-rw-r--r-- | railties/CHANGELOG.md | 4 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 73793be78c..f9d6258b22 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Add `--skip-action-cable` option to the plugin generator. + + *bogdanvlviv* + * Deprecate support of use `Rails::Application` subclass to start Rails server. *Yuji Yaginuma* diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 61c54b4222..dc1492a2d7 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -86,7 +86,7 @@ task default: :test end PASSTHROUGH_OPTIONS = [ - :skip_active_record, :skip_action_mailer, :skip_javascript, :skip_sprockets, :database, + :skip_active_record, :skip_action_mailer, :skip_javascript, :skip_action_cable, :skip_sprockets, :database, :javascript, :quiet, :pretend, :force, :skip ] diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 53d4ceb25a..cf581ce891 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -234,6 +234,12 @@ class PluginGeneratorTest < Rails::Generators::TestCase def test_action_cable_is_removed_from_frameworks_if_skip_action_cable_is_given run_generator [destination_root, "--skip-action-cable"] assert_file "test/dummy/config/application.rb", /#\s+require\s+["']action_cable\/engine["']/ + assert_no_file "test/dummy/config/cable.yml" + assert_no_file "test/dummy/app/assets/javascripts/cable.js" + assert_no_directory "test/dummy/app/channels" + assert_file "Gemfile" do |content| + assert_no_match(/redis/, content) + end end def test_ensure_that_database_option_is_passed_to_app_generator |