From 7f3c852cc66f172e180bcbb9fbd443d3b9746bc8 Mon Sep 17 00:00:00 2001 From: Casey Williams Date: Tue, 13 Nov 2018 08:24:42 -0800 Subject: [PATCH 1/2] (maint) Predeclare Puppet module before ResourceApi Fixes failures to load the resource API in puppet-agent before the puppet module has been declared. --- lib/puppet/resource_api/data_type_handling.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/resource_api/data_type_handling.rb b/lib/puppet/resource_api/data_type_handling.rb index 61c6348c..69eee55c 100644 --- a/lib/puppet/resource_api/data_type_handling.rb +++ b/lib/puppet/resource_api/data_type_handling.rb @@ -1,4 +1,4 @@ -module Puppet::ResourceApi; end # predeclare the main module # rubocop:disable Style/Documentation +module Puppet; module ResourceApi; end; end # predeclare the main module # rubocop:disable Style/Documentation # This module is used to handle data inside types, contains methods for munging # and validation of the type values. From 8adc5b535a134e1d4e422d79910d7e031052f0b1 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Tue, 13 Nov 2018 16:50:35 +0000 Subject: [PATCH 2/2] (maint) teach rubocop the way of the workaround --- lib/puppet/resource_api/data_type_handling.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/resource_api/data_type_handling.rb b/lib/puppet/resource_api/data_type_handling.rb index 69eee55c..d293c959 100644 --- a/lib/puppet/resource_api/data_type_handling.rb +++ b/lib/puppet/resource_api/data_type_handling.rb @@ -1,4 +1,4 @@ -module Puppet; module ResourceApi; end; end # predeclare the main module # rubocop:disable Style/Documentation +module Puppet; module ResourceApi; end; end # predeclare the main module # rubocop:disable Style/Documentation,Style/ClassAndModuleChildren # This module is used to handle data inside types, contains methods for munging # and validation of the type values.