continuuity/loom — pull request #42 by dereklwood (2014-04-04 02:03:15+00:00)
Title: Feature/shell provisioner json

This PR provides a utility function to the shell provisioner to lookup values in the task json. This makes use of https://github.com/rcrowley/json.sh, for which the license is included
- [x] shell provisioner modified to generate/scp the task json data into remote cache and call a wrapper script instead of user scripts directly
- [x] wrapper script to invoke json.sh on the current task data and provide loom_lookup_key

example, for service:
```
"actions": {
"install": {
"type": "shell",
"script": "examples/json_substitution_example.sh",
"data": "taskId config/automators"
}
}
```
results:
```
2014-04-03 18:29:34 -0700 DEBUG: Result of shell command: {"stdout"=>"--- example json parsing ---\njson lookup: taskId --> 00000011-030-076\njson lookup: config/automators --> chef shell\n", "stderr"=>"", "status"=>0}
```