livetext 0.9.63 → 0.9.65
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e51a20f4e5467c3dc5df59d67d79dc97b71bb2631b562503eadca686244422e
|
4
|
+
data.tar.gz: 000a8c61029801071988522e4499d3add1cee6ea008f2547e6bd5c81058c3ced
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45ecb70199426cb893a89ff15e9ced321dd393243cb7e1164492e3141a2ea85a545ff0cbd246f0ca821315b2dc5e1650219fce5d6c2185cd65bba6606ee5c3f6
|
7
|
+
data.tar.gz: 672e6c3fc6621e0bc03157da8de6c5064312056a7c9814b184a14766e77309059f0ff8eff87db14049463cf0d57436f3da8440667a8f065ed8bf8139a7528220
|
data/lib/livetext/core.rb
CHANGED
@@ -162,6 +162,9 @@ class Livetext
|
|
162
162
|
# Set variables first
|
163
163
|
@variables.set_multiple(vars) unless vars.empty?
|
164
164
|
|
165
|
+
# Set api on Livetext::Functions so all functions can access it
|
166
|
+
Livetext::Functions.api = @api
|
167
|
+
|
165
168
|
# Process based on input type
|
166
169
|
case
|
167
170
|
when file && text.nil?
|
data/lib/livetext/expansion.rb
CHANGED
@@ -59,6 +59,8 @@ class Livetext::Expansion
|
|
59
59
|
if result.start_with?("[Error evaluating $$#{name}(")
|
60
60
|
# Try old Livetext::Functions system
|
61
61
|
fobj = ::Livetext::Functions.new
|
62
|
+
# Set api on Livetext::Functions so functions can access it
|
63
|
+
Livetext::Functions.api = @live.api
|
62
64
|
old_result = fobj.send(name, param) rescue nil
|
63
65
|
return old_result.to_s if old_result
|
64
66
|
|
data/lib/livetext/version.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
4 /<p>Directory: .*livetext.*</p>/
|
5
5
|
5 <p>Platform: universal.x86_64-darwin22</p>
|
6
6
|
6 <p>Ruby version: 2.6.10</p>
|
7
|
-
7
|
7
|
+
7 /<p>Livetext version: \d+\.\d+\.\d+<\/p>/
|
8
8
|
8 <p>Reverse of 'hello': olleh</p>
|
9
9
|
9 <p>Square root of 16: 4</p>
|
10
10
|
10 /<p>Random \(1-10\): \d+</p>/
|