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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb6b09972391e525c2214c576105739d3e7e52c3
4
- data.tar.gz: 1b244ac23b2f76448562925f5f2ab672f2a2d26c
3
+ metadata.gz: 22652cd993fb6ac6e6a33dc3c4c7e353b641855d
4
+ data.tar.gz: ff2e26329bf1d0bd98276fc3b452869cda808f3f
5
5
  SHA512:
6
- metadata.gz: e152a0a278690c2b05e1b77e6a62b1ec00287bafc7d1217465d26fee83c2245ff06b8d6014b402d148135d2556ab6086ab93e1a3109c3fbd49fbb03b778b356b
7
- data.tar.gz: 714427f89fb5e5bb1ee4db6d4c1b25f324e9ac53fdae1358c16ca0240b19d52c557d548111dc6bfd71e55819612a55067c5411b49c8cc1ea90c8a6ee70a0fc8a
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 = 1
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
- # {{!}} sets default parameter values (block parameters) so that they don't have to be
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eggshell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaiser Shahid