-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jon Crenshaw
committed
Mar 29, 2016
1 parent
faa6a2a
commit 98bf62d
Showing
12 changed files
with
383 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
language: python | ||
python: "2.7" | ||
language: node_js | ||
node_js: "5.1" | ||
sudo: false | ||
branches: | ||
only: | ||
- master | ||
before_script: ./build/scripts/setup_credentials.sh | ||
script: ./build/scripts/deploy.sh | ||
|
||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Submodule solenopsis
deleted from
72ade6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
var _, logger, winston, | ||
slice = [].slice; | ||
|
||
_ = require('lodash'); | ||
|
||
winston = require('winston'); | ||
|
||
winston.emitErrs = true; | ||
|
||
winston.cli(); | ||
|
||
logger = new winston.Logger({ | ||
transports: [ | ||
new winston.transports.Console({ | ||
level: 'debug', | ||
handleExceptions: true, | ||
json: false, | ||
prettyPrint: true, | ||
colorize: true, | ||
timestamp: false | ||
}) | ||
], | ||
exitOnError: true | ||
}); | ||
|
||
logger.cli(); | ||
|
||
logger.setLevels({ | ||
error: 0, | ||
warn: 1, | ||
info: 2, | ||
verbose: 3, | ||
debug: 4, | ||
silly: 5 | ||
}); | ||
|
||
logger.log = _.wrap(logger.log, function() { | ||
var args, fn, level; | ||
fn = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : []; | ||
level = args[0]; | ||
if (logger.levels[level] == null) { | ||
args.unshift('info'); | ||
} | ||
return fn.apply(logger, args); | ||
}); | ||
|
||
logger.stream = { | ||
write: function(message, encoding) { | ||
return logger.info(message); | ||
} | ||
}; | ||
|
||
module.exports = logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
_ = require 'lodash' | ||
tooling = require 'jsforce-metadata-tools' | ||
logger = require './logger' | ||
|
||
conn = null | ||
srcDir = path.join '..', 'src' | ||
|
||
getDeployOpts = (extend={}) -> | ||
_.extend | ||
checkOnly: true | ||
rollbackOnError: true | ||
testLevel: 'RunLocalTests' | ||
ignoreWarnings: false | ||
username: process.env.SFDC_USERNAME | ||
password: process.env.SFDC_PASSWORD | ||
loginUrl: process.env.SFDC_LOGINURL | ||
pollTimeout: 5000 | ||
pollInterval: 5000 | ||
, extend | ||
|
||
# Extends JSON.stringify for circular references | ||
JSON.stringifyCircular = (obj, indent) -> | ||
cache = [] | ||
JSON.stringify obj, (key, value) -> | ||
return if !!~cache.indexOf value | ||
cache.push value if _.isObject value | ||
value | ||
, indent | ||
|
||
# Login and run tests | ||
async.auto | ||
login: (done) -> | ||
conn = new sf.Connection loginUrl: argv.loginurl | ||
conn.login process.env.SFDC_USERNAME, process.env.SFDC_PASSWORD, (err) -> | ||
done err, conn | ||
|
||
runTests: ['login', (done, res) -> | ||
logger.info 'Running tests...' | ||
tooling.deployFromDirectory(srcDir, getDeployOpts()).then (res) -> | ||
if argv.logLevel is 'verbose' | ||
tooling.reportDeployResult res, logger, true | ||
|
||
resJson = JSON.stringifyCircular res, ' ' | ||
|
||
if res.numberComponentErrors or res.numberTestErrors | ||
done 'Tests failed' | ||
else | ||
done null, res | ||
.catch done | ||
] |
Oops, something went wrong.