lib/trailblazer/loader.rb in trailblazer-loader-0.0.4 vs lib/trailblazer/loader.rb in trailblazer-loader-0.0.5
- old
+ new
@@ -1,7 +1,6 @@
require "trailblazer/loader/version"
-require "representable/pipeline"
require "pp"
module Trailblazer
class Loader
# Please note that this is subject to change - we're still finding out the best way
@@ -10,16 +9,16 @@
# NOTE: i will most probably use call_sheet and dry-container here soon.
def call(options={}, &block)
options[:concepts_root] ||= "app/concepts/"
options[:concept_dirs] = concept_dirs
- pipeline = options[:pipeline] || Representable::Pipeline[
+ pipeline = options[:pipeline] || Pipeline[
FindDirectories,
FindConcepts,
# PrintConcepts,
SortByLevel,
- Representable::Collect[ConceptName, ConceptFiles, SortCreateFirst, SortOperationLast, AddConceptFiles] # per concept.
+ Pipeline::Collect[ConceptName, ConceptFiles, SortCreateFirst, SortOperationLast, AddConceptFiles] # per concept.
]
if args = options[:insert] # FIXME: this only implements a sub-set.
# pipeline = Representable::Pipeline::Insert.(pipeline, *args) # FIXME: implement :before in Pipeline.
pipeline[3].insert(pipeline[3].index(args.last[:before]), args.first)
@@ -65,5 +64,7 @@
def load_files(files)
files.each { |file| yield file }
end
end
end
+
+require "trailblazer/loader/pipeline"