lib/caboodle/kit.rb in caboodle-0.2.15 vs lib/caboodle/kit.rb in caboodle-0.2.16

- old
+ new

@@ -62,10 +62,11 @@ def is_a_caboodle_kit true end def load_config p + set :config, p loaded = YAML.load_file(p) Hashie::Mash.new(loaded).each{ |k,v| v.strip! if v.class == String Caboodle::Site[k.to_s] = v } rescue puts "Warning! Skipping #{p}" Caboodle::Site.kits.uniq! @@ -130,11 +131,11 @@ unless name.blank? kit_name = name.to_s.split("::").last || name kit_name = kit_name.downcase orig = Caboodle.constants begin - require "caboodle/kits/#{kit_name}/#{kit_name}" #rescue puts "Problem loading Kit: #{kit_name}" + require "caboodle/kits/#{kit_name}/#{kit_name}" added = Caboodle.constants - orig added.each do |d| c = Caboodle.const_get(d) if c.respond_to?(:is_a_caboodle_kit) c.register_kit @@ -155,10 +156,10 @@ unless name.blank? kit_name = name.to_s.split("::").last || name kit_name = kit_name.downcase puts "Unloading Kit: #{kit_name}" orig = Caboodle.constants - require "caboodle/kits/#{kit_name}/#{kit_name}" #rescue puts "Problem loading Kit: #{kit_name}" + require "caboodle/kits/#{kit_name}/#{kit_name}" added = Caboodle.constants - orig added.each do |d| c = Caboodle.const_get(d) if c.respond_to?(:is_a_caboodle_kit) c.unregister_kit \ No newline at end of file