lib/fusuma/plugin/manager.rb in fusuma-1.0 vs lib/fusuma/plugin/manager.rb in fusuma-1.1

- old
+ new

@@ -1,7 +1,8 @@ # frozen_string_literal: true +require 'pathname' require_relative '../multi_logger.rb' module Fusuma module Plugin # Manage Fusuma plugins @@ -9,12 +10,12 @@ def initialize(plugin_class) @plugin_class = plugin_class end def require_siblings_from_local - search_key = File.join('./lib', plugin_dir_name, '*.rb') - Dir.glob(search_key).each do |siblings_plugin| - require './' + siblings_plugin + search_key = File.join('../../', plugin_dir_name, '*.rb') + Pathname.new(__dir__).glob(search_key).each do |siblings_plugin| + require siblings_plugin end end def require_siblings_from_gems search_key = File.join(plugin_dir_name, '*.rb')