diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-26 20:47:47 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-26 20:47:47 -0500 |
commit | bf17c8a531bc8059d50ad731398002a3e7162a7d (patch) | |
tree | bb144c0c7295f99d5aeb154b5b6722b27f29fab7 /railties/lib | |
parent | 92449280107fe7134ffd7825a0c7e540a65adc24 (diff) | |
download | rails-bf17c8a531bc8059d50ad731398002a3e7162a7d.tar.gz rails-bf17c8a531bc8059d50ad731398002a3e7162a7d.tar.bz2 rails-bf17c8a531bc8059d50ad731398002a3e7162a7d.zip |
Add back --skip-turbolinks and remove --skip-gems
For the most part of cases --skip-gems option just remove one line in
the Gemfile. This is not worth for the complexity it adds.
Closes #17196
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 1eca86bd30..92ed9136a0 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -41,9 +41,6 @@ module Rails class_option :skip_active_record, type: :boolean, aliases: '-O', default: false, desc: 'Skip Active Record files' - class_option :skip_gems, type: :array, default: [], - desc: 'Skip the provided gems files' - class_option :skip_sprockets, type: :boolean, aliases: '-S', default: false, desc: 'Skip Sprockets files' @@ -65,6 +62,9 @@ module Rails class_option :edge, type: :boolean, default: false, desc: "Setup the #{name} with Gemfile pointing to Rails repository" + class_option :skip_turbolinks, type: :boolean, default: false, + desc: 'Skip turbolinks gem' + class_option :skip_test_unit, type: :boolean, aliases: '-T', default: false, desc: 'Skip Test::Unit files' @@ -79,7 +79,7 @@ module Rails end def initialize(*args) - @gem_filter = lambda { |gem| !options[:skip_gems].include?(gem.name) } + @gem_filter = lambda { |gem| true } @extra_entries = [] super convert_database_option_for_jruby @@ -287,8 +287,11 @@ module Rails "Use #{options[:javascript]} as the JavaScript library") end - gems << GemfileEntry.version("turbolinks", nil, - "Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks") + unless options[:skip_turbolinks] + gems << GemfileEntry.version("turbolinks", nil, + "Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks") + end + gems end end |