Compare commits
No commits in common. 'master' and 'v0.6.1' have entirely different histories.
@ -1,21 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "0.10"
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- BROWSER_PROVIDER_READY_FILE=/tmp/sauce-connect-ready
|
|
||||||
- LOGS_DIR=/tmp/angular-hint-build/logs
|
|
||||||
- SAUCE_USERNAME=angular-ci
|
|
||||||
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
|
|
||||||
|
|
||||||
install:
|
|
||||||
- mkdir -p $LOGS_DIR
|
|
||||||
- ./scripts/sauce_connect_setup.sh
|
|
||||||
- npm install
|
|
||||||
- npm install -g gulp
|
|
||||||
- npm install -g karma-cli
|
|
||||||
- ./scripts/wait_for_browser_provider.sh
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ./scripts/test_on_sauce.sh
|
|
@ -1,23 +1,8 @@
|
|||||||
# AngularJS Batarang
|
# AngularJS Batarang
|
||||||
[![Build Status](https://travis-ci.org/angular/angularjs-batarang.svg)](https://travis-ci.org/angular/angularjs-batarang)
|
|
||||||
|
|
||||||
## Installing from the Web Store
|
## Installing from the Web Store
|
||||||
|
|
||||||
https://chrome.google.com/webstore/detail/ighdmehidhipcmcojjgiloacoafjmpfk
|
https://chrome.google.com/webstore/detail/ighdmehidhipcmcojjgiloacoafjmpfk
|
||||||
|
|
||||||
## Installing Previous Versions
|
|
||||||
|
|
||||||
1. Download and extract one of the files from the [Batarang releases page on GitHub](https://github.com/angular/angularjs-batarang/releases)
|
|
||||||
1. Navigate to `chrome://chrome/extensions/` in Chrome
|
|
||||||
1. If you've installed Batarang from the web store, disable or remove that version
|
|
||||||
1. On the top right, check the checkbox for "Developer mode"
|
|
||||||
1. Click "Load unpacked extension..."
|
|
||||||
1. Select the directory where you extracted the extension
|
|
||||||
1. Close and re-open any inspected tabs
|
|
||||||
|
|
||||||
## Installing from Source
|
|
||||||
|
|
||||||
See the [instructions in the contributing guide](https://github.com/angular/angularjs-batarang/blob/master/CONTRIBUTING.md#installing-from-source)
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
MIT
|
MIT
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
* karma.conf.js and karma.es5.conf.js optionally load this
|
|
||||||
*/
|
|
||||||
|
|
||||||
var CUSTOM_LAUNCHERS = {
|
|
||||||
'SL_Chrome': {
|
|
||||||
base: 'SauceLabs',
|
|
||||||
browserName: 'chrome',
|
|
||||||
version: '35'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = function(options) {
|
|
||||||
options.sauceLabs = {
|
|
||||||
testName: 'AngularJS Batarang Unit Tests',
|
|
||||||
startConnect: true
|
|
||||||
};
|
|
||||||
options.customLaunchers = CUSTOM_LAUNCHERS;
|
|
||||||
options.browsers = Object.keys(CUSTOM_LAUNCHERS);
|
|
||||||
options.reporters = ['dots', 'saucelabs'];
|
|
||||||
};
|
|
@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* karma.conf.js optionally loads this
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = function(options) {
|
|
||||||
if (!isTravis()) {
|
|
||||||
return;
|
|
||||||
} else if (!options.sauceLabs) {
|
|
||||||
throw new Error('This should be loaded after karma.sauce config');
|
|
||||||
}
|
|
||||||
options.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
|
|
||||||
options.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
|
|
||||||
options.sauceLabs.startConnect = false;
|
|
||||||
|
|
||||||
// TODO(vojta): remove once SauceLabs supports websockets.
|
|
||||||
// This speeds up the capturing a bit, as browsers don't even try to use websocket.
|
|
||||||
options.transports = ['xhr-polling'];
|
|
||||||
|
|
||||||
options.singleRun = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
function isTravis() {
|
|
||||||
return !!process.env.TRAVIS;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.0 KiB |
@ -1,28 +1,20 @@
|
|||||||
if (document.cookie.indexOf('__ngDebug=true') != -1) {
|
var html = document.getElementsByTagName('html')[0];
|
||||||
bootstrapHint();
|
|
||||||
}
|
|
||||||
|
|
||||||
function bootstrapHint () {
|
var eventProxyElement = document.createElement('div');
|
||||||
chrome.extension.sendMessage('refresh');
|
eventProxyElement.id = '__ngBatarangElement';
|
||||||
|
eventProxyElement.style.display = 'none';
|
||||||
|
html.appendChild(eventProxyElement);
|
||||||
|
|
||||||
var html = document.getElementsByTagName('html')[0];
|
// inject into the application context from the content script context
|
||||||
|
|
||||||
var eventProxyElement = document.createElement('div');
|
var script = window.document.createElement('script');
|
||||||
eventProxyElement.id = '__ngBatarangElement';
|
script.src = chrome.extension.getURL('dist/hint.js');
|
||||||
eventProxyElement.style.display = 'none';
|
|
||||||
html.appendChild(eventProxyElement);
|
|
||||||
|
|
||||||
// inject into the application context from the content script context
|
eventProxyElement.addEventListener('batarangDataEvent', function () {
|
||||||
|
var eventData = eventProxyElement.innerText;
|
||||||
|
chrome.extension.sendMessage(eventData);
|
||||||
|
});
|
||||||
|
|
||||||
var script = window.document.createElement('script');
|
html.setAttribute('ng-hint', '');
|
||||||
script.src = chrome.extension.getURL('dist/hint.js');
|
|
||||||
|
|
||||||
eventProxyElement.addEventListener('batarangDataEvent', function () {
|
html.appendChild(script);
|
||||||
var eventData = eventProxyElement.innerText;
|
|
||||||
chrome.extension.sendMessage(eventData);
|
|
||||||
});
|
|
||||||
|
|
||||||
html.setAttribute('ng-hint', '');
|
|
||||||
|
|
||||||
html.appendChild(script);
|
|
||||||
}
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Switch a dependency to git repo.
|
|
||||||
# Remove the NPM package and link it to a repo in parent directory.
|
|
||||||
DEP_NAME=$1
|
|
||||||
SCRIPT_DIR=$(dirname $0)
|
|
||||||
cd $SCRIPT_DIR/..
|
|
||||||
|
|
||||||
if [ -L ./node_modules/$DEP_NAME ]; then
|
|
||||||
echo "$DEP_NAME is already a symlink"
|
|
||||||
else
|
|
||||||
PKG_INFO=($($SCRIPT_DIR/read-pkg-url.js ./node_modules/$DEP_NAME/package.json))
|
|
||||||
URL=${PKG_INFO[0]}
|
|
||||||
DIR_NAME=${PKG_INFO[1]}
|
|
||||||
|
|
||||||
echo "Switching $DEP_NAME"
|
|
||||||
rm -rf ./node_modules/$DEP_NAME
|
|
||||||
|
|
||||||
if [ -d ../$DIR_NAME ]; then
|
|
||||||
echo "Repo already cloned in ../$DIR_NAME"
|
|
||||||
else
|
|
||||||
cd ..
|
|
||||||
git clone $URL $DIR_NAME
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Link ./node_modules/$DEP_NAME -> ../$DIR_NAME"
|
|
||||||
ln -s ../../$DIR_NAME ./node_modules/$DEP_NAME
|
|
||||||
fi
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Switch a dependency to NPM.
|
|
||||||
# Remove the symlink and install from NPM.
|
|
||||||
|
|
||||||
DEP_NAME=$1
|
|
||||||
SCRIPT_DIR=$(dirname $0)
|
|
||||||
cd $SCRIPT_DIR/..
|
|
||||||
|
|
||||||
if [ ! -L ./node_modules/$DEP_NAME ]; then
|
|
||||||
echo "$DEP_NAME is not a symlink"
|
|
||||||
else
|
|
||||||
rm ./node_modules/$DEP_NAME
|
|
||||||
npm install $DEP_NAME
|
|
||||||
fi
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
LOG_FILES=$LOGS_DIR/*
|
|
||||||
|
|
||||||
for FILE in $LOG_FILES; do
|
|
||||||
echo -e "\n\n\n"
|
|
||||||
echo "=================================================================="
|
|
||||||
echo " $FILE"
|
|
||||||
echo "=================================================================="
|
|
||||||
cat $FILE
|
|
||||||
done
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
var fs = require('fs');
|
|
||||||
var pkg = JSON.parse(fs.readFileSync(process.argv[2]));
|
|
||||||
var url = pkg.repository.url;
|
|
||||||
var dirname = url.replace(/^.*\//, '').replace(/\.git$/, '');
|
|
||||||
|
|
||||||
console.log(url + ' ' + dirname);
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Setup and start Sauce Connect for your TravisCI build
|
|
||||||
# This script requires your .travis.yml to include the following two private env variables:
|
|
||||||
# SAUCE_USERNAME
|
|
||||||
# SAUCE_ACCESS_KEY
|
|
||||||
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
|
|
||||||
#
|
|
||||||
# Curl and run this script as part of your .travis.yml before_script section:
|
|
||||||
# before_script:
|
|
||||||
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
|
|
||||||
|
|
||||||
CONNECT_URL="https://saucelabs.com/downloads/sc-4.3-linux.tar.gz"
|
|
||||||
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
|
|
||||||
CONNECT_DOWNLOAD="sc-latest-linux.tar.gz"
|
|
||||||
|
|
||||||
CONNECT_LOG="$LOGS_DIR/sauce-connect"
|
|
||||||
CONNECT_STDOUT="$LOGS_DIR/sauce-connect.stdout"
|
|
||||||
CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr"
|
|
||||||
|
|
||||||
# Get Connect and start it
|
|
||||||
mkdir -p $CONNECT_DIR
|
|
||||||
cd $CONNECT_DIR
|
|
||||||
curl $CONNECT_URL -o $CONNECT_DOWNLOAD 2> /dev/null 1> /dev/null
|
|
||||||
mkdir sauce-connect
|
|
||||||
tar --extract --file=$CONNECT_DOWNLOAD --strip-components=1 --directory=sauce-connect > /dev/null
|
|
||||||
rm $CONNECT_DOWNLOAD
|
|
||||||
|
|
||||||
SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
|
|
||||||
|
|
||||||
|
|
||||||
ARGS=""
|
|
||||||
|
|
||||||
# Set tunnel-id only on Travis, to make local testing easier.
|
|
||||||
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
|
|
||||||
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER"
|
|
||||||
fi
|
|
||||||
if [ ! -z "$BROWSER_PROVIDER_READY_FILE" ]; then
|
|
||||||
ARGS="$ARGS --readyfile $BROWSER_PROVIDER_READY_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "Starting Sauce Connect in the background, logging into:"
|
|
||||||
echo " $CONNECT_LOG"
|
|
||||||
echo " $CONNECT_STDOUT"
|
|
||||||
echo " $CONNECT_STDERR"
|
|
||||||
sauce-connect/bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY -v $ARGS \
|
|
||||||
--logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT &
|
|
@ -1,8 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
SCRIPT_DIR=$(dirname $0)
|
|
||||||
cd $SCRIPT_DIR/..
|
|
||||||
|
|
||||||
SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
|
|
||||||
|
|
||||||
gulp
|
|
||||||
karma start --sauce
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
# Wait for Connect to be ready before exiting
|
|
||||||
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
|
|
||||||
sleep .5
|
|
||||||
done
|
|
Reference in New Issue