The current addon has a hard coded list of variables given through scopeValues to be converted into globals. This would cause a problem when a new object/variable is added to openhab.
Specifically, I came across an interesting feature from jsscripting that allows storing an object to be shared across multiple rules. I am currently requesting for that feature to be moved into core.
It added a new scoped variable called sharedcache which is not in the hard-coded list of global variables in the jrubyscripting addon, hence the need to change the addon to be more general.
The current addon has a hard coded list of variables given through
scopeValues
to be converted into globals. This would cause a problem when a new object/variable is added to openhab.In #563, I am testing a new addon that would simply check if the first character of the name is lowercase instead. The PR for the addon is https://github.com/openhab/openhab-addons/pull/12539
Specifically, I came across an interesting feature from jsscripting that allows storing an object to be shared across multiple rules. I am currently requesting for that feature to be moved into core.
It added a new scoped variable called
sharedcache
which is not in the hard-coded list of global variables in the jrubyscripting addon, hence the need to change the addon to be more general.