forest_liana 9.9.0 → 9.10.0
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: a58597dd7d22f7cd995453eb64aab0e9bc139d78d39996c6eead7df857d12a53
|
4
|
+
data.tar.gz: 1d0294bc707d57f597c38dfcd4b2db875554f378ed4b9259952f32e559a7afa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbaee82b313669c8224758449baff48e2f7634e13f98b8967c44148ade69a693f210cd3772078dcedae3d3d86821c5c6af00106b6a207c79b1058d4c6aa064e6
|
7
|
+
data.tar.gz: 0e09cb5f71607198d78fa2f3cd21d7f03ae27dabddb32146d0dcb37aed5c03237665821d1c956bc48e07beffc23af9ffd1a7336d48f771f13f9ae9f3b9251022
|
@@ -4,7 +4,9 @@ module ForestLiana
|
|
4
4
|
|
5
5
|
def self.inject_context_in_value(value, context_variables)
|
6
6
|
inject_context_in_value_custom(value) do |context_variable_key|
|
7
|
-
context_variables.get_value(context_variable_key)
|
7
|
+
value = context_variables.get_value(context_variable_key)
|
8
|
+
raise "Unknown context variable: #{context_variable_key}, please check the query for any typos" if value.nil?
|
9
|
+
value.to_s
|
8
10
|
end
|
9
11
|
end
|
10
12
|
|
@@ -18,12 +20,10 @@ module ForestLiana
|
|
18
20
|
while (match = regex.match(value_with_context_variables_injected))
|
19
21
|
context_variable_key = match[1]
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
)
|
26
|
-
end
|
23
|
+
value_with_context_variables_injected.gsub!(
|
24
|
+
/{{#{context_variable_key}}}/,
|
25
|
+
yield(context_variable_key)
|
26
|
+
)
|
27
27
|
|
28
28
|
encountered_variables.push(context_variable_key)
|
29
29
|
end
|
data/config/routes.rb
CHANGED
@@ -59,8 +59,8 @@ ForestLiana::Engine.routes.draw do
|
|
59
59
|
delete ':collection/:id', to: router
|
60
60
|
delete ':collection', to: router
|
61
61
|
|
62
|
-
post ':collection/
|
63
|
-
post ':collection/
|
62
|
+
post ':collection/query' => 'resources#index'
|
63
|
+
post ':collection/query/count' => 'resources#count'
|
64
64
|
|
65
65
|
draw(:actions)
|
66
66
|
|
data/lib/forest_liana/version.rb
CHANGED
@@ -101,6 +101,12 @@ module ForestLiana
|
|
101
101
|
).to eq(expected_value.to_s)
|
102
102
|
end
|
103
103
|
end
|
104
|
+
|
105
|
+
it 'raises an error when the variable is not found' do
|
106
|
+
expect {
|
107
|
+
described_class.inject_context_in_value("{{siths.selectedRecord.evilString}}", context_variables)
|
108
|
+
}.to raise_error('Unknown context variable: siths.selectedRecord.evilString, please check the query for any typos')
|
109
|
+
end
|
104
110
|
end
|
105
111
|
end
|
106
112
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|