props_template 0.22.2 → 0.22.4

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: 34091400c3d4780e7af54a7f5c413384fc50628fe401ed3922cfd14e8d11c5d6
4
- data.tar.gz: 0ca3c6fb38f9d9c7b4d149e0c68bad8366de9cc0407d0d3a0492d335cad4566b
3
+ metadata.gz: d1775b28ee0009735bc63ccb79aa1b22ad397c07682699ac384568ccec3704be
4
+ data.tar.gz: 286f275535b658c80a2f5e8bb965a7cdeb21ef559ecfb7096447180422d4e1fd
5
5
  SHA512:
6
- metadata.gz: 86d5f12f9319172b0880c202063eeae1a3a8ad963a52430ca7f0c06e77000ab296e82832a432823e46c2fe87116ca47a3a0a314c4367422110f6da0761ad6b9b
7
- data.tar.gz: 721aa65b13b218be19bdfe1a10c032f52929b4c61228c7947ae49d92a9d08aca2022ec2043f1a691d4b127bb63426e5ca25920af453a35ec4da49464fd64809b
6
+ metadata.gz: ac6ac10322e53936d8535f0a89c82d4dac4894932f4ac2739bc1f68f1faddea2a7ca81d7c65bbf04dccd49991ce9c26908676157b42e5ade62dee7faed89aa22
7
+ data.tar.gz: 5227b5b577af671e582bfc3e27b64c9e45c90bec592238833fbb7312cb54b370db748c6ed502d4389179b7d617cf31789c00719330958a4c95435f9b3824233a
@@ -22,6 +22,7 @@ module Props
22
22
  end
23
23
 
24
24
  def handle_set_block(key, options)
25
+ key = format_key(key)
25
26
  @stream.push_key(key)
26
27
  set_block_content!(options) do
27
28
  yield
@@ -33,8 +34,6 @@ module Props
33
34
  end
34
35
 
35
36
  def set!(key, value = nil)
36
- key = format_key(key)
37
-
38
37
  if @scope == :array
39
38
  raise InvalidScopeForObjError.new('Attempted to set! on an array! scope')
40
39
  end
@@ -49,6 +48,7 @@ module Props
49
48
  yield
50
49
  end
51
50
  else
51
+ key = format_key(key)
52
52
  @stream.push_value(value, key)
53
53
  end
54
54
 
@@ -7,7 +7,7 @@ module Props
7
7
  @details = extract_details(options)
8
8
  template = determine_template(options)
9
9
 
10
- if template.handler == Props::Handler && options[:layout]
10
+ if template.respond_to?(:handler) && template.handler == Props::Handler && options[:layout]
11
11
  prepend_formats(template.format)
12
12
  render_props_template(context, template, options[:layout], options[:locals])
13
13
  else
@@ -1,3 +1,3 @@
1
1
  module Props
2
- VERSION = "0.22.2".freeze
2
+ VERSION = "0.22.4".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: props_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.2
4
+ version: 0.22.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johny Ho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2023-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport