props_template 1.0.0 → 1.0.1
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/props_template/handler.rb +2 -2
- data/lib/props_template/version.rb +1 -1
- metadata +1 -2
- data/lib/props_template/test.md +0 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b3bde6ce57e684648932f2fc307d1ad885679ee21428b0c7ee66cc31c13ee67
|
|
4
|
+
data.tar.gz: aa90aea1e4c0950702619b26183647b74f18f5bfd0fb18808ae8c8d347803ed4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aab15761d3b7edb82d1f2d637a8ca0dcd3ab2241caa74ab75d4e6226c82a5b513308194c670f7ce1d3ab3c6b80d8fd8111332f9bb4705acd3b70ac05564132bc
|
|
7
|
+
data.tar.gz: d66cc1d55181b2fb948d393fcc4bac96fb91546ca999d1e3c6634b58309f47cf4b036ed1f7ad9671eb9e63e104e48e5c850907a1b6710d8790481f45b4f470d5
|
|
@@ -8,8 +8,8 @@ module Props
|
|
|
8
8
|
def self.call(template, source = nil)
|
|
9
9
|
source ||= template.source
|
|
10
10
|
# this juggling is required to keep line numbers right in the error
|
|
11
|
-
%{ __finalize =
|
|
12
|
-
json.result
|
|
11
|
+
%{ __finalize = @__json.nil?; @__json ||= Props::Template.new(self); json = @__json; #{source};
|
|
12
|
+
if __finalize; result = json.result!; @__json = nil; result; end
|
|
13
13
|
}
|
|
14
14
|
end
|
|
15
15
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: props_template
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Johny Ho
|
|
@@ -89,7 +89,6 @@ files:
|
|
|
89
89
|
- lib/props_template/partial_patch.rb
|
|
90
90
|
- lib/props_template/railtie.rb
|
|
91
91
|
- lib/props_template/searcher.rb
|
|
92
|
-
- lib/props_template/test.md
|
|
93
92
|
- lib/props_template/version.rb
|
|
94
93
|
homepage: https://github.com/thoughtbot/props_template/
|
|
95
94
|
licenses:
|
data/lib/props_template/test.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
array
|
|
2
|
-
handle_collection
|
|
3
|
-
all_opts = collection.map do |item|
|
|
4
|
-
refine_item_options(item, options)
|
|
5
|
-
end
|
|
6
|
-
creates clone of the opts using
|
|
7
|
-
refine_item_options clones original options
|
|
8
|
-
then subsequently the ext refine_item_options
|
|
9
|
-
gets called first,
|
|
10
|
-
|
|
11
|
-
refine_all_item_options <- operates on the entire collection
|
|
12
|
-
|
|
13
|
-
handle_collection_item
|
|
14
|
-
set_content options
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
base with ExtensionManager
|
|
19
|
-
refine_all_item_options - overrided with ext manager
|
|
20
|
-
- which attahes a _template with partialer
|
|
21
|
-
to it AND multifetch and attaches it to cache
|
|
22
|
-
as [key, result]
|
|
23
|
-
|
|
24
|
-
refine_item_options
|
|
25
|
-
- transforms key: :id to key = [key, val]
|
|
26
|
-
- passes to refine_options
|
|
27
|
-
which is then asks the searcher the cache and
|
|
28
|
-
deferment to mutate the option
|