lib/darkext.rb in darkhelmet-darkext-0.10.0 vs lib/darkext.rb in darkhelmet-darkext-0.11.0

- old
+ new

@@ -1,7 +1,13 @@ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) -Dir[File.join(File.join(File.dirname(__FILE__), 'darkext'), '*.rb')].sort.each do |lib| - # don't include sinatra stuff by defaults - require lib unless lib.include?('sinatra') || lib.include?('sitemap') -end +libs = Dir[File.join(File.join(File.dirname(__FILE__), 'darkext'), '*.rb')] + +# Don't load these by default +other_libs = libs.reject! { |lib| lib.include?('sinatra') || lib.include?('sitemap') } + +libs.reject! { |lib| lib.include?('beagle') }.first +libs.each { |lib| require lib } + +# autoload beagle +autoload(:Beagle, 'darkext/beagle')