From: Tom Hughes Date: Wed, 7 Sep 2016 10:43:36 +0000 (+0100) Subject: Fix rubocop warnings X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/b174082ec71a9a741054e4c42be6ca8e8dd0264c Fix rubocop warnings --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 343c145d3..13b8fc9df 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -27,7 +27,7 @@ Metrics/LineLength: # Offense count: 23 # Configuration parameters: CountComments. Metrics/MethodLength: - Max: 30 + Max: 40 # Offense count: 1 Metrics/PerceivedComplexity: diff --git a/cookbooks/planet/files/default/replication-bin/replicate-changesets b/cookbooks/planet/files/default/replication-bin/replicate-changesets index e71d4c548..f158ef3da 100644 --- a/cookbooks/planet/files/default/replication-bin/replicate-changesets +++ b/cookbooks/planet/files/default/replication-bin/replicate-changesets @@ -120,9 +120,7 @@ end ## # sync a file to guarantee it's on disk def fsync(f) - File.open(f) do |fh| - fh.fsync - end + File.open(f, &:fsync) end ##