summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-07-14 21:07:10 -0700
committerTim Smith <tsmith@chef.io>2017-07-14 21:07:10 -0700
commit9b252c4dca1ef1dab3dc0ae0ce0fa471c23c2b00 (patch)
tree2b0c1054896e5f992639967f5382f03a96b6c765
parent44974f03f6810cc1d37fce3b922d89600c6088b9 (diff)
downloadohai-9b252c4dca1ef1dab3dc0ae0ce0fa471c23c2b00.tar.gz
Require chef-config >= 13
This removes the need for this if statement and there's no reason for someone to have chef-config < 13 at this point. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/loader.rb7
-rw-r--r--ohai.gemspec2
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/ohai/loader.rb b/lib/ohai/loader.rb
index 64ae44bc..f91425fc 100644
--- a/lib/ohai/loader.rb
+++ b/lib/ohai/loader.rb
@@ -46,12 +46,7 @@ module Ohai
Ohai::Log.debug("Searching for Ohai plugins in #{plugin_dir}")
- # escape_glob_dir does not exist in 12.7 or below
- if ChefConfig::PathHelper.respond_to?(:escape_glob_dir)
- escaped = ChefConfig::PathHelper.escape_glob_dir(plugin_dir)
- else
- escaped = ChefConfig::PathHelper.escape_glob(plugin_dir)
- end
+ escaped = ChefConfig::PathHelper.escape_glob_dir(plugin_dir)
Dir[File.join(escaped, "**", "*.rb")].map do |file|
new(file, plugin_dir)
end
diff --git a/ohai.gemspec b/ohai.gemspec
index 108b9fbf..33a9154a 100644
--- a/ohai.gemspec
+++ b/ohai.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency "ipaddress"
s.add_dependency "wmi-lite", "~> 1.0"
s.add_dependency "ffi", "~> 1.9"
- s.add_dependency "chef-config", ">= 12.5.0.alpha.1", "< 14"
+ s.add_dependency "chef-config", ">= 13", "< 14"
# Note for ohai developers: If chef-config causes you grief, try:
# bundle install --with development
# this should work as long as chef is a development dependency in Gemfile.