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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e8ec3d3579ed65bb2a927d2bf7abb10c9e5f4ee4d5a5147da09e8efb1e6a030
4
- data.tar.gz: f21d46d7b34d47ee191b0ddcfe68ceb506d15d316a4ad00e433ca3752d82045a
3
+ metadata.gz: 7b3bde6ce57e684648932f2fc307d1ad885679ee21428b0c7ee66cc31c13ee67
4
+ data.tar.gz: aa90aea1e4c0950702619b26183647b74f18f5bfd0fb18808ae8c8d347803ed4
5
5
  SHA512:
6
- metadata.gz: db8bb1f529058a5dc7f2be56fe29720f638194e756a229da90deb85b3b885cd8de56dab5609219c73df23d1fe4de2cb80a2edc8803bce6a550ee8a4f16c36f70
7
- data.tar.gz: dc997a26a9e941c8468e8b1cf755cb3c81e6b541ca7c56661f3ecaab8a701fed67712fd368e1cea50eb8b3dba76238ae169b3b8abb6e2e07485b5a8349ba5673
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 = !defined?(@__json); @__json ||= Props::Template.new(self); json = @__json; #{source};
12
- json.result! if __finalize
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
@@ -1,3 +1,3 @@
1
1
  module Props
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.0.1".freeze
3
3
  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.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:
@@ -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