vmc-ng/lib/vmc/plugin.rb in vmc-0.4.0.beta.36 vs vmc-ng/lib/vmc/plugin.rb in vmc-0.4.0.beta.37
- old
+ new
@@ -19,9 +19,16 @@
Gem.source_index.find_name(/vmc-plugin/)
end
enabled = Set.new(matching.collect(&:name))
+ Gem.loaded_specs["vmc"].dependencies.each do |dep|
+ if dep.name =~ /vmc-plugin/ && dep.type == :runtime
+ require "#{dep.name}/plugin"
+ enabled.delete dep.name
+ end
+ end
+
# allow explicit enabling/disabling of gems via config
plugins = File.expand_path(VMC::PLUGINS_FILE)
if File.exists?(plugins) && yaml = YAML.load_file(plugins)
enabled += yaml["enabled"] if yaml["enabled"]
enabled -= yaml["disabled"] if yaml["disabled"]