summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarsh@debian.org>2020-06-30 13:46:25 +0530
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-15 16:05:12 +0900
commit281898ed6c9a6f4f1e62acf1f4df0c7dcfc741e3 (patch)
treecec4b3f84a94416be80f7eeb2da200da14fcd1a9 /lib/bundler
parent8c65f612f4e4caaecfd3291907f48c9e075c0319 (diff)
[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@debian.org> https://github.com/rubygems/rubygems/commit/487ecd59ce
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3275
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/templates/newgem/Rakefile.tt6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/templates/newgem/Rakefile.tt b/lib/bundler/templates/newgem/Rakefile.tt
index 57222f8c56..5393eb4e22 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|
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 -%>