diff --git a/etc/deprecations.json b/etc/deprecations.json index 77f6cd7c9..90c71ad09 100644 --- a/etc/deprecations.json +++ b/etc/deprecations.json @@ -1,6 +1,6 @@ { "file_version": "1.0.0", - "unknown_group_action": "exit", + "unknown_group_action": "ignore", "groups": { "attrs_value_replaces_default": { "action": "ignore", @@ -26,7 +26,8 @@ }, "inspec_ui_methods": { "action": "ignore", - "suffix": "Please call `cli.ui` directly" + "suffix": "Please call `cli.ui` directly", + "comment": "See #3715" }, "mssql_session_pass_option": { "action": "warn", @@ -84,9 +85,8 @@ "action": "warn", "suffix": "This resource will be removed in InSpec 4.0" }, - "resource_user": { - "action": "warn", - "suffix": "This resource will be removed in InSpec 4.0." + "resource_user_serverspec_compat": { + "action": "warn" }, "resource_windows_registry_key": { "action": "warn", @@ -100,6 +100,9 @@ "supports_syntax": { "action": "warn" }, + "mount_parser_serverspec_compat": { + "action": "warn" + }, "wmi_non_hash_usage": { "action": "warn", "suffix": "This property will be removed in InSpec 4.0." diff --git a/lib/resources/aws/aws_iam_user.rb b/lib/resources/aws/aws_iam_user.rb index 936d1ddbf..d0c9f6fe2 100644 --- a/lib/resources/aws/aws_iam_user.rb +++ b/lib/resources/aws/aws_iam_user.rb @@ -22,7 +22,7 @@ class AwsIamUser < Inspec.resource(1) alias has_console_password? has_console_password def name - Inspec.deprecate(:properties_aws_iam_user, 'The aws_iam_users `name` property is deprecated. Please use `username` instead') + Inspec.deprecate(:properties_aws_iam_user, 'The aws_iam_user `name` property is deprecated. Please use `username` instead') username end diff --git a/lib/resources/host.rb b/lib/resources/host.rb index 0ffc0c89f..400c34b08 100644 --- a/lib/resources/host.rb +++ b/lib/resources/host.rb @@ -49,7 +49,7 @@ module Inspec::Resources @port = params[:port] if params[:proto] - Inspec.deprecate(:host_resource_proto_usage, 'The host resource `proto` parameter is deprecated. Please use `protocol`.') + Inspec.deprecate(:host_resource_proto_usage, 'The `host` resource `proto` resource parameter is deprecated. Please use `protocol`.') @protocol = params[:proto] else @protocol = params.fetch(:protocol, 'icmp') diff --git a/lib/resources/oracledb_session.rb b/lib/resources/oracledb_session.rb index 9c5c3dd64..ce55d8ba1 100644 --- a/lib/resources/oracledb_session.rb +++ b/lib/resources/oracledb_session.rb @@ -28,7 +28,7 @@ module Inspec::Resources @user = opts[:user] @password = opts[:password] || opts[:pass] if opts[:pass] - Inspec.deprecate(:oracaldb_session_pass_option, 'The oracledb_session `pass` option is deprecated. Please use `password`.') + Inspec.deprecate(:oracledb_session_pass_option, 'The oracledb_session `pass` option is deprecated. Please use `password`.') end @host = opts[:host] || 'localhost' diff --git a/lib/resources/users.rb b/lib/resources/users.rb index e7e9035b0..d8e40e8a7 100644 --- a/lib/resources/users.rb +++ b/lib/resources/users.rb @@ -213,35 +213,35 @@ module Inspec::Resources # implement 'mindays' method to be compatible with serverspec def minimum_days_between_password_change - Inspec.deprecate(:resource_user, 'The user resource `minimum_days_between_password_change` property is deprecated. Please use `mindays`.') + Inspec.deprecate(:resource_user_serverspec_compat, 'The user resource `minimum_days_between_password_change` property is deprecated. Please use `mindays`.') mindays end # implement 'maxdays' method to be compatible with serverspec def maximum_days_between_password_change - Inspec.deprecate(:resource_user, 'The user resource `maximum_days_between_password_change` property is deprecated. Please use `maxdays`.') + Inspec.deprecate(:resource_user_serverspec_compat, 'The user resource `maximum_days_between_password_change` property is deprecated. Please use `maxdays`.') maxdays end # implements rspec has matcher, to be compatible with serverspec # @see: https://github.com/rspec/rspec-expectations/blob/master/lib/rspec/matchers/built_in/has.rb def has_uid?(compare_uid) - Inspec.deprecate(:serverspec_compatibility, 'The user resource `has_uid?` matcher is deprecated.') + Inspec.deprecate(:resource_user_serverspec_compat, 'The user resource `has_uid?` matcher is deprecated.') uid == compare_uid end def has_home_directory?(compare_home) - Inspec.deprecate(:resource_user, 'The user resource `has_home_directory?` matcher is deprecated. Please use `its(\'home\')`.') + Inspec.deprecate(:resource_user_serverspec_compat, 'The user resource `has_home_directory?` matcher is deprecated. Please use `its(\'home\')`.') home == compare_home end def has_login_shell?(compare_shell) - Inspec.deprecate(:resource_user, 'The user resource `has_login_shell?` matcher is deprecated. Please use `its(\'shell\')`.') + Inspec.deprecate(:resource_user_serverspec_compat, 'The user resource `has_login_shell?` matcher is deprecated. Please use `its(\'shell\')`.') shell == compare_shell end def has_authorized_key?(_compare_key) - Inspec.deprecate(:resource_user, 'The user resource `has_authorized_key?` matcher is deprecated. There is no currently implemented alternative') + Inspec.deprecate(:resource_user_serverspec_compat, 'The user resource `has_authorized_key?` matcher is deprecated. There is no currently implemented alternative') raise NotImplementedError end diff --git a/lib/utils/parser.rb b/lib/utils/parser.rb index 66460648f..dd4cf0465 100644 --- a/lib/utils/parser.rb +++ b/lib/utils/parser.rb @@ -88,7 +88,7 @@ module LinuxMountParser # parse options as array mount_options[:options] = mount[5].gsub(/\(|\)/, '').split(',') else - Inspec.deprecate(:serverspec_compatibility, 'Parsing mount options in this fashion is deprecated') + Inspec.deprecate(:mount_parser_serverspec_compat, 'Parsing mount options in this fashion is deprecated') mount_options[:options] = {} mount[5].gsub(/\(|\)/, '').split(',').each do |option| name, val = option.split('=')