lib/chef/sugar/kitchen.rb in chef-sugar-ng-5.0.4 vs lib/chef/sugar/kitchen.rb in chef-sugar-ng-5.1.8
- old
+ new
@@ -17,24 +17,29 @@
class Chef
module Sugar
module Kitchen
extend self
- #
- # Returns true if the current node is provisioned by Test Kitchen.
- #
- # @param [Chef::Node] node
- # the node to check
- #
- # @return [Boolean]
- #
- def kitchen?(node)
- !ENV['TEST_KITCHEN'].nil?
+ # these helpers have been moved to core-chef
+ unless Gem::Requirement.new(">= 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
+ #
+ # Returns true if the current node is provisioned by Test Kitchen.
+ #
+ # @param [Chef::Node] node
+ # the node to check
+ #
+ # @return [Boolean]
+ #
+ def kitchen?(node)
+ !ENV['TEST_KITCHEN'].nil?
+ end
end
end
module DSL
- # @see Chef::Sugar::Kitchen#kitchen?
- def kitchen?; Chef::Sugar::Kitchen.kitchen?(node); end
+ unless 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
end
end
end