Permalink
Browse files

first

  • Loading branch information...
0 parents commit 8777942a91e8ef931cbfb91492c403b81e123c09 @Raynos committed Mar 6, 2013
Showing with 217 additions and 0 deletions.
  1. +15 −0 .gitignore
  2. +14 −0 .testem.json
  3. +4 −0 .travis.yml
  4. +19 −0 LICENCE
  5. +31 −0 README.md
  6. 0 examples/simple.js
  7. +6 −0 index.js
  8. +68 −0 package.json
  9. 0 test/index.js
  10. +11 −0 test/static/index.html
  11. +49 −0 test/static/test-adapter.js
@@ -0,0 +1,15 @@
+.DS_Store
+.monitor
+.*.swp
+.nodemonignore
+releases
+*.log
+*.err
+fleet.json
+public/browserify
+bin/*.json
+.bin
+build
+compile
+.lock-wscript
+node_modules
@@ -0,0 +1,14 @@
+{
+ "launchers": {
+ "node": {
+ "command": "node ./test"
+ }
+ },
+ "src_files": [
+ "./**/*.js"
+ ],
+ "before_tests": "npm run build-test",
+ "on_exit": "rm test/static/bundle.js",
+ "test_page": "test/static/index.html",
+ "launch_in_dev": ["node", "phantomjs"]
+}
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.8
+ - 0.9
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,31 @@
+# graphics-server
+
+[![build status][1]][2] [![dependency status][3]][4]
+
+[![browser support][5]][6]
+
+Server for Raynos/graphics
+
+## Example
+
+```js
+
+```
+
+## Installation
+
+`npm install graphics-server`
+
+## Contributors
+
+ - Raynos
+
+## MIT Licenced
+
+
+ [1]: https://secure.travis-ci.org/Raynos/graphics-server.png
+ [2]: http://travis-ci.org/Raynos/graphics-server
+ [3]: http://david-dm.org/Raynos/graphics-server.png
+ [4]: http://david-dm.org/Raynos/graphics-server
+ [5]: http://ci.testling.com/Raynos/graphics-server.png
+ [6]: http://ci.testling.com/Raynos/graphics-server
No changes.
@@ -0,0 +1,6 @@
+var server = require("tryme/bin/server")
+var path = require("path")
+
+server({
+ _: [path.join(__dirname, "node_modules", "graphics", "examples")]
+})
@@ -0,0 +1,68 @@
+{
+ "name": "graphics-server",
+ "version": "0.1.0",
+ "description": "Server for Raynos/graphics",
+ "keywords": [],
+ "author": "Raynos <raynos2@gmail.com>",
+ "repository": "git://github.com/Raynos/graphics-server.git",
+ "main": "index",
+ "homepage": "https://github.com/Raynos/graphics-server",
+ "contributors": [
+ {
+ "name": "Raynos"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/Raynos/graphics-server/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "dependencies": {
+ "tryme": "git://github.com/Raynos/tryme",
+ "reducible": "git://github.com/Raynos/reducible#1.x",
+ "graphics": "git://github.com/Raynos/graphics"
+ },
+ "devDependencies": {
+ "tape": "~0.2.2",
+ "browserify-server": "~2.1.18",
+ "browservefy": "~0.0.7",
+ "testem": "~0.2.56"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://github.com/Raynos/graphics-server/raw/master/LICENSE"
+ }
+ ],
+ "scripts": {
+ "test": "testem ci",
+ "build-test": "browserify-server --bundle=test/index.js -o test/static/bundle.js --debug",
+ "testem": "testem",
+ "example": "browservefy ./examples/simple.js --browserify='browserify-server' --live -- --debug --bundle",
+ "start": "node index.js"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": {
+ "ie": "8..latest",
+ "firefox": [
+ "16..latest",
+ "nightly"
+ ],
+ "chrome": [
+ "22..latest",
+ "canary"
+ ],
+ "opera": [
+ "12..latest",
+ "next"
+ ],
+ "safari": "5.1..latest",
+ "ipad": "6.0..latest",
+ "iphone": "6.0..latest"
+ }
+ },
+ "subdomain": "raynos.graphics-server",
+ "engines": {
+ "node": "0.8.x"
+ }
+}
No changes.
@@ -0,0 +1,11 @@
+<!doctype html>
+<html>
+<head>
+ <title>TAPE Example</title>
+ <script src="/testem.js"></script>
+ <script src="test-adapter.js"></script>
+ <script src="bundle.js"></script>
+</head>
+<body>
+</body>
+</html>
@@ -0,0 +1,49 @@
+(function () {
+ var Testem = window.Testem
+ var regex = /^((?:not )?ok) (\d+) (.+)$/
+
+ Testem.useCustomAdapter(tapAdapter)
+
+ function tapAdapter(socket){
+ var results = {
+ failed: 0
+ , passed: 0
+ , total: 0
+ , tests: []
+ }
+
+ socket.emit('tests-start')
+
+ Testem.handleConsoleMessage = function(msg){
+ var m = msg.match(regex)
+ if (m) {
+ var passed = m[1] === 'ok'
+ var test = {
+ passed: passed ? 1 : 0,
+ failed: passed ? 0 : 1,
+ total: 1,
+ id: m[2],
+ name: m[3],
+ items: []
+ }
+
+ if (passed) {
+ results.passed++
+ } else {
+ results.failed++
+ }
+
+ results.total++
+
+ socket.emit('test-result', test)
+ results.tests.push(test)
+ } else if (msg === '# ok' || msg.match(/^# tests \d+/)){
+ socket.emit('all-test-results', results)
+ }
+
+ // return false if you want to prevent the console message from
+ // going to the console
+ // return false
+ }
+ }
+}())

0 comments on commit 8777942

Please sign in to comment.