Skip to content

Commit 60bf901

Browse files
author
Joost de Vries
committed
Merge pull request #7 from joostdevries/update-ember-inspector
Changes to work with latest version of ember-inspector
2 parents 672940b + 5bae991 commit 60bf901

36 files changed

+290
-119
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"predef": {
3-
"document": true,
4-
"window": true,
5-
"-Promise": true
6-
},
7-
"browser" : true,
8-
"boss" : true,
2+
"predef": [
3+
"document",
4+
"window",
5+
"-Promise"
6+
],
7+
"browser": true,
8+
"boss": true,
99
"curly": true,
1010
"debug": false,
1111
"devel": true,

.npmignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
bower_components/
2+
tests/
3+
tmp/
4+
dist/
5+
6+
.bowerrc
7+
.editorconfig
8+
.ember-cli
9+
.travis.yml
10+
.npmignore
11+
**/.gitkeep
12+
bower.json
13+
Brocfile.js
14+
testem.json

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
---
22
language: node_js
3+
node_js:
4+
- "0.12"
35

46
sudo: false
57

68
cache:
79
directories:
810
- node_modules
911

12+
matrix:
13+
fast_finish: true
14+
15+
before_install:
16+
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
17+
- "npm config set spin false"
18+
- "npm install -g npm@^2"
19+
1020
install:
1121
- npm install -g bower
1222
- npm install

Brocfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* jshint node: true */
12
/* global require, module */
23

34
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ember-cli-remote-inspector
22

3+
[![Build Status](https://travis-ci.org/joostdevries/ember-cli-remote-inspector.svg)](https://travis-ci.org/joostdevries/ember-cli-remote-inspector)
4+
35
Lets you inspect apps running on different devices/browsers over the network using websockets.
46

57
## Usage
@@ -28,5 +30,9 @@ Much love goes out to @teddyzeenny and the other people working on the [ember in
2830

2931
## Changelog
3032

33+
- 0.1.0
34+
- Updated Ember Inspector to 1.8.0
35+
- Added acceptance tests
36+
- Listed Express as a dependency
3137
- 0.0.2 - Support for `remoteDebugScheme` (defaults to "")
3238
- 0.0.1 - Initial release

addon/debug-server.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* jshint node: true */
12
// Websocket server which handles data to/from the inspector
23
var fs = require('fs');
34
var express = require('express');
@@ -10,10 +11,13 @@ var inspectorSocket = null;
1011
// Load the inspector html from the node_modules folder
1112
// (it should be there because we list it as a dependency)
1213
var inspectorPath = __dirname + '/../node_modules/ember-inspector/dist_websocket/';
13-
var inspectorHtml = fs.readFileSync(inspectorPath + 'panes/index.html').toString();
1414

15-
remoteDebugger.use('/', express.static(inspectorPath)); // Serve inspector static files
16-
remoteDebugger.get('/', function(req, res) { // Serve inspector
15+
// Server static files for the inspector
16+
remoteDebugger.use('/', express.static(inspectorPath, {index:false}));
17+
18+
// Serve the inspector itself
19+
var inspectorHtml = fs.readFileSync(inspectorPath + 'index.html').toString();
20+
remoteDebugger.get('/', function(req, res) {
1721
res.end(inspectorHtml);
1822
});
1923

@@ -22,7 +26,7 @@ module.exports = {
2226
Injects the script used to connect socket.io to the inspector into the inspector HTML
2327
*/
2428
setRemoteDebugSocketScript: function(scriptHtml) {
25-
inspectorHtml = inspectorHtml.replace('{{ remote-port }}', scriptHtml)
29+
inspectorHtml = inspectorHtml.replace('{{ remote-port }}', scriptHtml);
2630
},
2731

2832
/*
@@ -48,4 +52,4 @@ module.exports = {
4852
});
4953
});
5054
}
51-
}
55+
};

bower.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "ember-cli-remote-inspector",
33
"dependencies": {
4-
"socket.io":"1.1.0",
5-
"handlebars": "~1.3.0",
4+
"ember": "components/ember#canary",
5+
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
6+
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
7+
"ember-data": "1.0.0-beta.17",
8+
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
9+
"ember-qunit": "0.3.3",
10+
"ember-qunit-notifications": "0.0.7",
11+
"ember-resolver": "~0.1.15",
612
"jquery": "^1.11.1",
7-
"ember": "1.7.0",
8-
"ember-data": "1.0.0-beta.10",
9-
"ember-resolver": "~0.1.7",
10-
"loader.js": "stefanpenner/loader.js#1.0.1",
11-
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
12-
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
13-
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
14-
"ember-qunit": "0.1.8",
15-
"ember-qunit-notifications": "0.0.4",
16-
"qunit": "~1.15.0"
13+
"loader.js": "ember-cli/loader.js#3.2.0",
14+
"qunit": "~1.17.1"
15+
},
16+
"resolutions": {
17+
"ember": "canary"
1718
}
1819
}

config/ember-try.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
scenarios: [
3+
{
4+
name: 'default',
5+
dependencies: { }
6+
},
7+
{
8+
name: 'ember-release',
9+
dependencies: {
10+
'ember': 'components/ember#release'
11+
},
12+
resolutions: {
13+
'ember': 'release'
14+
}
15+
},
16+
{
17+
name: 'ember-beta',
18+
dependencies: {
19+
'ember': 'components/ember#beta'
20+
},
21+
resolutions: {
22+
'ember': 'beta'
23+
}
24+
},
25+
{
26+
name: 'ember-canary',
27+
dependencies: {
28+
'ember': 'components/ember#canary'
29+
},
30+
resolutions: {
31+
'ember': 'canary'
32+
}
33+
}
34+
]
35+
};

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
return '<script type="text/javascript">' +
2828
' (function(){' +
2929
' var script = document.createElement(\'script\');' +
30-
' script.src = \'' + scheme + '//' + host + ':' + port + '/ember_debug/ember_debug.js\';' +
30+
' script.src = \'' + scheme + '//' + host + ':' + port + '/ember_debug.js\';' +
3131
' document.body.appendChild(script);' +
3232
' })();' +
3333
'</script>';
@@ -71,7 +71,7 @@ module.exports = {
7171
}
7272

7373
next();
74-
});
74+
});
7575
},
7676

7777
contentFor: function(type) {

0 commit comments

Comments
 (0)