Socket
Socket
Sign inDemoInstall

digdug

Package Overview
Dependencies
37
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.2 to 1.4.0

33

BrowserStackTunnel.js

@@ -7,2 +7,3 @@ /**

var pathUtil = require('path');
var Promise = require('dojo/Promise');
var request = require('dojo/request');

@@ -77,2 +78,10 @@ var Tunnel = require('./Tunnel');

/**
* If true, route all traffic via the local machine.
*
* @type {boolean}
* @default
*/
forceLocal: false,
/**
* The BrowserStack username. This will be initialized with the value of the `BROWSERSTACK_USERNAME`

@@ -144,2 +153,3 @@ * environment variable.

this.automateOnly && args.push('-onlyAutomate');
this.forceLocal && args.push('-forcelocal');
this.killOtherTunnels && args.push('-force');

@@ -223,2 +233,25 @@ this.skipServerValidation && args.push('-skipCheck');

return child;
},
_stop: function () {
var dfd = new Promise.Deferred();
var childProcess = this._process;
var exited = false;
childProcess.once('exit', function (code) {
exited = true;
dfd.resolve(code);
});
childProcess.kill('SIGINT');
// As of at least version 5.1, BrowserStackLocal spawns a secondary process. This is the one that needs to
// receive the CTRL-C, but Node doesn't provide an easy way to get the PID of the secondary process, so we'll
// just wait a few seconds, then kill the process if it hasn't ended cleanly.
setTimeout(function () {
if (!exited) {
childProcess.kill('SIGTERM');
}
}, 5000);
return dfd.promise;
}

@@ -225,0 +258,0 @@ });

86

CONTRIBUTING.md
Contribution guidelines
=======================
## Hi!
## Hi! Welcome!
* The issues tab is for **bugs and feature enhancement requests only**, not questions. If you aren’t sure if your
problem is a bug (or you know that it isn’t), please ask in one of the
[support forums](https://github.com/theintern/intern/wiki/Support) instead. Any help questions posted to the bug
tracker will normally be closed without a good answer in order to keep the bug tracker focused only on the development
process. Sorry for any inconvenience!
* If you can, find the right issue tracker for your problem:
* [Dig Dug](https://github.com/theintern/digdug/issues) should be used for issues regarding downloading or starting
service tunnels, or interacting with a service provider’s REST API
* [Leadfoot](https://github.com/theintern/leadfoot/issues) should be used for issues with any of the functional
testing APIs, including issues with cross-browser inconsistencies or unsupported Selenium environments
* [Intern](https://github.com/theintern/intern/issues) for all other issues
Thanks for taking a look at our contribution guidelines. This is a small open-source project and we’re always looking
to get more people actively involved in its development and direction—even if you can’t send code!
## Want to submit a new feature or bug fix?
## How to get help
* Thank you for your contribution!
* If you want to help, but aren’t sure where to start, come [talk to us on IRC](irc://irc.freenode.net/intern) or ask
how to start on a ticket that interests you
* You should also talk to us if you are working on a big thing so we can coordinate before you spend a lot of time on it
:)
* Please make sure you sign a [Dojo Foundation CLA](http://dojofoundation.org/about/claForm) or we cannot accept your
code
* Code should conform to our [code style guidelines](https://github.com/sitepen/.jshintrc)
* If possible and appropriate, updated tests should be a part of your pull request
In order to keep the GitHub issue tracker focused on development tasks, our team prefers that **questions be asked on
Stack Overflow or IRC instead of GitHub**. The [Getting help](https://theintern.github.io/intern/#getting-help) section
of the user guide goes into detail about where and how to ask questions to get the best response!
## Committers!
If you’re in a hurry, here are some direct links:
* [Post a question to Stack Overflow](http://stackoverflow.com/questions/ask?tags=intern)
* [Join #intern on Freenode](https://webchat.freenode.net/?channels=intern)
## Reporting bugs & feature requests
For bugs, please [open a ticket](https://github.com/theintern/digdug/issues/new?body=Description:%0A%0ASteps+to+reproduce:%0A%0A1.%20%E2%80%A6%0A2.%20%E2%80%A6%0A3.%20%E2%80%A6%0A%0AExpected%20result:%0AActual%20result:%0A%0AIntern%20version:%0A%0AAny%20additional%20information:),
providing a description of the problem, reproduction steps, expected result, and actual result. It’s very hard for us
to solve your problem without all of this information.
For feature requests, just open a ticket describing what you’d like to see and we’ll try to figure out how it can
happen! We (and all the other Intern users) would really appreciate it if you could also pitch in to actually implement
the feature (maybe with some help from us?).
It’s not that important, but if you can, try to post to the correct issue tracker for your problem:
* [Dig Dug](https://github.com/theintern/digdug/issues) should be used for issues regarding downloading or starting
service tunnels, or interacting with a service provider’s REST API
* [Leadfoot](https://github.com/theintern/leadfoot/issues) should be used for issues with any of the functional
testing APIs, including issues with cross-browser inconsistencies or unsupported Selenium environments
* [Intern](https://github.com/theintern/intern/issues) for all other issues
## Getting involved
Because Intern is a small project, *any* contribution you can make is much more impactful and much more appreciated
than anything you could offer to big OSS projects that are already well-funded by big corporations like Google or
Facebook.
If you want to get involved with the sexy, sexy world of testing software, but aren’t sure where to start, come
[talk to us on IRC](irc://irc.freenode.net/intern) or look through the list of
[help-wanted tickets](https://github.com/theintern/digdug/labels/help-wanted) for something that piques your interest.
The development team is always happy to provide guidance to new contributors!
If you’re not a coder (or you just don’t want to write code), we can still really use your help in other areas, like
improving [documentation](https://github.com/theintern/digdug/tree/gh-pages), or performing marketing and outreach, or
helping other users on Stack Overflow or IRC, so get in touch if you’d be willing to help in any way!
## Submitting pull requests
Like most open source projects, we require everyone to sign a
[contributor license agreement](http://dojofoundation.org/about/claForm) before we can accept any non-trivial
pull requests. This project belongs to the same foundation as other great OSS projects like Dojo, Grunt, lodash, and
RequireJS, so one e-signature makes you eligible to contribute to all of these projects!
Code should conform to our [code style guidelines](https://github.com/sitepen/.jshintrc). If possible and
appropriate, updated tests should also be a part of your pull request. (If you’re having trouble writing tests, we can
help you with them!)
## Advanced instructions for committers!
* Please make sure to provide rigorous code review on new contributions
* When in doubt, ask for a second review; don’t commit code that smells wrong just because it exists
* Squash all pull requests into a single commit by using `git rebase -i` after a merge. Don’t use the shiny green
button!
* Squash pull requests into a single commit using `git rebase -i` after a merge. Don’t use the shiny green button!
No merge commits allowed!
* Put `[ci skip]` at the end of commit messages for commits that do not modify any code (readme changes, etc.)
* (Intern only) After committing to master, always checkout `geezer` and `git merge master` if the code applies to both
branches
{
"name": "digdug",
"version": "1.3.2",
"version": "1.4.0",
"description": "Dig Dug. A simple abstraction library for downloading and launching WebDriver service tunnels.",

@@ -9,11 +9,9 @@ "repository": {

},
"licenses": [
{ "type": "BSD-3-Clause", "url": "https://github.com/theintern/digdug/blob/master/LICENSE" }
],
"license": "BSD-3-Clause",
"dependencies": {
"dojo": "2.0.0-alpha.6",
"dojo": "2.0.0-alpha.7",
"decompress": "0.2.3"
},
"devDependencies": {
"intern": "2.2.2"
"intern": "3.0.6"
},

@@ -20,0 +18,0 @@ "scripts": {

@@ -54,7 +54,10 @@ # ディグダグ

## API documentation
[View API documentation](https://theintern.github.io/digdug/)
## License
Dig Dug is available under the terms of the [New BSD License](LICENSE). All code is developed under the terms of the
[Dojo Foundation CLA](http://dojofoundation.org/about/cla).
Dig Dug is a Dojo Foundation project offered under the [New BSD](LICENSE) license.
© 2013–2014 SitePen, Inc. http://sitepen.com
© [SitePen, Inc.](http://sitepen.com) and its [contributors](https://github.com/theintern/digdug/graphs/contributors)

@@ -14,3 +14,3 @@ /**

var SC_VERSION = '4.3';
var SC_VERSION = '4.3.14';

@@ -26,2 +26,3 @@ /**

this.accessKey = process.env.SAUCE_ACCESS_KEY;
this.scVersion = SC_VERSION;
this.directDomains = [];

@@ -176,3 +177,3 @@ this.tunnelDomains = [];

if (platform === 'osx' || platform === 'win32' || (platform === 'linux' && architecture === 'x64')) {
return './sc-' + SC_VERSION + '-' + platform + '/bin/sc' + (platform === 'win32' ? '.exe' : '');
return './sc-' + this.scVersion + '-' + platform + '/bin/sc' + (platform === 'win32' ? '.exe' : '');
}

@@ -204,3 +205,3 @@ else {

var architecture = this.architecture;
var url = 'https://saucelabs.com/downloads/sc-' + SC_VERSION + '-';
var url = 'https://saucelabs.com/downloads/sc-' + this.scVersion + '-';

@@ -272,4 +273,2 @@ if (platform === 'osx' || platform === 'win32') {

this.squidOptions && args.push('-S', this.squidOptions);
this.vmVersion && args.push('-V', this.vmVersion);
this.restUrl && args.push('-x', this.restUrl);
this.verbose && args.push('-d');

@@ -308,5 +307,7 @@

this.pidFile && args.push('--pidfile', this.pidFile);
this.restUrl && args.push('-x', this.restUrl);
this.skipSslDomains.length && args.push('-B', this.skipSslDomains.join(','));
this.tunnelId && args.push('-i', this.tunnelId);
this.useProxyForTunnel && args.push('-T');
this.vmVersion && args.push('-V', this.vmVersion);

@@ -313,0 +314,0 @@ return args;

@@ -12,3 +12,3 @@ /* jshint dojo:true */

