aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-08-13 21:41:05 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-08-13 22:04:42 +0900
commitef2016f8885ccd30c37ca97e76786503325f4e81 (patch)
tree9623ea9bc09edb2a61257b143f889797c9a03a2d /tasks
parent1f37d846a91e4048367f6185371ec0abb523712c (diff)
downloadrails-ef2016f8885ccd30c37ca97e76786503325f4e81.tar.gz
rails-ef2016f8885ccd30c37ca97e76786503325f4e81.tar.bz2
rails-ef2016f8885ccd30c37ca97e76786503325f4e81.zip
Use frozen string literal in tasks/
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index 6ff37fb415..aa8ba44c1a 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
FRAMEWORKS = %w( activesupport activemodel activerecord actionview actionpack activejob actionmailer actioncable activestorage railties )
FRAMEWORK_NAMES = Hash.new { |h, k| k.split(/(?<=active|action)/).map(&:capitalize).join(" ") }
@@ -72,9 +74,9 @@ npm_version = version.gsub(/\./).with_index { |s, i| i >= 2 ? "-" : s }
task gem => %w(update_versions pkg) do
cmd = ""
- cmd << "cd #{framework} && " unless framework == "rails"
- cmd << "bundle exec rake package && " unless framework == "rails"
- cmd << "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/"
+ cmd += "cd #{framework} && " unless framework == "rails"
+ cmd += "bundle exec rake package && " unless framework == "rails"
+ cmd += "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/"
sh cmd
end
@@ -104,7 +106,7 @@ namespace :changelog do
current_contents = File.read(fname)
header = "## Rails #{version} (#{Date.today.strftime('%B %d, %Y')}) ##\n\n"
- header << "* No changes.\n\n\n" if current_contents =~ /\A##/
+ header += "* No changes.\n\n\n" if current_contents =~ /\A##/
contents = header + current_contents
File.open(fname, "wb") { |f| f.write contents }
end