mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
Pre-load the gem resource to override the global gem method.
This seems problematic to me in general. We should probably not override global methods. Renaming this to rubygem and providing a deprecated alias seems like the right thing to do. Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
1ca94760ef
commit
5b6fdf9a98
2 changed files with 3 additions and 1 deletions
|
@ -110,3 +110,5 @@ end
|
|||
|
||||
# Many resources use FilterTable.
|
||||
require "inspec/utils/filter"
|
||||
# conflicts with global `gem` method so we need to pre-load this.
|
||||
require "inspec/resources/gem"
|
||||
|
|
|
@ -2,7 +2,7 @@ require "inspec/resources/command"
|
|||
|
||||
module Inspec::Resources
|
||||
class GemPackage < Inspec.resource(1)
|
||||
name "gem"
|
||||
name "gem" # TODO: rename to "rubygem" and provide alias
|
||||
supports platform: "unix"
|
||||
supports platform: "windows"
|
||||
desc "Use the gem InSpec audit resource to test if a global gem package is installed."
|
||||
|
|
Loading…
Reference in a new issue