Commit 07d4e5ae authored by Lamont Granquist's avatar Lamont Granquist
Browse files

fix conditional removal of DSL



this allows chef-sugar to continue to be used with omnibus
Signed-off-by: default avatarLamont Granquist <lamont@scriptkiddie.org>
parent ec27d23c
......@@ -20,7 +20,7 @@ class Chef
extend self
# these helpers have been moved to core-chef
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
#
# Determine if the current architecture is 64-bit
#
......@@ -136,7 +136,7 @@ class Chef
end
module DSL
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
# @see Chef::Sugar::Architecture#_64_bit?
def _64_bit?; Chef::Sugar::Architecture._64_bit?(node); end
......
......@@ -20,7 +20,7 @@ class Chef
extend self
# these helpers have been moved to core chef
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
#
# Returns true if the current node is a docker container.
#
......@@ -36,7 +36,7 @@ class Chef
end
module DSL
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
# @see Chef::Sugar::Docker#docker?
def docker?; Chef::Sugar::Docker.docker?(node); end
end
......
......@@ -20,7 +20,7 @@ class Chef
extend self
# these helpers have been moved to core-chef
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
#
# Returns true if the current node is provisioned by Test Kitchen.
#
......@@ -36,7 +36,7 @@ class Chef
end
module DSL
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
# @see Chef::Sugar::Kitchen#kitchen?
def kitchen?; Chef::Sugar::Kitchen.kitchen?(node); end
end
......
......@@ -122,7 +122,7 @@ class Chef
end
# these helpers have been moved to core chef
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
#
# Determine if the current node is linux mint.
#
......
......@@ -20,7 +20,7 @@ class Chef
extend self
# these helpers have been moved to core chef
unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
#
# Determine if the current node is a member of the arch family.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment