diff --git a/lib/matchers/matchers.rb b/lib/matchers/matchers.rb index b972a36cf..76b3e7ffb 100644 --- a/lib/matchers/matchers.rb +++ b/lib/matchers/matchers.rb @@ -70,7 +70,7 @@ end # matcher to check /etc/passwd, /etc/shadow and /etc/group RSpec::Matchers.define :contain_legacy_plus do match do |file| - warn '[DEPRECATION] `contain_legacy_plus` is deprecated and will be removed for InSpec 1.0. Please use `describe file(\'/etc/passwd\') do its(\'content\') { should_not match /^\+:/ } end`' + warn '[DEPRECATION] `contain_legacy_plus` is deprecated and will be removed in the next major version. Please use `describe file(\'/etc/passwd\') do its(\'content\') { should_not match /^\+:/ } end`' file.content =~ /^\+:/ end end @@ -78,7 +78,7 @@ end # verifies that no entry in an array contains a value RSpec::Matchers.define :contain_match do |regex| match do |arr| - warn '[DEPRECATION] `contain_match` is deprecated and will be removed for InSpec 1.0. See https://github.com/chef/inspec/issues/738 for more details' + warn '[DEPRECATION] `contain_match` is deprecated and will be removed in the next major version. See https://github.com/chef/inspec/issues/738 for more details' arr.inject { |result, i| result = i.match(regex) result || i.match(/$/) @@ -88,7 +88,7 @@ end RSpec::Matchers.define :contain_duplicates do match do |arr| - warn '[DEPRECATION] `contain_duplicates` is deprecated and will be removed for InSpec 1.0. See https://github.com/chef/inspec/issues/738 for more details' + warn '[DEPRECATION] `contain_duplicates` is deprecated and will be removed in the next major version. See https://github.com/chef/inspec/issues/738 for more details' dup = arr.select { |element| arr.count(element) > 1 } !dup.uniq.empty? end diff --git a/lib/resources/passwd.rb b/lib/resources/passwd.rb index f0a7f6c8c..f1d27e2da 100644 --- a/lib/resources/passwd.rb +++ b/lib/resources/passwd.rb @@ -62,17 +62,17 @@ module Inspec::Resources .add(:shells, field: 'shell') filter.add(:count) { |t, _| - warn '[DEPRECATION] `passwd.count` is deprecated. Please use `passwd.entries.length` instead. It will be removed in version 1.0.0.' + warn '[DEPRECATION] `passwd.count` is deprecated. Please use `passwd.entries.length` instead. It will be removed in the next major version.' t.entries.length } filter.add(:usernames) { |t, x| - warn '[DEPRECATION] `passwd.usernames` is deprecated. Please use `passwd.users` instead. It will be removed in version 1.0.0.' + warn '[DEPRECATION] `passwd.usernames` is deprecated. Please use `passwd.users` instead. It will be removed in the next major version.' t.users(x) } filter.add(:username) { |t, x| - warn '[DEPRECATION] `passwd.username` is deprecated. Please use `passwd.users` instead. It will be removed in version 1.0.0.' + warn '[DEPRECATION] `passwd.username` is deprecated. Please use `passwd.users` instead. It will be removed in the next major version.' t.users(x)[0] } @@ -84,7 +84,7 @@ module Inspec::Resources } def uid(x) - warn '[DEPRECATION] `passwd.uid(arg)` is deprecated. Please use `passwd.uids(arg)` instead. It will be removed in version 1.0.0.' + warn '[DEPRECATION] `passwd.uid(arg)` is deprecated. Please use `passwd.uids(arg)` instead. It will be removed in the next major version.' uids(x) end