Skip to content

Commit

Permalink
Finalizing things for next release.
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Jul 10, 2014
1 parent a6adfe2 commit c084f9d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ Local launchers look up all currently installed browsers and allow you to start

// Launch a local browser
launch.local(function(err, local) {
local.browsers // -> List of all browsers found locally
launcher.browsers(function(error, browsers) {
// -> List of all browsers found locally with version
});
local.firefox('http://url', function(err, instance) {
// An instance is an event emitter
instance.on('stop', function() {
Expand All @@ -53,7 +56,10 @@ Launchpad allows you to start BrowserStack workers through its API like this:
password : 'password'
},
function(err, browserstack) {
browserstack.browsers // -> List of all browsers
launcher.browsers(function(error, browsers) {
// -> List of all Browserstack browsers
});
browserstack.ie('http://url', function(err, instance) {
// Shut the instance down after 5 seconds
setTimeout(function() {
Expand Down Expand Up @@ -94,7 +100,10 @@ the given host:
username : 'launcher',
password : 'testing'
}, function(err, api) {
api.browsers // -> List of browsers found on ie7machine
launcher.browsers(function(error, browsers) {
// -> List of all browsers found on ie7machine
});
api('http://github.com', {
browser : 'safari',
version : 'latest'
Expand Down
2 changes: 1 addition & 1 deletion examples/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var launch = require('../lib');
launch.local(function(err, launcher) {
// User the launcher api
launcher('http://github.com/ekryski', {
browser : 'chrome'
browser: 'safari'
}, function(error, worker) {
if(error) {
console.log('Error:', error);
Expand Down
6 changes: 3 additions & 3 deletions lib/local/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ module.exports = function (settings, callback) {
}

var api = function(url, options, callback) {
var name = options.name;
var name = options.browser;

getBrowser(_.extend({ name: name }, platform[name])).then(function(browser) {
if(browser === null) {
return Q.reject(new Error('Browser ' + options.name + ' not available.'));
return Q.reject(new Error('Browser ' + name + ' not available.'));
}

var args = browser.args || [];
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = function (settings, callback) {
options = {};
}

options.name = name;
options.browser = name;

return api(url, options, callback);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/local/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Instance.prototype.stop = function (callback) {
if (this.options.command === 'open') {
exec('osascript -e \'tell application "' + self.options.process + '" to quit\'');
} else if (process.platform === 'win32') {
exec('taskkill /F /IM ' + (this.options.imageName || path.basename(this.cmd)))
exec('taskkill /IM ' + (this.options.imageName || path.basename(this.cmd)))
.once('exit', function(data) {
self.emit('stop', data);
});
Expand Down
1 change: 0 additions & 1 deletion lib/remote/server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var restify = require('restify');
var _ = require('underscore');
var EventEmitter = require('events').EventEmitter;
var logger = require('winston');

var localLauncher = require('../local');
var pkg = require('../../package.json');
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"main": "lib/index.js",
"engines": {
"node": "~0.8"
"node": "~0.10"
},
"scripts": {
"test": "grunt test"
Expand All @@ -41,8 +41,7 @@
"plist": "~0.4.0",
"q": "^1.0.1",
"restify": "~1.4.4",
"underscore": "~1.4.0",
"winston": "~0.6.2"
"underscore": "~1.4.0"
},
"keywords": [
"browsers",
Expand Down

0 comments on commit c084f9d

Please sign in to comment.