should fix travix
starting missing api before running test via testem
This commit is contained in:
parent
226220cd78
commit
04a1bafc47
3 changed files with 8 additions and 1 deletions
|
@ -1,13 +1,15 @@
|
||||||
import DS from "ember-data";
|
import DS from "ember-data";
|
||||||
|
|
||||||
export default DS.RESTAdapter.extend({
|
export default DS.RESTAdapter.extend({
|
||||||
|
host: 'http://localhost:4200',
|
||||||
|
|
||||||
// set namespace to api.php in same subdirectory
|
// set namespace to api.php in same subdirectory
|
||||||
namespace:
|
namespace:
|
||||||
window.location.pathname
|
window.location.pathname
|
||||||
// remove index.html if it's there
|
// remove index.html if it's there
|
||||||
.replace(/index.html$/, '')
|
.replace(/index.html$/, '')
|
||||||
// remove tests prefix which are added if tests are running
|
// remove tests prefix which are added if tests are running
|
||||||
.replace(/tests/, '')
|
.replace(/\/\d+\/tests/, '')
|
||||||
// remove leading and trailing slash
|
// remove leading and trailing slash
|
||||||
.replace(/\/$/, '')
|
.replace(/\/$/, '')
|
||||||
// add api.php
|
// add api.php
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
"broccoli-merge-trees": "^0.2.1",
|
"broccoli-merge-trees": "^0.2.1",
|
||||||
"broccoli-static-compiler": "~0.2.1",
|
"broccoli-static-compiler": "~0.2.1",
|
||||||
"connect-restreamer": "^1.0.1",
|
"connect-restreamer": "^1.0.1",
|
||||||
|
"cors": "^2.5.3",
|
||||||
"ember-cli": "0.1.7",
|
"ember-cli": "0.1.7",
|
||||||
"ember-cli-6to5": "0.2.1",
|
"ember-cli-6to5": "0.2.1",
|
||||||
"ember-cli-build-info": "0.0.4",
|
"ember-cli-build-info": "0.0.4",
|
||||||
|
|
|
@ -13,6 +13,10 @@ module.exports = function(app) {
|
||||||
var mocks = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
|
var mocks = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
|
||||||
var proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);
|
var proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);
|
||||||
|
|
||||||
|
/* use cors for testem requests */
|
||||||
|
var cors = require('cors');
|
||||||
|
app.use(cors());
|
||||||
|
|
||||||
/* use node-phpcgi to handle api */
|
/* use node-phpcgi to handle api */
|
||||||
var phpcgi = require('node-phpcgi')({
|
var phpcgi = require('node-phpcgi')({
|
||||||
documentRoot: __dirname.substring(0, __dirname.length - 6) + '/dist',
|
documentRoot: __dirname.substring(0, __dirname.length - 6) + '/dist',
|
||||||
|
|
Loading…
Reference in a new issue