brew install jq # or apt-get install jq (only needed for testing)
rvm install ruby-2.4.1
rvm gemset create spark
rvm gemset use spark
gem install cisco_spark --no-document
gem install sinatra --no-document
Open two terminal sessions. In the first run ruby app.rb -b 0.0.0.0
In the second POST webhook.json
to the Sinatra endpoint
curl -s -XPOST -H "Content-Type: application/json" \
-d @webhook.json \
"http://localhost:4567/event" | jq