diff --git a/.travis.yml b/.travis.yml index b29d5f5..80a5f98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js sudo: false node_js: - - "5.8" + - "6.2" - "0.12" env: - CXX=g++-4.8 diff --git a/README.md b/README.md index 485fe7b..e854b83 100644 --- a/README.md +++ b/README.md @@ -83,4 +83,7 @@ If you understand French, you can visit [my website](http://www.gaelmetais.com) ## Contributors - Achraf Ben Younes [achrafbenyounes](https://github.com/achrafbenyounes) +- [camlafit](https://github.com/camlafit) +- Vincent L. [magikcypress](https://github.com/magikcypress) +- Ousama Ben Younes [ousamabenyounes](https://github.com/ousamabenyounes) diff --git a/Vagrantfile b/Vagrantfile index b8c467b..43b7a13 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,17 +1,22 @@ Vagrant.configure("2") do |config| - config.vm.box = "precise64" - config.vm.box_url = "http://files.vagrantup.com/precise64.box" + config.vm.box = "ubuntu/precise64" config.vm.network :private_network, ip: "10.10.10.10" config.ssh.forward_agent = true + # http://foo-o-rama.com/vagrant--stdin-is-not-a-tty--fix.html + config.vm.provision "fix-no-tty", type: "shell" do |s| + s.privileged = false + s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile" + end + config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - vb.customize ["modifyvm", :id, "--memory", 512] + vb.customize ["modifyvm", :id, "--memory", 1024] vb.customize ["modifyvm", :id, "--cpus", 2] end config.vm.provision :shell, :path => "server_config/server_install.sh" -end \ No newline at end of file +end diff --git a/bin/server.js b/bin/server.js index 9ad04a8..394af07 100644 --- a/bin/server.js +++ b/bin/server.js @@ -17,6 +17,7 @@ app.use(cors()); app.use(wwwRedirectMiddleware); app.use(authMiddleware); app.use(apiLimitsMiddleware); +app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded // Initialize the controllers @@ -37,4 +38,4 @@ if (!process.env.GRUNTED) { }); } -module.exports = app; \ No newline at end of file +module.exports = app; diff --git a/lib/server/controllers/apiController.js b/lib/server/controllers/apiController.js index 952932d..765f490 100644 --- a/lib/server/controllers/apiController.js +++ b/lib/server/controllers/apiController.js @@ -8,7 +8,6 @@ var RunsDatastore = require('../datastores/runsDatastore'); var ResultsDatastore = require('../datastores/resultsDatastore'); var serverSettings = require('../../../server_config/settings.json'); - var ApiController = function(app) { 'use strict'; @@ -16,8 +15,6 @@ var ApiController = function(app) { var runsDatastore = new RunsDatastore(); var resultsDatastore = new ResultsDatastore(); - - // Create a new run app.post('/api/runs', function(req, res) { @@ -330,4 +327,4 @@ var ApiController = function(app) { }; -module.exports = ApiController; \ No newline at end of file +module.exports = ApiController; diff --git a/package.json b/package.json index 4c6e11e..29302be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yellowlabtools", - "version": "1.10.0", + "version": "1.10.1", "description": "Online tool to audit a webpage for performance and front-end quality issues", "license": "GPL-2.0", "author": { @@ -41,7 +41,7 @@ "imagemin": "4.0.0", "imagemin-jpegoptim": "4.1.0", "is-http2": "1.0.4", - "lwip": "0.0.8", + "lwip": "0.0.9", "meow": "3.7.0", "minimize": "1.8.1", "parse-color": "1.0.0", diff --git a/server_config/server_install.sh b/server_config/server_install.sh index 18fd4ed..410e633 100644 --- a/server_config/server_install.sh +++ b/server_config/server_install.sh @@ -2,13 +2,12 @@ # APT-GET sudo apt-get update -sudo apt-get install lsb-release libfontconfig1 libfreetype6 libjpeg-dev -y --force-yes -sudo apt-get install curl git python-software-properties build-essential make g++ -y --force-yes +sudo apt-get install lsb-release libfontconfig1 libfreetype6 libjpeg-dev -y --force-yes > /dev/null 2>&1 +sudo apt-get install curl git python-software-properties build-essential make g++ -y --force-yes > /dev/null 2>&1 # Installation of NodeJS -sudo add-apt-repository -y ppa:chris-lea/node.js -sudo apt-get update -sudo apt-get install -y nodejs +curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash - +sudo apt-get install -y nodejs > /dev/null 2>&1 source ~/.profile # Installation of some packages globally