From a09aef90060dc75b0801e3f2eae58f85a3131b4f Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Sun, 11 Mar 2018 13:09:27 -0400 Subject: [PATCH] Remove unsupported use of proc in title patterns This will allow `puppet generate types` to function Example: Error: /etc/puppetlabs/code/environments/production/modules/splunk/lib/puppet/type/splunk_alert_actions.rb: title patterns that use procs are not supported. https://tickets.puppetlabs.com/browse/MODULES-4505?focusedCommentId=418416&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-418416 https://github.com/treydock/puppet-module-keycloak/pull/21 --- lib/puppet_x/puppetlabs/splunk/type.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/puppet_x/puppetlabs/splunk/type.rb b/lib/puppet_x/puppetlabs/splunk/type.rb index e6c00836..c3dce525 100644 --- a/lib/puppet_x/puppetlabs/splunk/type.rb +++ b/lib/puppet_x/puppetlabs/splunk/type.rb @@ -10,14 +10,14 @@ def self.clone_type(type) [%r{^([^\/]*)$}, [[:section]]], # matches section titles without slashes, like 'tcpout:indexers' [%r{^(.*\/\/.*)\/(.*)$}, # matches section titles containing '//' and a setting, [ # like: 'monitor:///var/log/messages/index' - [:section, ->(x) { x }], # where 'monitor:///var/log/messages' is the section - [:setting, ->(x) { x }] # and 'index' is the setting. + [:section], # where 'monitor:///var/log/messages' is the section + [:setting] # and 'index' is the setting. ]], [%r{^(.*\/\/.*)$}, [[:section]]], # matches section titles containing '//', like 'tcp://127.0.0.1:19500' [%r{^(.*)\/(.*)$}, # matches plain 'section/setting' titles, like: 'tcpout:indexers/server' [ - [:section, ->(x) { x }], - [:setting, ->(x) { x }] + [:section], + [:setting] ]] ] end