pistaa 0.0.1 → 0.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/README.md +1 -1
- data/app/helpers/pistaa_helper.rb +6 -4
- data/lib/pistaa/version.rb +1 -1
- 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: 10f7e4d82198f31254dcf5248b7701e7dfb1f501
|
4
|
+
data.tar.gz: 2cda2238b79522ba7bbcc51d95ed8910d81c957c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e10ea62cf94deab83a2adcf62311847470be323a7e4679c511655d7a1240d4dbf9c7bd1cc0d067f4c0f295adc0c62f01017b7c708ec1efae6bea6b03d3384881
|
7
|
+
data.tar.gz: 4de744453b4793b3d7ff233d45303f5c912144e11252789b484e10ea5e61f97002da7f9e06a818c16c12734d80e89ba491f4141ba196c59de53a97c02c05c3b1
|
data/README.md
CHANGED
@@ -70,7 +70,7 @@ needs.
|
|
70
70
|
## Inspiration
|
71
71
|
|
72
72
|
I'm aware of one other project that tries to solve this problem, but in a
|
73
|
-
completely different way. [Deface](https://github.com/spree/deface is tool that
|
73
|
+
completely different way. [Deface](https://github.com/spree/deface) is tool that
|
74
74
|
was used in older versions of [Spree](https://spreecommerce.com/) and also
|
75
75
|
provides a way to alter templates from engines. It parses ERB templates to an
|
76
76
|
XML structure using Nokogiri, exposes a DSL to manipulate the Nokogiri document
|
@@ -4,11 +4,13 @@ module PistaaHelper
|
|
4
4
|
# hidden. It repeatedly calls `render_pistaa_slot_item`, so the rendered
|
5
5
|
# templates will be registered as hidden.
|
6
6
|
def render_pistaa_slot(slot)
|
7
|
-
|
8
|
-
|
7
|
+
capture do
|
8
|
+
pistaa_slot_items(slot).map do |item|
|
9
|
+
next if pistaa_slot_item_hidden?(slot, item)
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
concat(render_pistaa_slot_item(slot, item))
|
12
|
+
end
|
13
|
+
end
|
12
14
|
end
|
13
15
|
|
14
16
|
# Render a specific template from a slot (regardless of it was hidden), and
|
data/lib/pistaa/version.rb
CHANGED