main
1/* jshint node: true */
2
3module.exports = function(environment) {
4 var ENV = {
5 modulePrefix: 'cakery',
6 environment: environment,
7 baseURL: '/',
8 locationType: 'auto',
9 EmberENV: {
10 FEATURES: {
11 // Here you can enable experimental features on an ember canary build
12 // e.g. 'with-controller': true
13 }
14 },
15
16 APP: {
17 // Here you can pass flags/options to your application instance
18 // when it is created
19 }
20 };
21
22 if (environment === 'development') {
23 // ENV.APP.LOG_RESOLVER = true;
24 ENV.APP.LOG_ACTIVE_GENERATION = true;
25 // ENV.APP.LOG_TRANSITIONS = true;
26 // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
27 ENV.APP.LOG_VIEW_LOOKUPS = true;
28 ENV.contentSecurityPolicy = {
29 'connect-src': "'self' " + process.env.API_URL,
30 'img-src': "'self' " + process.env.ASSET_HOST,
31 };
32 }
33
34 if (environment === 'test') {
35 // Testem prefers this...
36 ENV.baseURL = '/';
37 ENV.locationType = 'auto';
38
39 // keep test console output quieter
40 ENV.APP.LOG_ACTIVE_GENERATION = false;
41 ENV.APP.LOG_VIEW_LOOKUPS = false;
42
43 ENV.APP.rootElement = '#ember-testing';
44 }
45
46 if (environment === 'production') {
47 ENV.contentSecurityPolicy = {
48 'connect-src': "'self' " + process.env.API_URL,
49 'img-src': "'self' " + process.env.ASSET_HOST,
50 };
51 }
52
53 return ENV;
54};