diff --git a/.travis.yml b/.travis.yml index cbdccfe..be5df4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,3 +9,9 @@ deploy: api_key: secure: jj6SDxhprIwq8cjC4rPLVciNcfvqS3dZWG27Aa4Eg58GTN8eVdNO+n3mDgZ2KRpZJ93/mVIOmgEnq9vDwPlfob8lT/BpLVkbS07zcagZxweoEN8RdOcRxWFG3qDR301RZwHSTqSw81pZsligE+lWWY69OxFzFVvAR0jDN7dxn/s= app: still-scrubland-1948 +env: + global: + - secure: shUwCgAOkc46fEi+Y8B4e0UQYhyGbkq/VFimj4HG+bYYPrti653dsrJ9xgbeX8lDnvCeeIXXlkBmYrgP2fUSk26mmT4MkrICGLO2MSXn1pWwuwRGuHKZnpM5jgTew/UNOT4VCfwxNQNkptM5UmHXusw/O/SDEFIiC9pnUtYHAxo= + - secure: pCDvwQZVN9cam73/Emh3RIPaz8I18HtyeED17378dtEaFvej+kzqmQcBCoRVPkFSSx+m0PioIxMPZwQFD74hV1QdEr6SxcG5O27dCGCnjSKezHhNzyZclhrJ+kPFfNTGfkL4qvba/PqZzyElhoa0HfGSOpKkYqcipQJ/XH204x4= + - secure: mcp4PIqGhNqPtV6hqxqidzBJZ+Zl0OtDOD2Bl3RHCF+/b9dh4x/Aq1XX58+E8WK1/fSD+hzjgHZRYXQJRWQpNuD2kt3S7T1FFxnggnMElEiHn4BE6QvWb21iaUxrGzePUmO36PcMj1L5Oo2t/TvoP31iJf4NqIXZFP+HNKpqNNQ= + - secure: D27tin0Nng3+2vpPdOG8MPJKEfF4iYmgOwarmxGgCC3plsvuV/J/e4MHLo80OOIPiX4CJcpMfnm2Znz4jYWm1C/4pSok0kWKej+aLQkTKcOtvIs8MGT7/q5Gw5DGOh1DThnnsw2pYQtHXVTJAZamE1bGmwKj91oeyChJeISpkis= diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index 025959e..e498cce 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -3,4 +3,5 @@ app = require './server' app.listen port -console.log "Listening on port #{port}" \ No newline at end of file +console.log "Listening on port #{port}" + diff --git a/app/coffee/config/auth.coffee b/app/coffee/config/auth.coffee index 189d697..0aa7de6 100644 --- a/app/coffee/config/auth.coffee +++ b/app/coffee/config/auth.coffee @@ -1,5 +1,7 @@ # auth tokens here, will replace with env variables # will git ignore this once we all have a local copyreq + + {port} = require './serverConfig' url = if process.env.HEROKU_URL @@ -9,6 +11,6 @@ url = module.exports = fitbit: - consumerKey: '6b8b28e0569a422e97a70b5ca671df32' - consumerSecret: 'b351c1fea45d48ed9955a518f4e30e72' + consumerKey: process.env.CONSUMER_KEY + consumerSecret: process.env.CONSUMER_SECRET callbackURL: url \ No newline at end of file diff --git a/app/coffee/config/mail.coffee b/app/coffee/config/mail.coffee index 528335c..4cade21 100644 --- a/app/coffee/config/mail.coffee +++ b/app/coffee/config/mail.coffee @@ -1,12 +1,11 @@ nodemailer = require 'nodemailer' - module.exports = { smtpTransport: (service) -> return nodemailer.createTransport( 'SMTP', {service: service, auth: { - user: 'willscottmoss@gmail.com' - pass: 'ballin35' + user: process.env.EMAIL + pass: process.env.PASS } } ) diff --git a/app/coffee/routes/userRoutes.coffee b/app/coffee/routes/userRoutes.coffee index 956bf38..6b6afc4 100644 --- a/app/coffee/routes/userRoutes.coffee +++ b/app/coffee/routes/userRoutes.coffee @@ -22,10 +22,13 @@ module.exports = (app, passport) -> app.delete '/user/delete', isLoggedIn, user.deleteUser + # this route is expecting an email app.post '/user/forgot/password', user.forgotPassword + # this is the route the is sent in the email, use clicks this app.get '/user/reset/:token', user.resetPassword + # this is the route the the new passowrd will post to app.post '/user/reset/:token', user.updatePassword app.get '/connect/fitbit', isLoggedIn, passport.authorize 'fitbit' diff --git a/app/coffee/server.coffee b/app/coffee/server.coffee index 0632961..b2ffe22 100644 --- a/app/coffee/server.coffee +++ b/app/coffee/server.coffee @@ -39,5 +39,9 @@ require('./routes/groupRoutes')(app, passport) require('./routes/mainFeedRoutes')(app) +console.log 'here!!!!!!', process.env.CONSUMER_KEY, +process.env.CONSUMER_SECRET + + module.exports = app diff --git a/app/coffee/test/users_spec.coffee b/app/coffee/test/users_spec.coffee index 73afcc2..86aebf7 100644 --- a/app/coffee/test/users_spec.coffee +++ b/app/coffee/test/users_spec.coffee @@ -5,6 +5,9 @@ dbUrl = 'mongodb://localhost/teses' User = require '../models/user' clearDB = require('mocha-mongoose')(dbUrl) +console.log 'here!!!!!', process.env.CONSUMER_KEY, +process.env.CONSUMER_SECRET + describe "Saving a new user", -> beforeEach (done) -> return done() if mongoose.connection.db