Merge pull request #4104 from inspec/mj/aws

Ensure AwsResourceMixin returns a resource name in deprecation message
This commit is contained in:
Miah Johnson 2019-05-20 19:52:27 -07:00 committed by GitHub
commit 83bc512f3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
module AwsResourceMixin
def initialize(resource_params = {})
Inspec.deprecate(:aws_resources_in_resource_pack, "Resource '#{@__resource_name__}'")
Inspec.deprecate(:aws_resources_in_resource_pack,
"Resource '#{@__resource_name__ ||= self.class.to_s}'")
validate_params(resource_params).each do |param, value|
instance_variable_set(:"@#{param}", value)
end