author | ymh <ymh.work@gmail.com> |
Wed, 24 Aug 2016 09:46:03 +0200 | |
changeset 263 | 3deace9204de |
parent 137 | 1baa7c6bd370 |
child 456 | 3a32d2f57429 |
permissions | -rw-r--r-- |
4 | 1 |
/* jshint node: true */ |
2 |
||
3 |
module.exports = function(environment) { |
|
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
4 |
var rootURL = '/'; |
4 | 5 |
var ENV = { |
6 |
modulePrefix: 'bo-client', |
|
28 | 7 |
podModulePrefix: 'bo-client/pods', |
4 | 8 |
environment: environment, |
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
9 |
rootURL: rootURL, |
4 | 10 |
locationType: 'auto', |
28 | 11 |
i18n : { |
12 |
defaultLocale: 'fr' |
|
13 |
}, |
|
4 | 14 |
EmberENV: { |
15 |
FEATURES: { |
|
16 |
// Here you can enable experimental features on an ember canary build |
|
17 |
// e.g. 'with-controller': true |
|
18 |
} |
|
19 |
}, |
|
20 |
||
21 |
APP: { |
|
22 |
// Here you can pass flags/options to your application instance |
|
23 |
// when it is created |
|
28 | 24 |
'bo-doc-viaf-autocomplete' : { |
25 |
viafQueryUrl: "http://viaf.org/viaf/AutoSuggest?query=", |
|
26 |
viafBaseUrl: "http://viaf.org/viaf/", |
|
135 | 27 |
}, |
28 |
'bo-doc-bnf-autocomplete' : { |
|
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
29 |
bnfQueryUrl: rootURL + "proxy/bnf/?term=", |
135 | 30 |
bnfBaseUrl: "http://data.bnf.fr/", |
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
31 |
bnfSparqlUrl: rootURL + "proxy/bnf-sparql" |
28 | 32 |
} |
33 |
}, |
|
4 | 34 |
}; |
35 |
||
36 |
if (environment === 'development') { |
|
20 | 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; |
|
28 | 42 |
ENV.contentSecurityPolicy = { |
43 |
'default-src': "'none'", |
|
44 |
'script-src': "'self'", |
|
45 |
'font-src': "'self'", |
|
46 |
'connect-src': "'self' *", |
|
47 |
'img-src': "'self'", |
|
48 |
'style-src': "'self' *", |
|
49 |
'media-src': "'self'" |
|
50 |
}; |
|
4 | 51 |
} |
52 |
||
53 |
if (environment === 'test') { |
|
54 |
// Testem prefers this... |
|
263
3deace9204de
pass bo_client to ember 2.8, adjust for the hack around the aupac-typeahead bug in 2.8 (c.f. https://github.com/aupac/ember-aupac-typeahead/issues/23)
ymh <ymh.work@gmail.com>
parents:
137
diff
changeset
|
55 |
ENV.rootURL = '/'; |
4 | 56 |
ENV.locationType = 'none'; |
57 |
||
58 |
// keep test console output quieter |
|
59 |
ENV.APP.LOG_ACTIVE_GENERATION = false; |
|
60 |
ENV.APP.LOG_VIEW_LOOKUPS = false; |
|
61 |
||
62 |
ENV.APP.rootElement = '#ember-testing'; |
|
63 |
} |
|
64 |
||
65 |
if (environment === 'production') { |
|
20 | 66 |
ENV.locationType = 'hash'; |
4 | 67 |
} |
68 |
||
69 |
return ENV; |
|
70 |
}; |