diff options
author | Thom May <thom@may.lt> | 2018-02-16 09:50:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 09:50:53 +0000 |
commit | fd546d84764e25cf81fc4e327f976e7cdbfcd596 (patch) | |
tree | 51e6b36ab43d0004a3d62d3ce9a57c4a7cb3baf7 | |
parent | f2b345a4314a19929fe7271bd3eaee1f590a695f (diff) | |
parent | 47e8a363be9315ef77830344d95048791d4b4a85 (diff) | |
download | ohai-fd546d84764e25cf81fc4e327f976e7cdbfcd596.tar.gz |
Merge pull request #1128 from chef/modern_chef_config
Simplify path logic by requiring chef-config 12.8+
-rw-r--r-- | lib/ohai/loader.rb | 7 | ||||
-rw-r--r-- | ohai.gemspec | 2 |
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 f75cde0d..d53c4322 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", "< 15" + s.add_dependency "chef-config", ">= 12.8", "< 15" # 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. |