Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Prism 2.x #323

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ temp.go
*.swp
.env
coverage.txt
docker/src
sendgrid.env
.vscode
.vscode
profile.out
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ENV OAI_SPEC_URL="https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master
WORKDIR /root

# Install Prism
ADD https://raw.githubusercontent.com/stoplightio/prism/master/install.sh install.sh
ADD https://raw.githubusercontent.com/stoplightio/prism/2.x/install.sh install.sh
RUN sh ./install.sh && \
rm ./install.sh
rm ./install.sh

# Get sendgrid-go
RUN mkdir -p /go/src/github.com/sendgrid && \
Expand Down
10 changes: 5 additions & 5 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash
clear

# check for + link mounted libraries:
Expand All @@ -10,24 +10,24 @@ fi

SENDGRID_GO_VERSION=$(go run get-version.go)
echo "Welcome to sendgrid-go docker v${SENDGRID_GO_VERSION}."
echo
echo

if [ "$1" != "--no-mock" ]
then
echo "Starting Prism in mock mode. Calls made to Prism will not actually send emails."
echo "Disable this by running this container with --no-mock."
prism run --mock --spec $OAI_SPEC_URL 2> /dev/null &
prism mock --spec $OAI_SPEC_URL 2> /dev/null &
else
echo "Starting Prism in live (--no-mock) mode. Calls made to Prism will send emails."
prism run --spec $OAI_SPEC_URL 2> /dev/null &
fi
echo "To use Prism, make API calls to localhost:4010."
echo "To stop Prism, run \"kill $!\" from the shell."

echo
echo "To test with sendgrid-go."
echo "Put your file in ./src, which mounted to /data in container, and run with \"go run [file].go\"."
echo
echo

cd /data
bash
2 changes: 1 addition & 1 deletion prism.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ elif [ "$UNAME" = "Linux" ] ; then
fi

#LATEST=$(curl -s https://api.github.com/repos/stoplightio/prism/tags | grep -Eo '"name":.*?[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2)
LATEST="v0.1.5"
LATEST="v2.0.16"
URL="https://github.com/stoplightio/prism/releases/download/$LATEST/prism_$PLATFORM"
DEST=/home/travis/gopath/bin/prism

Expand Down
Loading