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 3907cff..a085263 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index dd2c7ec..4f2b1cd 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 3907cff..a085263 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff..a085263 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff..a085263 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3907cff..a085263 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 3c1aef1..fb3d613 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 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index 3907cff..a085263 100644 (file)
@@ -1 +1,3 @@
 ~FC001
+~FC064
+~FC065
index 37c7131..d8973b2 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC003
+~FC064
+~FC065
index e9a7c92..e32acd8 100644 (file)
@@ -1,2 +1,4 @@
 ~FC001
 ~FC015
+~FC064
+~FC065
index 55d2330..57c23a3 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