Class: Inspec::Resources::PlatformResource::NameCleaned

Inherits:
String
  • Object
show all
Defined in:
lib/resources/platform.rb

Overview

This is a string override for platform.name. TODO: removed in inspec 2.0

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



31
32
33
34
35
36
37
38
39
# File 'lib/resources/platform.rb', line 31

def ==(other)
  if other =~ /[A-Z ]/
    cleaned = other.downcase.tr(' ', '_')
    Inspec::Log.warn "[DEPRECATED] Platform names will become lowercase in InSpec 2.0. Please match on '#{cleaned}' instead of '#{other}'"
    super(cleaned)
  else
    super(other)
  end
end