mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Merge pull request #4898 from inspec/zenspider/system-plugin/fixes
Distinguish between user plugin gems and system gems and load system gems normally.
This commit is contained in:
commit
3e3dbdc8f1
1 changed files with 4 additions and 1 deletions
|
@ -48,9 +48,12 @@ module Inspec::Plugin::V2
|
|||
begin
|
||||
# We could use require, but under testing, we need to repeatedly reload the same
|
||||
# plugin. However, gems only work with require (rubygems dooes not overload `load`)
|
||||
if plugin_details.installation_type == :user_gem
|
||||
case plugin_details.installation_type
|
||||
when :user_gem
|
||||
activate_managed_gems_for_plugin(plugin_name)
|
||||
require plugin_details.entry_point
|
||||
when :system_gem
|
||||
require plugin_details.entry_point
|
||||
else
|
||||
load_path = plugin_details.entry_point
|
||||
load_path += ".rb" unless plugin_details.entry_point.end_with?(".rb")
|
||||
|
|
Loading…
Reference in a new issue