summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-12-12 14:33:49 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-03-15 18:03:28 -0700
commit87f7236b16b1ff446360defd3bcd6c52e6771ec7 (patch)
tree8c0a7cdf831f93f46812ba9a80171eba598d2e87 /spec/support
parentfb61966bbc7a2d8920d772ff7f3f3fc8543b107d (diff)
downloadchef-87f7236b16b1ff446360defd3bcd6c52e6771ec7.tar.gz
Yum package provider rewrite
squash and rebase of all the work Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/platform_helpers.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index f015a6cd50..1718632186 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -159,6 +159,26 @@ def freebsd?
!!(RUBY_PLATFORM =~ /freebsd/)
end
+def intel_64bit?
+ !!(ohai[:kernel][:machine] == "x86_64")
+end
+
+def rhel?
+ !!(ohai[:platform_family] == "rhel")
+end
+
+def rhel5?
+ rhel? && !!(ohai[:platform_version].to_i == 5)
+end
+
+def rhel6?
+ rhel? && !!(ohai[:platform_version].to_i == 6)
+end
+
+def rhel7?
+ rhel? && !!(ohai[:platform_version].to_i == 7)
+end
+
def debian_family?
!!(ohai[:platform_family] == "debian")
end