Skip to content

Commit

Permalink
add tests/iron_hello.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonmar committed Apr 26, 2018
1 parent 93e94d1 commit b7d3828
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
28 changes: 16 additions & 12 deletions mac-setup-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3835,7 +3835,7 @@ fi

fancy_echo "CLOUD_TOOLS=\"$CLOUD_TOOLS\"" >>$LOGFILE

function DOCKER_INSTALL() {
function DOCKER_INSTALL() { # https://docs.docker.com/install/
# First remove boot2docker and Kitematic https://github.com/boot2docker/boot2docker/issues/437
if ! command -v docker >/dev/null; then # /usr/local/bin/docker
fancy_echo "Installing docker ..."
Expand Down Expand Up @@ -3938,32 +3938,36 @@ else
fi


if [[ "${CLOUD_TOOLS,,}" == *"iron.io"* ]]; then
# See http://dev.ironcli.io/worker/cli/
if [[ "${CLOUD_TOOLS,,}" == *"ironworker"* ]]; then
# See http://dev.iron.io/worker/cli/
DOCKER_INSTALL # pre-requisite
GO_INSTALL
# NOTE: brew ironcli installs IronMQ http://dev.iron.io/mq/3/on-premise/installation/single.html
BREW_INSTALL "CLOUD_TOOLS" "iron-functions" ""
# /usr/local/Cellar/iron-functions/0.2.72: 4 files, 16.4MB from https://github.com/iron-io/functions

GITS_PATH_INIT "iron.io"
fancy_echo "CLOUD_TOOLS $GITS_PATH/iron.io reseting ..." >>$LOGFILE
rm -rf "$GITS_PATH/iron.io"
mkdir "$GITS_PATH/iron.io"
pushd "$GITS_PATH/iron.io"
GITS_PATH_INIT "ironworker"
fancy_echo "CLOUD_TOOLS $GITS_PATH/ironworker reseting ..." >>$LOGFILE
rm -rf "$GITS_PATH/ironworker"
mkdir "$GITS_PATH/ironworker"
pushd "$GITS_PATH/ironworker"
curl -sSL https://cli.iron.io/install | sh
popd

if [[ "${TRYOUT,,}" == *"ironcli"* ]] || [[ "${TRYOUT,,}" == *"all"* ]]; then

IRON_TOKEN="$IRON_TOKEN"
IRON_PROJECT_ID="iron1"
echo "CLOUD_TOOLS ironworker $GITS_PATH/ironworker reseting ..." >>$LOGFILE
# Per http://dev.iron.io/worker/getting_started/
# $IRON_TOKEN
# $IRON_PROJECT_ID
# docker run --rm -v "$(pwd)":/worker -w /worker IMAGE[:TAG] 'MY_COMMAND -payload MY_PAYLOAD.json'
# tests/iron_hello.rb
# worker-us-east.iron.io
fi

exit #debugging

else
fancy_echo "CLOUD_TOOLS iron.io not specified." >>$LOGFILE
fancy_echo "CLOUD_TOOLS ironworker not specified." >>$LOGFILE
fi

# See https://wilsonmar.github.io/gcp
Expand Down
5 changes: 5 additions & 0 deletions tests/iron_hello.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/ruby -w
# https://github.com/wilsonmar/mac-setup/master/tests/iron_hello.rb

puts "Hello World!"

0 comments on commit b7d3828

Please sign in to comment.