/usr/lib/ruby/vendor_ruby/chef_compat/monkeypatches/chef/provider.rb is in ruby-compat-resource 12.10.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | require 'chef/provider'
require 'chef/provider/lwrp_base'
class Chef::Provider
if !defined?(InlineResources)
InlineResources = Chef::Provider::LWRPBase::InlineResources
end
module InlineResources
require 'chef/dsl/recipe'
require 'chef/dsl/platform_introspection'
require 'chef/dsl/data_query'
require 'chef/dsl/include_recipe'
include Chef::DSL::Recipe
include Chef::DSL::PlatformIntrospection
include Chef::DSL::DataQuery
include Chef::DSL::IncludeRecipe
unless Chef::Provider::InlineResources::ClassMethods.instance_method(:action).source_location[0] =~ /chefspec/
# Don't override action if chefspec is doing its thing
module ::ChefCompat
module Monkeypatches
module InlineResources
module ClassMethods
def action(name, &block)
super(name) { send("compile_action_#{name}") }
# We put the action in its own method so that super() works.
define_method("compile_action_#{name}", &block)
end
end
end
end
end
module ClassMethods
prepend ChefCompat::Monkeypatches::InlineResources::ClassMethods
end
end
end
end
|