forked from wejendorp/angular-superagent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
10,373 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
components | ||
node_modules | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
|
||
build: components index.js | ||
@component build --dev | ||
BROWSERS= "ie6..11, chrome, safari, firefox" | ||
SRC= $(wildcard index.js lib/*.js) | ||
tests ?= * | ||
BINS= node_modules/.bin | ||
C= $(BINS)/component | ||
TEST= http://localhost:4334 | ||
PHANTOM= $(BINS)/mocha-phantomjs \ | ||
--setting local-to-remote-url-access=true \ | ||
--setting web-security=false | ||
|
||
|
||
build: node_modules components $(SRC) | ||
@$(C) build --dev | ||
|
||
components: component.json | ||
@component install --dev | ||
@$(C) install --dev | ||
|
||
kill: | ||
-@test -e test/pid.txt \ | ||
&& kill `cat test/pid.txt` \ | ||
&& rm -f test/pid.txt | ||
|
||
node_modules: package.json | ||
@npm install | ||
|
||
server: build kill | ||
@tests=$(tests) node test/server & | ||
@sleep 1 | ||
|
||
test: build server | ||
@$(PHANTOM) $(TEST) | ||
|
||
test-browser: build server | ||
@open $(TEST) | ||
|
||
test-coverage: build server | ||
@open $(TEST)/coverage | ||
|
||
test-sauce: build server | ||
@BROWSERS=$(BROWSERS) $(GRAVY) --url $(TEST) | ||
|
||
clean: | ||
rm -fr build components template.js | ||
rm -rf components build | ||
|
||
.PHONY: clean | ||
.PHONY: clean server test test-browser | ||
.PHONY: test-sauce test-coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "angular-superagent", | ||
"version": "0.0.0", | ||
"description": "Angular wrapper for [Superagent](https://github.com/visionmedia/superagent).", | ||
"main": "test/server.js", | ||
"directories": { | ||
"example": "examples", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/wejendorp/angular-superagent.git" | ||
}, | ||
"author": "Jacob Wejendorp", | ||
"license": "BSD", | ||
"bugs": { | ||
"url": "https://github.com/wejendorp/angular-superagent/issues" | ||
}, | ||
"homepage": "https://github.com/wejendorp/angular-superagent", | ||
"devDependencies": { | ||
"component": "component/component#fa95027ce8", | ||
"express": "~3.1.0", | ||
"hbs": "~2.3.0", | ||
"mocha-phantomjs": "~3.1.5", | ||
"uglify-js": "~2.4.1", | ||
"underscore": "~1.4.3", | ||
"phantomjs": "~1.9.2-2", | ||
"gravy": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>integrations tests</title> | ||
<link rel="stylesheet" href="test/mocha.css"> | ||
<!-- amd --> | ||
<script src='//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.9/require.js'></script> | ||
</head> | ||
<body> | ||
<div id="mocha"></div> | ||
<script src="test/mocha.js"></script> | ||
<script> | ||
mocha.setup({ | ||
ui: 'bdd', | ||
ignoreLeaks: true, | ||
slow: 300, | ||
timeout: 10000 | ||
}); | ||
</script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script> | ||
<script src="http://code.angularjs.org/1.2.16/angular-mocks.js"></script> | ||
<script src="build/build.js"></script> | ||
<script src="test/sinon.js"></script> | ||
<script src="test/spec/agent.js"></script> | ||
<script> | ||
if (window.mochaPhantomJS) { | ||
require('debug').disable(); | ||
mochaPhantomJS.run(); | ||
} else { | ||
require('debug').enable('*'); | ||
// require('gravy')(mocha.run()); | ||
} | ||
mocha.run(); | ||
|
||
// angular.module('ngSuperagent').config(function(RequestProvider) { console.log(RequestProvider); }).run(function(Request) { console.log(Request); }) | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.