]> git.openstreetmap.org Git - chef.git/commitdiff
Updates for rubocop and foodcritic changes
authorTom Hughes <tom@compton.nu>
Tue, 3 May 2016 11:18:21 +0000 (12:18 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 3 May 2016 11:18:21 +0000 (12:18 +0100)
79 files changed:
cookbooks/accounts/.foodcritic
cookbooks/apache/.foodcritic
cookbooks/apt/.foodcritic
cookbooks/backup/.foodcritic
cookbooks/bind/.foodcritic
cookbooks/blog/.foodcritic
cookbooks/cgiirc/.foodcritic
cookbooks/chef/.foodcritic
cookbooks/chef/libraries/subversion.rb
cookbooks/civicrm/.foodcritic
cookbooks/clamav/.foodcritic
cookbooks/db/.foodcritic
cookbooks/dev/.foodcritic
cookbooks/devices/.foodcritic
cookbooks/dhcpd/.foodcritic
cookbooks/dns/.foodcritic
cookbooks/elasticsearch/.foodcritic
cookbooks/exim/.foodcritic
cookbooks/fail2ban/.foodcritic
cookbooks/forum/.foodcritic
cookbooks/foundation/.foodcritic
cookbooks/geodns/.foodcritic
cookbooks/git/.foodcritic
cookbooks/gps-tile/.foodcritic
cookbooks/hardware/.foodcritic
cookbooks/imagery/.foodcritic
cookbooks/incron/.foodcritic
cookbooks/kibana/.foodcritic
cookbooks/logstash/.foodcritic
cookbooks/mailman/.foodcritic
cookbooks/mediawiki/.foodcritic
cookbooks/memcached/.foodcritic
cookbooks/munin/.foodcritic
cookbooks/mysql/.foodcritic
cookbooks/networking/.foodcritic
cookbooks/nfs/.foodcritic
cookbooks/nginx/.foodcritic
cookbooks/nodejs/.foodcritic
cookbooks/nominatim/.foodcritic
cookbooks/ntp/.foodcritic
cookbooks/ohai/.foodcritic
cookbooks/openssh/.foodcritic
cookbooks/openvpn/.foodcritic
cookbooks/osmosis/.foodcritic
cookbooks/osqa/.foodcritic
cookbooks/otrs/.foodcritic
cookbooks/owl/.foodcritic
cookbooks/passenger/.foodcritic
cookbooks/piwik/.foodcritic
cookbooks/planet/.foodcritic
cookbooks/planet/files/default/replication-bin/replicate-changesets
cookbooks/postgresql/.foodcritic
cookbooks/roundup/.foodcritic
cookbooks/rsyncd/.foodcritic
cookbooks/serverinfo/.foodcritic
cookbooks/snmpd/.foodcritic
cookbooks/spamassassin/.foodcritic
cookbooks/squid/.foodcritic
cookbooks/ssl/.foodcritic
cookbooks/stateofthemap/.foodcritic
cookbooks/stats/.foodcritic
cookbooks/subversion/.foodcritic
cookbooks/supybot/.foodcritic
cookbooks/switch2osm/.foodcritic
cookbooks/sysctl/.foodcritic
cookbooks/sysfs/.foodcritic
cookbooks/taginfo/.foodcritic
cookbooks/thinkup/.foodcritic
cookbooks/tile/.foodcritic
cookbooks/tilecache/.foodcritic
cookbooks/tilelog/.foodcritic
cookbooks/tools/.foodcritic
cookbooks/trac/.foodcritic
cookbooks/web/.foodcritic
cookbooks/wiki/.foodcritic
cookbooks/wordpress/.foodcritic
cookbooks/xinetd/.foodcritic
cookbooks/yournavigation/.foodcritic
hooks/pre-commit

index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index dd2c7ec4925abaf9d26d578feebb9295e4188653..4f2b1cd0093dac58e3ce18040f257ab04eb9f2fc 100644 (file)
@@ -24,7 +24,7 @@ class Chef
         return {} unless ::File.exist?(::File.join(@new_resource.destination, ".svn"))
 
         @repo_attrs ||= svn_info.lines.each_with_object({}) do |line, attrs|
-          fail "Could not parse `svn info` data: #{line}" unless line =~ SVN_INFO_PATTERN
+          raise "Could not parse `svn info` data: #{line}" unless line =~ SVN_INFO_PATTERN
 
           property = Regexp.last_match[1]
           value = Regexp.last_match[2]
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 913f038a416e769b47e960ef729cff3b6f17e333..435876eff3558e2722f5c74b15bb26d27c172954 100644 (file)
@@ -1 +1,3 @@
 ~FC005
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index e1f6fe65ef209e7425c50eb05ad19feed4dd21d9..8addb0b7626e938b705f401400d3bd313bab7e4b 100644 (file)
@@ -1,3 +1,5 @@
 ~FC001
 ~FC003
 ~FC015
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3c1aef151c93816539e5fc246dcbae0b928a40b6..fb3d6138af0dc0686c8b19b0c2f30847ffefe4a5 100644 (file)
@@ -204,10 +204,10 @@ class Replicator
 
         # sanity check: the files we're moving into place
         # should be non-empty.
-        fail "Temporary gzip file should exist, but doesn't." unless File.exist?(tmp_data)
-        fail "Temporary state file should exist, but doesn't." unless File.exist?(tmp_state)
-        fail "Temporary gzip file should be non-empty, but isn't." if File.zero?(tmp_data)
-        fail "Temporary state file should be non-empty, but isn't." if File.zero?(tmp_state)
+        raise "Temporary gzip file should exist, but doesn't." unless File.exist?(tmp_data)
+        raise "Temporary state file should exist, but doesn't." unless File.exist?(tmp_state)
+        raise "Temporary gzip file should be non-empty, but isn't." if File.zero?(tmp_data)
+        raise "Temporary state file should be non-empty, but isn't." if File.zero?(tmp_state)
 
         FileUtils.mv(tmp_data, data_file)
         FileUtils.mv(tmp_state, @config["state_file"])
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 698ef4c72d872a3155a9cfd4ab212dda08603e56..4081e370419f07c5764a7667d257696405491a0f 100644 (file)
@@ -1 +1,3 @@
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131e2614ac5837ba1c22aa6c59c15608c9f8..d8973b2fb531e67e4180a611498f340246d1ab3f 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index e9a7c92333039bf61f4f9c6ba263b883432b67ef..e32acd81f21cfca311201edf4042971a9f41981b 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC015
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff00016cb7234f45853f10398815db197e8..a085263c88d33bf5f31d0db1a6beb8cd2a9ef9f6 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 55d23300cee8c20ff844da2a421821cd7bd7da7b..57c23a35a1026fa3c805278c392fd36b2e3aff62 100755 (executable)
@@ -3,7 +3,7 @@
 ok = true
 
 if IO.popen(["git", "ls-files", "--unmerged"]).read.empty?
-  need_stash = IO.popen(%w(git diff)).read.length > 0
+  need_stash = !IO.popen(%w(git diff)).read.empty?
 
   system("git", "stash", "save", "--keep-index", "--quiet") if need_stash