lib/tracksperanto.rb in tracksperanto-2.12.0 vs lib/tracksperanto.rb in tracksperanto-3.0.0
- old
+ new
@@ -1,30 +1,30 @@
# -*- 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.12.0'
+ VERSION = '3.0.0'
module Import; end
module Export; end
- module Middleware; end
+ module Tool; end
module Pipeline; end
class UnknownExporterError < NameError; end
class UnknownImporterError < NameError; end
- class UnknownMiddlewareError < NameError; end
+ class UnknownToolError < NameError; end
class << self
# Returns the array of all exporter classes defined
attr_accessor :exporters
# Returns the array of all importer classes defined
attr_accessor :importers
- # Returns the array of all available middlewares
- attr_accessor :middlewares
+ # Returns the array of all available tools
+ attr_accessor :tools
# Returns the names of all the importers
def importer_names
importers.map{|e| e.const_name }
end
@@ -32,13 +32,13 @@
# Returns the names of all the exporters
def exporter_names
exporters.map{|e| e.const_name }
end
- # Returns the names of all the middlewares
- def middleware_names
- middlewares.map{|e| e.const_name }
+ # Returns the names of all the tools
+ def tool_names
+ tools.map{|e| e.const_name }
end
def exporters
sort_on_human_name(@exporters)
end
@@ -53,19 +53,19 @@
array.sort!{|a, b| a.human_name <=> b.human_name }
array
end
end
- self.exporters, self.importers, self.middlewares = [], [], []
+ self.exporters, self.importers, self.tools = [], [], []
- # Case-insensitive search for a middleware class by name
- def self.get_middleware(name)
- middlewares.each do | x |
+ # Case-insensitive search for a tool class by name
+ def self.get_tool(name)
+ tools.each do | x |
return x if x.const_name.downcase == name.downcase
end
- raise UnknownMiddlewareError, "Unknown middleware #{name.inspect}"
+ raise UnknownToolError, "Unknown tool #{name.inspect}"
end
# Case-insensitive search for an export module by name
def self.get_exporter(name)
exporters.each do | x |
@@ -101,10 +101,11 @@
simple_export
uv_coordinates
buffering_reader
parameters
yield_non_empty
+ pf_coords
).each do | submodule |
require File.join(Tracksperanto::PATH, "tracksperanto", submodule)
end
# Load importers
@@ -115,11 +116,11 @@
# Load exporters
Dir.glob(File.dirname(__FILE__) + '/export/*.rb').sort.each do | i |
require i
end
-# Load middleware
-Dir.glob(File.dirname(__FILE__) + '/middleware/*.rb').sort.each do | i |
+# Load tool
+Dir.glob(File.dirname(__FILE__) + '/tools/*.rb').sort.each do | i |
require i
end
# Load pipelines
Dir.glob(File.dirname(__FILE__) + '/pipeline/*.rb').sort.each do | i |