trailblazer-loader 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/trailblazer/loader.rb +3 -4
- data/lib/trailblazer/loader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcfd96e03897aacc8a5ceb4d3b32e2b184d9059c
|
4
|
+
data.tar.gz: 2b176fe74a75f7d94a801565a79d2b48bcff5335
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c966a7ce3c44c882e8ade689493139db04375c93a0ce6681444900db62e1e56dbc8cd8765c5a1648d699b2b6664566543361087e0f756f5874ebe1da3c30849
|
7
|
+
data.tar.gz: 4306fd9543a7c0a78c19c9bc6cf50ca6bf285847b2072216e01740a77215855ec1abe21f6fa10afc4ef1f865857b335192c9c423f60b157135ebd6193d54dc3c
|
data/CHANGES.md
CHANGED
data/lib/trailblazer/loader.rb
CHANGED
@@ -14,19 +14,18 @@ module Trailblazer
|
|
14
14
|
pipeline = options[:pipeline] || Pipeline[
|
15
15
|
FindDirectories,
|
16
16
|
FindConcepts,
|
17
|
-
# PrintConcepts,
|
18
17
|
SortByLevel,
|
19
18
|
Pipeline::Collect[ConceptName, ConceptFiles, SortCreateFirst, SortOperationLast, AddConceptFiles] # per concept.
|
20
19
|
]
|
21
20
|
|
22
21
|
if args = options[:insert] # FIXME: this only implements a sub-set.
|
23
22
|
# pipeline = Representable::Pipeline::Insert.(pipeline, *args) # FIXME: implement :before in Pipeline.
|
24
|
-
pipeline
|
23
|
+
pipeline.last.insert(pipeline.last.index(args.last[:before]), args.first)
|
25
24
|
end
|
26
25
|
|
27
26
|
files = pipeline.([], options).flatten
|
28
27
|
|
29
|
-
pp files
|
28
|
+
pp files if ENV['RACK_ENV'] == 'development'
|
30
29
|
|
31
30
|
load_files(files, &block)
|
32
31
|
end
|
@@ -56,7 +55,7 @@ module Trailblazer
|
|
56
55
|
end
|
57
56
|
|
58
57
|
# operation files should be loaded after callbacks, policies, and the like: [callback.rb, contract.rb, policy.rb, operation.rb]
|
59
|
-
SortOperationLast = ->(input, options) { input.sort { |a, b|
|
58
|
+
SortOperationLast = ->(input, options) { input.sort { |a, b| a =~ /operation/ && b !~ /operation/ ? 1 : a !~ /operation/ && b =~ /operation/ ? 0 : a <=> b } }
|
60
59
|
SortCreateFirst = ->(input, options) { input.sort }
|
61
60
|
AddConceptFiles = ->(input, options) { input }
|
62
61
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|