Skip to content

Commit

Permalink
Merge pull request #40 from Snyk/develop
Browse files Browse the repository at this point in the history
chore: merge develop
  • Loading branch information
remy committed Oct 28, 2015
2 parents 8aca01a + a64beb3 commit 70e870a
Show file tree
Hide file tree
Showing 19 changed files with 569 additions and 193 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ notifications:
email: false
services:
- mongodb
addons:
postgresql: "9.4"
node_js:
- '4'
- '0.12'
Expand All @@ -16,6 +18,8 @@ before_install:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
before_script:
- npm prune
- psql -c 'create database test;' -U postgres
- psql -U postgres -c "create extension hstore" test
- 'curl -Lo travis_after_all.py https://git.io/vLSON'
after_success:
- python travis_after_all.py
Expand Down
17 changes: 6 additions & 11 deletions cli/commands/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var config = require('../../lib/config');
var request = require('../../lib/request');
var url = require('url');
var uuid = require('node-uuid');
var Spinner = require('cli-spinner').Spinner;
var makeSpinner = require('../../lib/spinner');

var apiUrl = url.parse(config.API);
var authUrl = apiUrl.protocol + '//' + apiUrl.host;
Expand All @@ -24,12 +24,9 @@ function githubAuth() {
'be ready to start using snyk.\n\nIf you can\'t wait use this url:\n' +
url + '\n';

console.log(msg.replace(/^(.)/gm, '$1'));
console.log(msg);

var spinner = new Spinner('%s Waiting...');
spinner.setSpinnerDelay(75);
spinner.setSpinnerString(2);
spinner.start();
var spinner = makeSpinner('Waiting...');

return new Promise(function (resolve) {
setTimeout(function () {
Expand All @@ -38,9 +35,7 @@ function githubAuth() {
// start checking the token immediately in case they've already
// opened the url manually
resolve(testAuthComplete(token).then(function (res) {
spinner.stop();
// send a nl
console.log('');
spinner.clear();
return res;
}));
});
Expand All @@ -59,7 +54,7 @@ function testAuthComplete(token) {
return new Promise(function (resolve, reject) {
debug(payload);
request(payload, function (error, res, body) {
debug(error, res.statusCode, body);
debug(error, (res || {}).statusCode, body);
if (error) {
return reject(error);
}
Expand Down Expand Up @@ -127,7 +122,7 @@ function auth(api) {

if (res.statusCode === 200 || res.statusCode === 201) {
snyk.config.set('api', body.api);
return '\nYour account has been authenicated. Snyk is now ready to ' +
return '\nYour account has been authenticated. Snyk is now ready to ' +
'be used.\n';
} else if (body.message) {
var error = new Error(body.message);
Expand Down
3 changes: 1 addition & 2 deletions cli/commands/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ module.exports = function (path) {
}

return parent + Object.keys(modules.dependencies).map(function (key) {
return modules.dependencies[key].full + ' ' +
(modules[key].valid ? '✓' : '✗');
return modules.dependencies[key].full;
}).join('\n');
});
};
Loading

0 comments on commit 70e870a

Please sign in to comment.