serbea 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 170e76b3b2d6c6024d9721f95831ebc85dd32fda2bca10f2471546bbc95cc5f7
4
- data.tar.gz: 5dc3336c8549c6933325646f5a3fecdee6fec520393df8e141f86a3ef4b3f0ae
3
+ metadata.gz: 9dfc45d5f8581d988481bf56c492498b5bbd8b08186910c655e6fa0964fe48dc
4
+ data.tar.gz: a25507d87ae9eeed0f575cdc5825212ca5d3bfadd1fbe388b7dfc219b53d721d
5
5
  SHA512:
6
- metadata.gz: a8733456977f41a78a2e4a56bd8d25a4b737abdedf54d19cfbf7ad61f43a9edbbd422e1d81206205df366ef56d751567a87284de9c480887a79cefb0ae51ae1c
7
- data.tar.gz: 57c097000a365d52fa0ee88ca8472957dccbfc898b2acb6d066f3fea49e865f94033cfcb30b9edc6585a1fb72ab191b524fb631c437b86a16c2a707e078b85ca
6
+ metadata.gz: 3da42d61791e24028f5ac9c68c24c6cf73d98f7568ffa87fb04cca4c8f45b77d9dddc4a68025cbbd7e9f58429ccaa95e79eecdae249b7a272d424cf32648ed36
7
+ data.tar.gz: 216bdddc4a48696fabac9321e9f6d25b63e15adda17a22041f23b7963fd7a807a7840ddfb4e289349309361d8f6285801f651822b0ec86538d07980c54c3fb8b
@@ -100,8 +100,17 @@ module Serbea
100
100
  else # string or something else
101
101
  pieces[0].prepend "("
102
102
  end
103
- if pieces.last == "do"
104
- pieces.last.prepend ") "
103
+
104
+ includes_block = false
105
+ pieces.reverse.each do |piece|
106
+ if piece == "do" && (pieces.last == "do" || pieces.last.end_with?("|"))
107
+ piece.prepend(") ")
108
+ includes_block = true
109
+ break
110
+ end
111
+ end
112
+
113
+ if includes_block
105
114
  buff << "{%:= #{self.class.render_directive}#{pieces.join(" ")} %}"
106
115
  else
107
116
  pieces.last << ")"
@@ -1,3 +1,3 @@
1
1
  module Serbea
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serbea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team