def config(gem_name, options={})
            config_file = Manager.instance.resource(gem_name, "/defaults.yaml")
            if config_file
                begin
                defaults = YAML.load_file(config_file)
                return defaults.merge(options)
                rescue
                    raise "Error loading config #{config_file} for gem #{gem_name}"
                end
            else
                return options
            end
        end
def config(gem_name, options={})
            config_file = Manager.instance.resource(gem_name, "/defaults.yaml")
            if config_file
                begin
                defaults = YAML.load_file(config_file)
                return defaults.merge(options)
                rescue
                    raise "Error loading config #{config_file} for gem #{gem_name}"
                end
            else
                return options
            end
        end
While Manager.resource will find arbitrary resources, a special
 case is when you need to load a set of configuration defaults.
 GemPlugin normalizes this to be if you have a file "resources/defaults.yaml"
 then you'll be able to load them via Manager.config.

 How you use the method is you get the options the user wants set, pass
 them to Manager.instance.config, and what you get back is a new Hash
 with the user's settings overriding the defaults.

   opts = Manager.instance.config "mygem", :age => 12, :max_load => .9

 In the above case, if defaults had {:age => 14} then it would be
 changed to 12.

 This loads the .yaml file on the fly every time, so doing it a
 whole lot is very stupid.  If you need to make frequent calls to
 this, call it once with no options (Manager.instance.config) then
 use the returned defaults directly from then on.