lib/tracksperanto.rb in tracksperanto-2.9.5 vs lib/tracksperanto.rb in tracksperanto-2.9.6

- old
+ new

@@ -1,11 +1,11 @@ # -*- encoding : utf-8 -*- %w( stringio delegate tempfile flame_channel_parser obuf progressive_io ).map(&method(:require)) module Tracksperanto PATH = File.expand_path(File.dirname(__FILE__)) - VERSION = '2.9.5' + VERSION = '2.9.6' module Import; end module Export; end module Middleware; end module Pipeline; end @@ -36,10 +36,25 @@ # Returns the names of all the middlewares def middleware_names middlewares.map{|e| e.const_name } end + + def exporters + sort_on_human_name(@exporters) + end + + def importers + sort_on_human_name(@importers) + end + + private + + def sort_on_human_name(array) + array.sort!{|a, b| a.human_name <=> b.human_name } + array + end end self.exporters, self.importers, self.middlewares = [], [], [] # Case-insensitive search for a middleware class by name @@ -84,9 +99,11 @@ ext_io buffer_io simple_export uv_coordinates buffering_reader + parameters + yield_non_empty ).each do | submodule | require File.join(Tracksperanto::PATH, "tracksperanto", submodule) end # Load importers