X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/9bca5f05185dde08efcf2d5f1a2bf66c8cdc9f00..13f25d067b968034570bc697070b6f07a4b9b0ce:/cookbooks/postgresql/libraries/postgresql.rb diff --git a/cookbooks/postgresql/libraries/postgresql.rb b/cookbooks/postgresql/libraries/postgresql.rb index 0b405e89b..6960ec989 100644 --- a/cookbooks/postgresql/libraries/postgresql.rb +++ b/cookbooks/postgresql/libraries/postgresql.rb @@ -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")