tina4ruby 3.10.10 → 3.10.11
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/tina4/template.rb +10 -4
- data/lib/tina4/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4966bc1955a5ee02eba12ebc9d43a72ba8f1572a2953dc285857f1f6d0f42a02
|
|
4
|
+
data.tar.gz: eabb1a3be1213f34353a0adf4bca93fba38f7bb7e15574ee76888e02d163f29a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de40973a6d1f36c8dc4b18a6a360e9647d59aa5b94803890d32a9f39bd0bd9350d208683337082f49a4df6dbde066eacdd63aaa4bb8a070dc68feddf9d0a5612
|
|
7
|
+
data.tar.gz: 80bbc66c2c78d07177bcee66f21fd9fb0f5ef4b4a7148284dd65b6cb4c5344f2132c9bbe4a1dae2839ab0803865f78660dad318099354625454b26b4c4cf61b6
|
data/lib/tina4/template.rb
CHANGED
|
@@ -537,13 +537,19 @@ module Tina4
|
|
|
537
537
|
end
|
|
538
538
|
elsif part =~ /\A(\w+)\[(.+?)\]\z/
|
|
539
539
|
base = Regexp.last_match(1)
|
|
540
|
-
index = Regexp.last_match(2)
|
|
540
|
+
index = Regexp.last_match(2).strip
|
|
541
541
|
value = access_value(value, base)
|
|
542
|
-
if index =~ /\A\
|
|
542
|
+
if index =~ /\A["'](.*)["']\z/
|
|
543
|
+
# Quoted string literal — use as-is
|
|
544
|
+
index = Regexp.last_match(1)
|
|
545
|
+
value = access_value(value, index)
|
|
546
|
+
elsif index =~ /\A\d+\z/
|
|
543
547
|
value = value[index.to_i] if value.respond_to?(:[])
|
|
544
548
|
else
|
|
545
|
-
|
|
546
|
-
|
|
549
|
+
# Resolve as a variable from context
|
|
550
|
+
resolved = resolve_variable(index)
|
|
551
|
+
value = access_value(value, resolved.to_s) unless resolved.nil?
|
|
552
|
+
value = nil if resolved.nil?
|
|
547
553
|
end
|
|
548
554
|
else
|
|
549
555
|
value = access_value(value, part)
|
data/lib/tina4/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tina4ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.10.
|
|
4
|
+
version: 3.10.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tina4 Team
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rack
|
|
@@ -400,7 +399,6 @@ licenses:
|
|
|
400
399
|
- MIT
|
|
401
400
|
metadata:
|
|
402
401
|
homepage_uri: https://tina4.com
|
|
403
|
-
post_install_message:
|
|
404
402
|
rdoc_options: []
|
|
405
403
|
require_paths:
|
|
406
404
|
- lib
|
|
@@ -415,8 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
415
413
|
- !ruby/object:Gem::Version
|
|
416
414
|
version: '0'
|
|
417
415
|
requirements: []
|
|
418
|
-
rubygems_version:
|
|
419
|
-
signing_key:
|
|
416
|
+
rubygems_version: 4.0.3
|
|
420
417
|
specification_version: 4
|
|
421
418
|
summary: Simple. Fast. Human. This is not a framework.
|
|
422
419
|
test_files: []
|