From ee8c61c052f9533c853a2ce7244a4d27e6aec540 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 14 Sep 2024 00:17:51 +0200 Subject: [PATCH] Fix safe Style/HashSyntax offenses --- .rubocop_todo.yml | 9 --------- lib/heathen/executioner.rb | 2 +- unicorn.rb | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 75bec53..1b62368 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -317,15 +317,6 @@ Style/HashEachMethods: Exclude: - 'lib/heathen/task.rb' -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. -# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys -# SupportedShorthandSyntax: always, never, either, consistent -Style/HashSyntax: - Exclude: - - 'lib/heathen/executioner.rb' - - 'unicorn.rb' - # This cop supports safe autocorrection (--autocorrect). Style/IfUnlessModifier: Exclude: diff --git a/lib/heathen/executioner.rb b/lib/heathen/executioner.rb index 44374ed..abeac65 100644 --- a/lib/heathen/executioner.rb +++ b/lib/heathen/executioner.rb @@ -96,7 +96,7 @@ def _execute(*argv, options) command = argv.shift Open3.popen3(ENV, [command, "heathen: #{command}"], *argv, - :chdir => options[:dir] || Dir.getwd + chdir: options[:dir] || Dir.getwd ) do |stdin, stdout, stderr, wait_thr| pid = wait_thr[:pid] logger.info "[#{pid}] spawn '#{command} #{argv.join(' ')}'" diff --git a/unicorn.rb b/unicorn.rb index 694253a..10063e3 100644 --- a/unicorn.rb +++ b/unicorn.rb @@ -10,7 +10,7 @@ # Specify path to socket unicorn listens to, # we will use this in our nginx.conf later -listen @dir + '.unicorn.sock', :backlog => 64 +listen @dir + '.unicorn.sock', backlog: 64 # Set process id path pid @dir + 'tmp' + 'pids' + 'unicorn.pid'