Skip to content

Commit

Permalink
bump dependencies versions
Browse files Browse the repository at this point in the history
keep browserify to 8.0.3 instead of 8.1.3 because the new version has
an issue with http requests that response doesn’t emit events. maybe
related to this? browserify/http-browserify#18
anyway for now stick to 8.0.3
  • Loading branch information
guymguym committed Feb 7, 2015
1 parent df7d2e8 commit 679aa8b
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 129 deletions.
9 changes: 5 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "NooBaa-Core",
"version": "0.0.1",
"dependencies": {
"alertify.js": "0.3.x",
"ladda": "0.9.4",
"bootstrap-material-design": "~0.2.1",
"bootstrap-sidebar": "~0.2.1"
"alertify.js": "~0.3.11",
"ladda": "~0.9.7",
"bootstrap-material-design": "~0.2.2",
"bootstrap-sidebar": "~0.2.2",
"spinkit": "1.0.1"
}
}
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ gulp.task('ng', function() {

gulp.task('jshint', function() {
return gulp
.src(_.flatten([PATHS.scripts, PATHS.html_scripts]))
.src(_.flattenDeep([PATHS.scripts, PATHS.html_scripts]))
.pipe(gulp_plumber(PLUMB_CONF))
.pipe(gulp_cached('jshint'))
.pipe(gulp_jshint.extract('always'))
Expand Down Expand Up @@ -343,6 +343,7 @@ gulp.task('mocha', function() {
return gulp
.src(PATHS.scripts)
.pipe(gulp_istanbul())
.pipe(gulp_istanbul.hookRequire()) // Force `require` to return covered files
.on('finish', function() {
return gulp.src(PATHS.test_scripts, SRC_DONT_READ)
.pipe(gulp_mocha(mocha_options))
Expand Down
99 changes: 46 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,85 +23,78 @@
"browser": {
"jquery": false
},
"browserify-shim": {
"jquery": "global:$"
},
"browserify": {
"transform": [
"browserify-shim"
]
},
"dependencies": {
"animate.css": "~3.1.1",
"async": "~0.9.0",
"aws-sdk": "~2.0.29",
"bcrypt": "~0.8.0",
"body-parser": "~1.10.0",
"bootstrap": "~3.3.1",
"aws-sdk": "~2.1.8",
"bcrypt": "~0.8.1",
"body-parser": "~1.11.0",
"bootstrap": "~3.3.2",
"bower": "~1.3.12",
"browserify": "~6.2.0",
"browserify-aes": "^1.0.0",
"browserify-shim": "~3.8.0",
"chance": "~0.6.3",
"compression": "~1.2.1",
"concat-stream": "~1.4.6",
"browserify": "~8.0.3",
"browserify-aes": "~1.0.0",
"chance": "~0.7.3",
"compression": "~1.4.0",
"concat-stream": "~1.4.7",
"cookie-jar": "~0.3.0",
"cookie-parser": "~1.3.3",
"cookie-session": "~1.1.0",
"dev-null": "^0.1.1",
"dotenv": "~0.4.0",
"event-stream": "~3.1.7",
"express": "~4.10.4",
"express-jwt": "~0.5.1",
"font-awesome": "~4.2.0",
"debug": "~2.1.1",
"dev-null": "~0.1.1",
"dotenv": "~0.5.1",
"event-stream": "~3.2.2",
"express": "~4.11.2",
"express-jwt": "~1.0.0",
"font-awesome": "~4.3.0",
"googleapis": "^1.1.1",
"gulp": "~3.8.10",
"gulp-angular-templatecache": "~1.4.2",
"gulp-cached": "~1.0.1",
"gulp-concat": "~2.4.1",
"gulp-debug": "~1.0.1",
"gulp-filter": "~1.0.2",
"gulp-angular-templatecache": "~1.5.0",
"gulp-cached": "~1.0.2",
"gulp-concat": "~2.4.3",
"gulp-debug": "~2.0.0",
"gulp-filter": "~2.0.0",
"gulp-gzip": "0.0.8",
"gulp-istanbul": "~0.4.0",
"gulp-jshint": "~1.9.0",
"gulp-istanbul": "~0.6.0",
"gulp-jshint": "~1.9.2",
"gulp-json-editor": "~2.2.1",
"gulp-less": "~1.3.6",
"gulp-minify-css": "~0.3.10",
"gulp-less": "~2.0.1",
"gulp-minify-css": "~0.4.5",
"gulp-mocha": "~2.0.0",
"gulp-newer": "~0.3.0",
"gulp-notify": "~2.0.1",
"gulp-newer": "~0.5.0",
"gulp-notify": "~2.2.0",
"gulp-plumber": "~0.6.6",
"gulp-rename": "~1.2.0",
"gulp-replace": "~0.4.0",
"gulp-size": "~1.1.0",
"gulp-tar": "~1.3.1",
"gulp-uglify": "~1.0.1",
"gulp-util": "~3.0.1",
"heapdump": "^0.3.3",
"gulp-replace": "~0.5.2",
"gulp-size": "~1.2.0",
"gulp-tar": "~1.3.2",
"gulp-uglify": "~1.1.0",
"gulp-util": "~3.0.3",
"heapdump": "~0.3.5",
"jshint-stylish": "~1.0.0",
"jsonwebtoken": "~1.1.2",
"lodash": "~2.4.1",
"method-override": "~2.3.0",
"mime": "^1.2.11",
"lodash": "~3.1.0",
"method-override": "~2.3.1",
"mime": "~1.3.2",
"minimist": "~1.1.0",
"mkdirp": "~0.5.0",
"mocha": "~2.1.0",
"moment": "~2.8.4",
"mongoose": "~3.8.20",
"morgan": "~1.5.0",
"newrelic": "^1.14.3",
"nodetime": "^0.8.15",
"moment": "~2.9.0",
"mongoose": "~3.8.22",
"morgan": "~1.5.1",
"newrelic": "~1.15.1",
"nodetime": "~0.8.15",
"noobaa-util": "git+https://1ca59ff8cb89b36ed5cc65736999cc9c39989e42:[email protected]/noobaa/noobaa-util.git",
"q": "~1.1.2",
"request": "~2.49.0",
"request": "~2.53.0",
"rimraf": "~2.2.8",
"static-favicon": "~2.0.0-alpha",
"through2": "~0.6.3",
"tv4": "~1.1.5",
"video.js": "~4.10.2",
"tv4": "~1.1.9",
"video.js": "~4.11.4",
"vinyl-buffer": "~1.0.0",
"vinyl-source-stream": "~1.0.0"
},
"devDependencies": {
"node-inspector": "~0.7.4"
"node-inspector": "~0.8.3"
}
}
4 changes: 2 additions & 2 deletions src/client/client_streamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function client_streamer(client, port) {
'</body>',
'</html>'
];
var html = _.flatten(html_arrays).join('\n');
var html = _.flattenDeep(html_arrays).join('\n');
res.status(200).send(html);
})
.then(null, function(err) {
Expand Down Expand Up @@ -151,7 +151,7 @@ function client_streamer(client, port) {
'</body>',
'</html>'
];
var html = _.flatten(html_arrays).join('\n');
var html = _.flattenDeep(html_arrays).join('\n');
res.status(200).send(html);
})
.then(null, function(err) {
Expand Down
60 changes: 29 additions & 31 deletions src/deploy/ec2.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function describe_instances(params) {
return ec2_region_call(region.RegionName, 'describeInstances', params)
.then(function(res) {
// return a flat array of instances from res.Reservations[].Instances[]
var instances = _.flatten(res.Reservations, 'Instances');
var instances = _.flatten(_.map(res.Reservations, 'Instances'));
// prepare instance extra fields and filter out irrelevant instances
return _.filter(instances, function(instance) {
instance.region = region;
Expand Down Expand Up @@ -141,7 +141,7 @@ function describe_instance(instance_id) {
* scale_instances
*
*/
function scale_instances(count, allow_terminate,is_docker_host,number_of_dockers) {
function scale_instances(count, allow_terminate, is_docker_host, number_of_dockers) {

return describe_instances({
Filters: [{
Expand Down Expand Up @@ -192,7 +192,7 @@ function scale_instances(count, allow_terminate,is_docker_host,number_of_dockers
new_count += region_count;
}

return scale_region(region_name, region_count, instances, allow_terminate,is_docker_host,number_of_dockers);
return scale_region(region_name, region_count, instances, allow_terminate, is_docker_host, number_of_dockers);
}));
});
}
Expand All @@ -206,7 +206,7 @@ function scale_instances(count, allow_terminate,is_docker_host,number_of_dockers
* @param instances - array of existing instances
*
*/
function scale_region(region_name, count, instances, allow_terminate,is_docker_host,number_of_dockers) {
function scale_region(region_name, count, instances, allow_terminate, is_docker_host, number_of_dockers) {

// always make sure the region has the security group and key pair
return Q
Expand All @@ -222,7 +222,7 @@ function scale_region(region_name, count, instances, allow_terminate,is_docker_h
if (count > instances.length) {
console.log('ScaleRegion:', region_name, 'has', instances.length,
' +++ adding', count - instances.length);
return add_region_instances(region_name, count - instances.length,is_docker_host,number_of_dockers);
return add_region_instances(region_name, count - instances.length, is_docker_host, number_of_dockers);
}

// need to terminate
Expand All @@ -249,29 +249,29 @@ function scale_region(region_name, count, instances, allow_terminate,is_docker_h
* add_region_instances
*
*/
function add_region_instances(region_name, count,is_docker_host,number_of_dockers) {
function add_region_instances(region_name, count, is_docker_host, number_of_dockers) {
var instance_type = 't2.micro';
// the run script to send to started instances
var run_script = fs.readFileSync(__dirname + '/init_agent.sh','UTF8');
var run_script = fs.readFileSync(__dirname + '/init_agent.sh', 'UTF8');
var test_instances_counter;

if (is_docker_host){
if (is_docker_host) {
instance_type = 'm3.2xlarge';
run_script = fs.readFileSync(__dirname + '/docker_setup.sh','utf8');
run_script = fs.readFileSync(__dirname + '/docker_setup.sh', 'utf8');
//replace 'test' with the correct env name
var test_instances_counter = (run_script.match(/test/g) || []).length;
test_instances_counter = (run_script.match(/test/g) || []).length;
var dockers_instances_counter = (run_script.match(/200/g) || []).length;

if (test_instances_counter!=1 || dockers_instances_counter !=1){
throw new Error ('docker_setup.sh expected to contain default env "test" and default number of dockers - 200');
if (test_instances_counter !== 1 || dockers_instances_counter !== 1) {
throw new Error('docker_setup.sh expected to contain default env "test" and default number of dockers - 200');
}
run_script = run_script.replace("test", app_name);
run_script = run_script.replace("200",number_of_dockers);
}else
{
var test_instances_counter = (run_script.match(/test/g) || []).length;
console.log('test_instances_counter',test_instances_counter);
if (test_instances_counter!=1){
throw new Error ('init_agent.sh expected to contain default env "test"',test_instances_counter);
run_script = run_script.replace("200", number_of_dockers);
} else {
test_instances_counter = (run_script.match(/test/g) || []).length;
console.log('test_instances_counter', test_instances_counter);
if (test_instances_counter !== 1) {
throw new Error('init_agent.sh expected to contain default env "test"', test_instances_counter);
}
run_script = run_script.replace("test", app_name);
}
Expand Down Expand Up @@ -499,33 +499,31 @@ function print_instances(instances) {
function main() {

if (_.isUndefined(process.env.AWS_ACCESS_KEY_ID)) {
console.error('\n\n****************************************************');
console.error('You must provide amazon cloud env details in .env:');
console.error('AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION');
console.error('****************************************************\n\n');
return;
console.error('\n\n****************************************************');
console.error('You must provide amazon cloud env details in .env:');
console.error('AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION');
console.error('****************************************************\n\n');
return;
}
if (!_.isUndefined(argv.scale)) {

if (!_.isUndefined(argv.scale)) {
var is_docker_host = false;
if (!_.isUndefined(argv.dockers)) {
is_docker_host = true;
console.log ('starting '+argv.dockers + ' dockers on each host');
console.log('starting ' + argv.dockers + ' dockers on each host');

}
if (_.isUndefined(argv.app)) {

console.error('\n\n******************************************');
console.error('Please provide --app (heroku app name)');
console.error('******************************************\n\n');
throw err;
}else
{
return;
} else {
app_name = argv.app;
}

// add a --term flag to allow removing nodes
scale_instances(argv.scale, argv.term,is_docker_host, argv.dockers)
scale_instances(argv.scale, argv.term, is_docker_host, argv.dockers)
.then(function(res) {
console_inspect('Scale: completed to ' + argv.scale, res);
return describe_instances().then(print_instances);
Expand Down
Loading

0 comments on commit 679aa8b

Please sign in to comment.