eggshell 1.0.1 → 1.0.2
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/lib/eggshell.rb +1 -1
- data/lib/eggshell/bundles/basics.rb +9 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22652cd993fb6ac6e6a33dc3c4c7e353b641855d
|
4
|
+
data.tar.gz: ff2e26329bf1d0bd98276fc3b452869cda808f3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9251fa6119cf73a511769635c727637c45eac801d275b7e762f9efa230cf581b34280ba258bc04e2595bf8305b84d50102af7fc321fbb203c6725da0f2b2639c
|
7
|
+
data.tar.gz: 808fb0b9fb4c8c0d1682b07e28ee8f06a62d7c5a680ee74a33904840c2741235c691bcc1630c8aef7230a30be89baa8a686d11efdfbcac9f377e332584ce8515
|
data/lib/eggshell.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
module Eggshell
|
3
3
|
VERSION_MAJOR = 1
|
4
4
|
VERSION_MINOR = 0
|
5
|
-
VERSION_PATCH =
|
5
|
+
VERSION_PATCH = 2
|
6
6
|
VERSION = "#{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
|
7
7
|
# Encapsulates core parts of a line. Handler can use whatever parts are needed to
|
8
8
|
# construct final output. Line number is provided for error reporting.
|
@@ -607,8 +607,12 @@ module Eggshell::Bundles::Basic
|
|
607
607
|
|
608
608
|
# These macros are highly recommended to always be part of an instance of the processor.
|
609
609
|
#
|
610
|
-
#
|
610
|
+
# dl.
|
611
|
+
# {{!}}:: sets default parameter values (block parameters) so that they don't have to be
|
611
612
|
# specified for every block instance.
|
613
|
+
# {{raw}}:: passes all block lines up into output chain. Macros are assembled before being
|
614
|
+
# outputted.
|
615
|
+
# {{pipe}}:: allows blocks to pipe into the adjacent block
|
612
616
|
#
|
613
617
|
# {{process}} always dynamic processing of content. This allows previous macros to build
|
614
618
|
# up a document dynamically.
|
@@ -622,7 +626,7 @@ module Eggshell::Bundles::Basic
|
|
622
626
|
opts = {} if !opts
|
623
627
|
@opts = opts
|
624
628
|
@eggshell = proc
|
625
|
-
@eggshell.add_macro_handler(self, '=', '!', 'process', 'capture', 'raw')
|
629
|
+
@eggshell.add_macro_handler(self, '=', '!', 'process', 'capture', 'raw', 'pipe')
|
626
630
|
@eggshell.add_macro_handler(self, 'include') if !@opts['macro.include.off']
|
627
631
|
@vars = @eggshell.vars
|
628
632
|
|
@@ -681,12 +685,14 @@ module Eggshell::Bundles::Basic
|
|
681
685
|
out << line.to_s
|
682
686
|
end
|
683
687
|
else
|
684
|
-
out << @eggshell.assemble(unit)
|
688
|
+
out << @eggshell.assemble(unit, call_depth + 1)
|
685
689
|
end
|
686
690
|
else
|
687
691
|
out << line
|
688
692
|
end
|
689
693
|
end
|
694
|
+
elsif name == 'pipe'
|
695
|
+
out << @eggshell.assemble(lines, call_depth + 1)
|
690
696
|
end
|
691
697
|
end
|
692
698
|
|