summaryrefslogtreecommitdiff
path: root/chef-utils/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-11-12 12:35:30 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2019-11-12 12:35:30 -0800
commit3cff851cfa1f336d622cc30bd2991347b91cf77f (patch)
tree0e8e81474a32096958db91e242113027ce5b5020 /chef-utils/lib
parentae5a9aabfc6e1eec5581c45c300fb4286304e97b (diff)
downloadchef-3cff851cfa1f336d622cc30bd2991347b91cf77f.tar.gz
rename windows_ruby_platform? to windows_ruby?
while it checks against the RUBY_PLATFORM to see if it is windows, and so therefore the old name sort of makes sense, it does not make sense in the context of all the rest of the chef platform helpers that have the `_platform?` suffix. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'chef-utils/lib')
-rw-r--r--chef-utils/lib/chef-utils/dsl/platform_family.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/chef-utils/lib/chef-utils/dsl/platform_family.rb b/chef-utils/lib/chef-utils/dsl/platform_family.rb
index 477d51c9a4..f13a2e146b 100644
--- a/chef-utils/lib/chef-utils/dsl/platform_family.rb
+++ b/chef-utils/lib/chef-utils/dsl/platform_family.rb
@@ -198,7 +198,7 @@ module ChefUtils
# As a result of this the `windows?` helper and the `ChefUtils.windows?` helper do not behave
# the same way in that the latter is not stubbable by chefspec.
#
- node ? node["platform_family"] == "windows" : windows_ruby_platform?
+ node ? node["platform_family"] == "windows" : windows_ruby?
end
# Determine if the ruby VM is currently running on a windows node (chefspec can never stub
@@ -206,7 +206,7 @@ module ChefUtils
#
# @return [Boolean]
#
- def windows_ruby_platform?
+ def windows_ruby?
!!(RUBY_PLATFORM =~ /mswin|mingw32|windows/)
end