]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/libraries/postgresql.rb
Fix style issues found by new rubocop version
[chef.git] / cookbooks / postgresql / libraries / postgresql.rb
index 0b405e89bc609eaabebd317f75b53d85f1b763dd..6960ec9890b9db2c6d69855b52b0c9235f4466bb 100644 (file)
@@ -1,4 +1,4 @@
-require 'chef/mixin/command'
+require "chef/mixin/command"
 
 class Chef
   class PostgreSQL
@@ -109,7 +109,7 @@ class Chef
 
     def parse_acl(acl)
       acl.sub(/^\{(.*)\}$/, "\\1").split(",").each_with_object({}) do |entry, permissions|
-        entry = entry.sub(/^"(.*)"$/) { Regexp.last_match[1].gsub(/\\"/, '"') }.sub(/\/.*$/, "")
+        entry = entry.sub(/^"(.*)"$/) { Regexp.last_match[1].gsub(/\\"/, '"') }.sub(%r{/.*$}, "")
         user, privileges = entry.split("=")
 
         user = user.sub(/^"(.*)"$/, "\\1")