'intern/chai!assert',
'intern/lib/args'
'intern'
], function (

@@ -24,6 +24,6 @@ Tunnel,

assert,
args
intern
) {
function cleanup(tunnel) {
if (args.noClean) {
if (intern.args.noClean) {
return;

@@ -38,7 +38,14 @@ }

var path = pathUtil.join(dir, file);
if (fs.lstatSync(path).isDirectory()) {
deleteRecursive(path);
try {
if (fs.lstatSync(path).isDirectory()) {
deleteRecursive(path);
}
else {
fs.unlinkSync(path);
}
}
else {
fs.unlinkSync(path);
catch (error) {
if (error.code !== 'ENOENT') {
console.warn('Unable to delete ' + path, error);
}
}

@@ -56,3 +63,3 @@ });

if (args.showStdout) {
if (intern.args.showStdout) {
tunnel.on('stdout', console.log);

@@ -111,3 +118,3 @@ tunnel.on('stderr', console.log);

tunnel.architecture = 'foo';
var executable = /\.\/sc-\d+\.\d+-osx\/bin\/sc/;
var executable = /\.\/sc-\d+\.\d+(?:\.\d+)?-osx\/bin\/sc/;
assert.match(tunnel.executable, executable);

@@ -119,7 +126,7 @@

tunnel.architecture = 'x64';
executable = /\.\/sc-\d+\.\d+-linux\/bin\/sc/;
executable = /\.\/sc-\d+\.\d+(?:\.\d+)?-linux\/bin\/sc/;
assert.match(tunnel.executable, executable);
tunnel.platform = 'win32';
executable = /\.\/sc-\d+\.\d+-win32\/bin\/sc\.exe/;
executable = /\.\/sc-\d+\.\d+(?:\.\d+)?-win32\/bin\/sc\.exe/;
assert.match(tunnel.executable, executable);

@@ -145,3 +152,3 @@ },

tunnel.platform = 'darwin';
var url = /https:\/\/saucelabs\.com\/downloads\/sc-\d+\.\d+-osx\.zip/;
var url = /https:\/\/saucelabs\.com\/downloads\/sc-\d+\.\d+(?:\.\d+)?-osx\.zip/;
assert.match(tunnel.url, url);

@@ -151,3 +158,3 @@

tunnel.architecture = 'x64';
url = /https:\/\/saucelabs\.com\/downloads\/sc-\d+\.\d+-linux\.tar\.gz/;
url = /https:\/\/saucelabs\.com\/downloads\/sc-\d+\.\d+(?:\.\d+)?-linux\.tar\.gz/;
assert.match(tunnel.url, url);

@@ -224,3 +231,3 @@ }

'#start': function () {
tunnelTest(this.async(), tunnel, function (error) {
tunnelTest(this.async(120000), tunnel, function (error) {
return /Could not get tunnel info/.test(error.message);

@@ -227,0 +234,0 @@ });

@@ -6,3 +6,3 @@ /* jshint dojo:true */

maxConcurrency: 3,
loader: {
loaderOptions: {
packages: [

@@ -12,3 +12,3 @@ { name: 'digdug', location: '.' }

},
reporters: [ 'console' ],
reporters: [ 'Console' ],
suites: [

@@ -15,0 +15,0 @@ 'dojo/has!host-node?digdug/tests/all'

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc