This file contains hidden or 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
| #!/bin/sh | |
| ###################################################### | |
| # Deploys working repository to git deployment branch | |
| ###################################################### | |
| #get the status of the working repository | |
| status=`git status --porcelain` | |
| #check if the working repository is clean |
This file contains hidden or 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
| #runs the working directory unit tests | |
| test: | |
| NODE_ENV=test \ | |
| mocha --ignore-leaks $(shell find ./test -name \*test.js) | |
| #deploys working directory | |
| deploy: | |
| make test | |
| make deploy-git |
This file contains hidden or 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
| var fs = require("fs"), | |
| path = require("path"); | |
| function iterateFiles(uri, callback, done, fileRegexp) { | |
| var counter = 1 | |
| fs.readdir(uri, errorProxy(done, readFiles)) | |
| function readFiles(err, files) { | |
| counter += files.length | |
| files.forEach(isDirOrFile) |
This file contains hidden or 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
| deploy: | |
| status=$(git status --porcelain) | |
| test "x$(status)" != "x" |
This file contains hidden or 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
| var EventEmitter2 = require('eventemitter2').EventEmitter2, | |
| should = require('should'), | |
| request = require('request'), | |
| config = require('../../src/config'); | |
| describe('server', function() { | |
| var mediator, | |
| port = config.server.port; |
This file contains hidden or 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
| var EventEmitter2 = require('eventemitter2').EventEmitter2, | |
| should = require('should'); | |
| describe('server', function() { | |
| var mediator; | |
| beforeEach(function() { | |
| mediator = new EventEmitter2({ |
This file contains hidden or 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
| var mediator; | |
| beforeEach(function() { | |
| mediator = new EventEmitter2({wildcard: false}); | |
| require('../src/server/creator.js')(mediator); | |
| require('../src/server/configurer.js')(mediator); | |
| }); |
This file contains hidden or 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
| var mediator = new EventEmitter2({wildcard: false}); | |
| mediator.once('boot.ready', function() { | |
| mediator.emit('server.created'); | |
| }); | |
| mediator.once('boot.ready', function() { |
This file contains hidden or 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
| var EventEmitter2 = require('eventemitter2').EventEmitter2, | |
| should = require('should'); | |
| describe('server', function() { | |
| var mediator = new EventEmitter2({ | |
| wildcard: false | |
| }); | |
| require('../../src/routines/server/creator')(mediator); |
This file contains hidden or 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
| module.exports = function(mediator) { | |
| mediator | |
| .on('boot.init', function() { | |
| console.log('boot init phase, outputting process information:'); | |
| console.log('process argv: %j', process.argv); | |
| console.log('process execPath: %s', process.execPath); | |
| console.log('process working dir: %s', process.cwd()); | |
| console.log('process gid: %d', process.getgid()); | |
| console.log('process uid: %d', process.getuid()); |