Skip to content

Commit

Permalink
env conf creator string processing ref coyote-team#79
Browse files Browse the repository at this point in the history
  • Loading branch information
seeReadCode committed Apr 5, 2017
1 parent 949bb42 commit 5a30f8d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions .env.development.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ DATABASE_NAME=coyote_dev
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_HOST=localhost
SECRET_KEY_BASE=""
HOST="localhost"
PORT="3000"
MAIL_USER=""
MAIL_PASSWORD=""
MAIL_DOMAIN=""
MAIL_ADDRESS=""
SECRET_KEY_BASE=
HOST=localhost
PORT=3000
MAIL_USER=
MAIL_PASSWORD=
MAIL_DOMAIN=
MAIL_ADDRESS=
20 changes: 10 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
REPO_NAME=coyote
REPO_URL=https://github.com/coyote-team/coyote.git
SUPPORT_EMAIL="[email protected]"
SUPPORT_PASSWORD=""
SUPPORT_EMAIL=[email protected]
SUPPORT_PASSWORD=
ASSET_SYNC_GZIP_COMPRESSION=true
ASSET_SYNC_MANIFEST=true
ROLLBAR_ACCESS_TOKEN=
FLOWDOCK_PROJECT_NAME=""
FLOWDOCK_API_TOKEN=""
SERVER_USER="coyote"
PRODUCTION_IP=""
STAGING_IP=""
BOOKMARKLET="false"
WEBSITE_URL=""
WEBSITE_TITLE=""
FLOWDOCK_PROJECT_NAME=
FLOWDOCK_API_TOKEN=
SERVER_USER=coyote
PRODUCTION_IP=
STAGING_IP=
BOOKMARKLET=false
WEBSITE_URL=
WEBSITE_TITLE=
4 changes: 2 additions & 2 deletions bin/conf_creator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function populate {
echo "#Created ${TIMESTAMP}" > $FILE
while read -r NAME VALUE
do
if [ ${$NAME} -eq SECRET_KEY_BASE ]
if [ ${#NAME} = "SECRET_KEY_BASE" ]
then
SECRET="$(bin/rake secret)"
echo "$NAME=$SECRET" >> $FILE
Expand All @@ -23,7 +23,7 @@ function populate {
else
RESULT="$ANSWER"
fi
echo "$NAME=$RESULT" >> $FILE
echo "$NAME=\"$RESULT\"" >> $FILE
fi
done < $SOURCE
} 3<&0
Expand Down

0 comments on commit 5a30f8d

Please sign in to comment.