lib/plugins/pluginmanager.rb in rsence-2.0.0.7.pre vs lib/plugins/pluginmanager.rb in rsence-2.0.0.8.pre
- old
+ new
@@ -226,19 +226,15 @@
# The human-readable version of the package
:version => '0.0.0',
# A brief description of the package (rdoc formatting supported)
- :description => 'No Description given',
+ :description => 'No Description',
# A flag (when false) prevents the plugin from automatically reload when changed.
:reloadable => true,
- # A flag (when false) enables automatic construction
- # of the Plugin and Servlet classes contained.
- :inits_self => false,
-
# System version requirement.
:sys_version => '>= 1.0.0',
# Path to bundle
:path => bundle_path,
@@ -285,27 +281,23 @@
:plugin_manager => self,
:src_path => bundle_file_path,
:src => bundle_src
} )
- if bundle_info[:inits_self]
- warn "Plugins can't init them self anymore. Please fix plugin: #{bundle_name.inspect}"
- else
- module_ns.constants.each do |module_const_name|
- module_const = module_ns.const_get( module_const_name )
- if module_const.class == Class
- bundle_type = module_const.bundle_type
- if [:Servlet, :Plugin, :GUIPlugin].include? bundle_type
- bundle_inst = module_const.new( bundle_name, bundle_info, bundle_path, self )
- bundle_inst.register( bundle_name ) if [ :Plugin, :GUIPlugin ].include?( bundle_type )
- break
- else
- warn "Can't init class: #{module_const.to_s}"
- break
- end
+ module_ns.constants.each do |module_const_name|
+ module_const = module_ns.const_get( module_const_name )
+ if module_const.class == Class
+ bundle_type = module_const.bundle_type
+ if [:Servlet, :Plugin, :GUIPlugin].include? bundle_type
+ bundle_inst = module_const.new( bundle_name, bundle_info, bundle_path, self )
+ bundle_inst.register( bundle_name ) if [ :Plugin, :GUIPlugin ].include?( bundle_type )
+ break
else
- warn "module_const.class: #{module_const.class.inspect}"
+ warn "Can't init class: #{module_const.to_s}"
+ break
end
+ else
+ warn "Invalid module_const.class: #{module_const.class.inspect}"
end
end
end
# Registers plugin class +inst+ into the registry using +bundle_name+