Added option in .env for allow_eval to be activated in jsonPath #177

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

snicker commented Mar 7, 2014

No description provided.

@cantino cantino commented on an outdated diff Mar 7, 2014

@@ -76,3 +76,8 @@ AWS_ACCESS_KEY="your aws access key"
# Set AWS_SANDBOX to true if you're developing Huginn code.
AWS_SANDBOX=false
+
+########################
+# Various Settings #
+########################
+ALLOW_EVAL=false
@cantino

cantino Mar 7, 2014

Owner

Let's call it ALLOW_JSONPATH_EVAL. Did you test it and it works well for you?

Contributor

snicker commented Mar 7, 2014

actually, filtering does not appear to be functional in the Ruby implementation of jsonPath...

Evaluating similar data with http://ashphy.com/JSONPathOnlineEvaluator/ gives the correct results, but using the same path expression generates errors like this:

Exception during check: undefined method `<' for nil:NilClass -- ["/usr/local/rvm/gems/ruby-1.9.3-p484@huginn/gems/jsonpath-0.5.3/lib/jsonpath/enumerable.rb:110:in `eval'", "/usr/local/rvm/gems/rub...
Contributor

snicker commented Mar 7, 2014

bleh. needs more investigation, will try to look into it this weekend

Contributor

snicker commented Mar 8, 2014

There we go!

Owner

cantino commented Mar 9, 2014

What was the problem?

Contributor

snicker commented Mar 10, 2014

Hrm, jsonPath still doesn't seem to be working. Need to try the ruby gem by itself I think. But the env variable name is changed now

Owner

cantino commented Mar 11, 2014

Yea, I'm curious what the raw behavior of the gem is.

Owner

cantino commented Apr 17, 2014

@snicker What should we do with this?

Contributor

snicker commented Apr 17, 2014

Hm... not sure what caused the failing build. All this does is enable the option for allowing the JSONPath eval in the .env, I'd guess that it's safe to merge and doesn't need any specs. The issues I was experiencing seem to be related to the gem itself and need some more investigation (that I haven't done)

Do with it what you will...

Owner

cantino commented Apr 18, 2014

Trying a rebuild (and some comments) in #229. Thanks @snicker!

cantino closed this Apr 18, 2014

snicker referenced this pull request May 1, 2014

Merged

Added liquid templating and migrated first agents #285

10 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment