ruby-changes:62248
From: Utkarsh <ko1@a...>
Date: Wed, 15 Jul 2020 16:06:06 +0900 (JST)
Subject: [ruby-changes:62248] 281898ed6c (master): [rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happy
https://git.ruby-lang.org/ruby.git/commit/?id=281898ed6c From 281898ed6c9a6f4f1e62acf1f4df0c7dcfc741e3 Mon Sep 17 00:00:00 2001 From: Utkarsh Gupta <utkarsh@d...> Date: Tue, 30 Jun 2020 13:46:25 +0530 Subject: [rubygems/rubygems] Fix Rakefile to make Style/SymbolArray happy In case of multiple Rake tasks, the default tasks would look something like this: `task default: [:spec, :rubocop]` Instead, they should use %i and look something like this: `task default: %i[spec rubocop]` Signed-off-by: Utkarsh Gupta <utkarsh@d...> https://github.com/rubygems/rubygems/commit/487ecd59ce diff --git a/lib/bundler/templates/newgem/Rakefile.tt b/lib/bundler/templates/newgem/Rakefile.tt index 57222f8c..5393eb4 100644 --- a/lib/bundler/templates/newgem/Rakefile.tt +++ b/lib/bundler/templates/newgem/Rakefile.tt @@ -36,4 +36,8 @@ Rake::ExtensionTask.new("<%= config[:underscored_name] %>") do |ext| https://github.com/ruby/ruby/blob/trunk/lib/bundler/templates/newgem/Rakefile.tt#L36 end <% end -%> -task default: <%= default_task_names.size == 1 ? default_task_names.first.inspect : default_task_names.inspect %> +<% if default_task_names.size == 1 -%> +task default: <%= default_task_names.first.inspect %> +<% else -%> +task default: %i[<%= default_task_names.join(" ") %>] +<% end -%> -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/