Skip to content

Commit bc6ac05

Browse files
author
DSivachinskiy
committed
update dummy
1 parent 3e10766 commit bc6ac05

15 files changed

Lines changed: 107 additions & 110 deletions

File tree

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"typeahead.js": "0.10.5",
2020
"jquery-ui-sortable": "*",
2121
"bootstrap-datepicker": "~1.4.0",
22-
"jquery-ui-touch-punch": "furf/jquery-ui-touch-punch"
22+
"jquery-ui-touch-punch": "furf/jquery-ui-touch-punch",
23+
"jquery-ui-touch-punch-improved": "0.3.1"
2324
},
2425
"resolutions": {
2526
"ember": "2.2.0"

config/environment.js

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
1-
'use strict';
1+
/* jshint node: true */
22

3-
module.exports = function(/* environment, appConfig */) {
4-
return {};
3+
module.exports = function(environment) {
4+
var ENV = {
5+
modulePrefix: 'ember-cli-admin-auth',
6+
environment: environment,
7+
baseURL: '/',
8+
locationType: 'auto',
9+
EmberENV: {
10+
appName: 'dummy',
11+
titleLinksTo: 'http://ember-admin.com',
12+
FEATURES: {
13+
// Here you can enable experimental features on an ember canary build
14+
// e.g. 'with-controller': true
15+
}
16+
},
17+
18+
APP: {
19+
// Here you can pass flags/options to your application instance
20+
// when it is created
21+
},
22+
contentSecurityPolicy: {
23+
'script-src': "'self' 'unsafe-inline' 'unsafe-eval' use.typekit.net connect.facebook.net *.googleapis.com " +
24+
"*.gstatic.com *.yandex.ru",
25+
'style-src': "'self' 'unsafe-inline' use.typekit.net *.googleapis.com",
26+
'img-src': "*",
27+
'font-src': '*',
28+
'connect-src': '*'
29+
}
30+
};
31+
ENV['ember-simple-auth'] = {
32+
store: 'session-store:local-storage'
33+
};
34+
ENV['ember-simple-auth'].crossOriginWhitelist = ['*'];
35+
36+
if (environment === 'development') {
37+
// ENV.APP.LOG_RESOLVER = true;
38+
// ENV.APP.LOG_ACTIVE_GENERATION = true;
39+
// ENV.APP.LOG_TRANSITIONS = true;
40+
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
41+
// ENV.APP.LOG_VIEW_LOOKUPS = true;
42+
}
43+
44+
if (environment === 'test') {
45+
// Testem prefers this...
46+
ENV.baseURL = '/';
47+
ENV.locationType = 'none';
48+
49+
// keep test console output quieter
50+
ENV.APP.LOG_ACTIVE_GENERATION = false;
51+
ENV.APP.LOG_VIEW_LOOKUPS = false;
52+
53+
ENV.APP.rootElement = '#ember-testing';
54+
}
55+
56+
if (environment === 'production') {
57+
}
58+
59+
return ENV;
560
};
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
import DS from 'ember-data';
2-
var adapter;
1+
import ENV from '../config/environment';
2+
import ActiveModelAdapter from 'active-model-adapter';
3+
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
34

4-
adapter = DS.ActiveModelAdapter.extend({
5-
namespace: 'api'
6-
});
7-
8-
export default adapter;
5+
export default ActiveModelAdapter.extend(DataAdapterMixin, {
6+
namespace: 'api',
7+
authorizer: 'authorizer:devise',
8+
host: ENV.adapterUrl,
9+
shouldBackgroundReloadAll() {
10+
return false;
11+
}
12+
});

tests/dummy/app/app.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ import AdminResolver from 'ember-cli-admin/admin-resolver';
33
import loadInitializers from 'ember/load-initializers';
44
import config from './config/environment';
55

6+
var App;
7+
68
Ember.MODEL_FACTORY_INJECTIONS = true;
79

8-
var App = Ember.Application.extend({
10+
App = Ember.Application.extend({
911
modulePrefix: config.modulePrefix,
1012
podModulePrefix: config.podModulePrefix,
1113
Resolver: AdminResolver
1214
});
1315

1416
loadInitializers(App, config.modulePrefix);
1517

16-
export default App;
18+
export default App;

tests/dummy/app/initializers/init-shared.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/dummy/app/initializers/navigation.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/dummy/app/initializers/user-in-route.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/dummy/app/navigation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function() {
2+
this.navigate("Dashboard", { route: "dashboard" });
3+
this.navigate("Users", { route: "users" });
4+
}

tests/dummy/app/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ var Router = Ember.Router.extend({
88

99
Router.map(function() {
1010
this.route('login');
11-
this.route("dashboard", {path: "/"});
1211
});
1312

1413
MetaRoute.map(Router, function() {
14+
this.route("dashboard", {path: "/"});
1515
this.resources("users");
1616
});
1717

18-
export default Router;
18+
export default Router;

tests/dummy/app/routes/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Ember from 'ember';
2-
import authMixin from 'simple-auth/mixins/application-route-mixin';
2+
import authMixin from 'ember-simple-auth/mixins/application-route-mixin';
33

44
export default Ember.Route.extend(authMixin, {
55
redirect: function(){

0 commit comments

Comments
 (0)