aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-08-15 08:34:31 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-08-15 08:34:31 +0300
commitea37ccddba06466ddcde67d6c2814e401d1e2c5c (patch)
tree07ac98becd0ef0dc84b33c2a4e024de6a6c8d76d /tasks
parente715a64732f7b2f82aa809e59cfee83f892795f1 (diff)
downloadrails-ea37ccddba06466ddcde67d6c2814e401d1e2c5c.tar.gz
rails-ea37ccddba06466ddcde67d6c2814e401d1e2c5c.tar.bz2
rails-ea37ccddba06466ddcde67d6c2814e401d1e2c5c.zip
Fix rubocop offenses
- Layout/TrailingWhitespace ``` actionpack/lib/action_controller/metal/request_forgery_protection.rb:49:4: C: Layout/TrailingWhitespace: Trailing whitespace detected. # ^ ``` Related to c3787494eda - Performance/StartWith ``` tasks/release.rb:108:44: C: Performance/StartWith: Use String#start_with? instead of a regex match anchored to the beginning of the string. header += "* No changes.\n\n\n" if current_contents =~ /\A##/ ```
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index f13342b90c..1e83814bae 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -105,7 +105,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.start_with?("##")
contents = header + current_contents
File.write(fname, contents)
end