diff --git a/.ember-cli b/.ember-cli index e0e1c5ce1..ee64cfed2 100644 --- a/.ember-cli +++ b/.ember-cli @@ -5,6 +5,5 @@ Setting `disableAnalytics` to true will prevent any data from being sent. */ - "disableAnalytics": false, - "pod": true + "disableAnalytics": false } diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6ed3b9ed7..6dc8d3a9b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -14,7 +14,7 @@ _(In Progress)_ We plan to use the [ember-i18n](https://github.com/jamesarosen/e ### Components -We will use "pod" style structure for all of the components in this addon. As long as you use the ember-cli to generate the component scaffolds (`ember g component my-component`) , this should happend by default. Basically components should be structured like: +We will use "pod" style structure for all of the components in this addon. This means when generating component scaffolds with ember-cli you must pass the --pod flag: `ember g component my-component --pod`. Basically components should be structured like: - addon/components// - component.js diff --git a/addon/adapters/node.js b/addon/adapters/node.js index 6e925e874..de4904b86 100644 --- a/addon/adapters/node.js +++ b/addon/adapters/node.js @@ -1,8 +1,14 @@ import ApplicationAdapter from './application'; export default ApplicationAdapter.extend({ - buildURL() { + buildURL(_, __, ___, requestType) { // Embed contributors - return `${this._super(...arguments)}?embed=contributors`; + var base = this._super(...arguments); + if (requestType === 'GET') { + return `${base}?embed=contributors`; + } + else { + return base; + } } }); diff --git a/addon/mixins/osf-login-route.js b/addon/mixins/osf-login-route.js index ba1d3bc12..6fed1cd3f 100644 --- a/addon/mixins/osf-login-route.js +++ b/addon/mixins/osf-login-route.js @@ -7,7 +7,7 @@ export default Ember.Mixin.create(UnauthenticatedRouteMixin, { session: Ember.inject.service(), beforeModel() { var accessToken; - if (config.OSF.local) { + if (config.OSF.isLocal) { accessToken = config.OSF.accessToken; } else { // Acquire an OSF access token, then exchange it for a Jam token diff --git a/app/locales/en-us/config.js b/app/locales/en-us/config.js new file mode 100644 index 000000000..42b3d17a5 --- /dev/null +++ b/app/locales/en-us/config.js @@ -0,0 +1,16 @@ +// Ember-I18n includes configuration for common locales. Most users +// can safely delete this file. Use it if you need to override behavior +// for a locale or define behavior for a locale that Ember-I18n +// doesn't know about. +export default { + // rtl: [true|FALSE], + // + // pluralForm: function(count) { + // if (count === 0) { return 'zero'; } + // if (count === 1) { return 'one'; } + // if (count === 2) { return 'two'; } + // if (count < 5) { return 'few'; } + // if (count >= 5) { return 'many'; } + // return 'other'; + // } +}; diff --git a/app/locales/en-us/translations.js b/app/locales/en-us/translations.js new file mode 100644 index 000000000..331fb469a --- /dev/null +++ b/app/locales/en-us/translations.js @@ -0,0 +1,11 @@ +export default { + // "some.translation.key": "Text for some.translation.key", + // + // "a": { + // "nested": { + // "key": "Text for a.nested.key" + // } + // }, + // + // "key.with.interpolation": "Text with {{anInterpolation}}" +}; diff --git a/index.js b/index.js index eee09d54f..25e72de8e 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ module.exports = { ENV.OSF.authUrl = 'http://localhost:8080/oauth2/profile'; ENV.OSF.accessToken = SETTINGS.PERSONAL_ACCESS_TOKEN; - ENV.OSF.local = true; + ENV.OSF.isLocal = true; } if (BACKEND === 'stage') { ENV.OSF.url = 'https://staging.osf.io/'; diff --git a/tests/unit/adapters/node-test.js b/tests/unit/adapters/node-test.js index abea40157..b7a3e06b9 100644 --- a/tests/unit/adapters/node-test.js +++ b/tests/unit/adapters/node-test.js @@ -8,6 +8,6 @@ moduleFor('adapter:node', 'Unit | Adapter | node', { test('it embeds contributors', function(assert) { let adapter = this.subject(); - //let url = adapter.buildURL('nodes', null, null, 'GET', null); - assert.ok(adapter); + let url = adapter.buildURL('nodes', null, null, 'GET', null); + assert.ok(url.indexOf('embed=contributors')); });