Skip to content

Commit

Permalink
Merge branch 'master' into constant-objects
Browse files Browse the repository at this point in the history
  • Loading branch information
pipakin committed Feb 25, 2017
2 parents 54f4c53 + 98d6aeb commit ec8d683
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
language: node_js

services:
- postgresql

node_js:
- "6"

script:
- npm test
- ./run-courtbot-cucumber travis

after_success:
- npm run coverage
24 changes: 24 additions & 0 deletions run-courtbot-cucumber
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
if [ $# -eq 0 ]
then
echo "Continuing execution even if command fails..."
set -v
else
echo "Running in travis mode..."
set -ev
fi
npm run build

rm *.tgz || echo "NO files to clean up"
npm pack
TGZ_FILE=$(ls *.tgz)

git clone https://github.com/codefortulsa/courtbot.git

pushd courtbot
npm install
npm install ../$TGZ_FILE
./run-cucumber "$@"
popd
rm *.tgz
rm -rf courtbot
8 changes: 4 additions & 4 deletions src/messaging-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ evt.message = `We'll attempt to send you a reminder for any upcoming events rela
emitter.on("courtbot-messaging-cancel-registration", evt =>
evt.message = `Registration cancelled.`);

emitter.on("courtbot-messaging-is-ordinal", evt => evt.result = parseInt(evt.text) > 0)
emitter.on("courtbot-messaging-get-ordinal", evt => evt.result = parseInt(evt.text))
emitter.on("courtbot-messaging-is-yes", evt => evt.result = evt.text.trim().toUpperCase() === "YES")
emitter.on("courtbot-messaging-is-no", evt => evt.result = evt.text.trim().toUpperCase() === "NO")
emitter.on("courtbot-messaging-is-ordinal", evt => evt.result = evt.text.match(/^\d+$/));
emitter.on("courtbot-messaging-get-ordinal", evt => evt.result = parseInt(evt.text));
emitter.on("courtbot-messaging-is-yes", evt => evt.result = evt.text.trim().toUpperCase() === "YES");
emitter.on("courtbot-messaging-is-no", evt => evt.result = evt.text.trim().toUpperCase() === "NO");

emitter.on("courtbot-messaging-no-case-message", () => null); //NEEDS MESSAGE!

Expand Down

0 comments on commit ec8d683

Please sign in to comment.