diff --git a/.eslintrc.js b/.eslintrc.js index fb243ce11..195beffb8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,7 +14,15 @@ module.exports = { rules: { 'no-console': 'off', 'camelcase': 'off', - 'key-spacing': 'off', + 'key-spacing': [ + 'error', { + 'align': { + 'beforeColon': true, + 'afterColon': true, + 'on': 'colon' + } + } + ], 'new-cap': 'off', 'ember-suave/require-access-in-comments': 'off', }, diff --git a/app/abilities/organization.js b/app/abilities/organization.js index 87eebe8de..96d3b0f01 100644 --- a/app/abilities/organization.js +++ b/app/abilities/organization.js @@ -9,20 +9,20 @@ const { export default Ability.extend({ credentials: service(), - isAtLeastAdmin: or('membership.isAdmin', 'membership.isOwner'), - userCanJoinOrganization: empty('membership'), - userCanLeaveOrganization: or('membership.isContributor', 'membership.isAdmin'), - userIsMemberInOrganization: notEmpty('membership'), + isAtLeastAdmin : or('membership.isAdmin', 'membership.isOwner'), + userCanJoinOrganization : empty('membership'), + userCanLeaveOrganization : or('membership.isContributor', 'membership.isAdmin'), + userIsMemberInOrganization : notEmpty('membership'), isAtLeastContributor: or('membership.isContributor', 'membership.isAdmin', 'membership.isOwner'), - canJoin: alias('userCanJoinOrganization'), - canManage: alias('isAtLeastAdmin'), + canJoin : alias('userCanJoinOrganization'), + canManage : alias('isAtLeastAdmin'), - canCreateIssueTask: true, - canCreateIdeaTask: true, - canCreateTaskTask: alias('isAtLeastContributor'), + canCreateIssueTask : true, + canCreateIdeaTask : true, + canCreateTaskTask : alias('isAtLeastContributor'), - membership: alias('credentials.currentUserMembership'), - organization: alias('model') + membership : alias('credentials.currentUserMembership'), + organization : alias('model') }); diff --git a/app/abilities/task.js b/app/abilities/task.js index 53609a1db..82e583310 100644 --- a/app/abilities/task.js +++ b/app/abilities/task.js @@ -9,8 +9,8 @@ const { } = Ember; export default Ability.extend({ - credentials: service(), - currentUser: service(), + credentials : service(), + currentUser : service(), task: alias('model'), @@ -25,8 +25,8 @@ export default Ability.extend({ return taskUserId === currentUserId; }), - membership: alias('credentials.currentUserMembership'), - userIsAtLeastAdmin: or('membership.isAdmin', 'membership.isOwner'), + membership : alias('credentials.currentUserMembership'), + userIsAtLeastAdmin : or('membership.isAdmin', 'membership.isOwner'), canEdit: or('userIsAuthor', 'userIsAtLeastAdmin') }); diff --git a/app/app.js b/app/app.js index 570bcc410..ecc2594e8 100644 --- a/app/app.js +++ b/app/app.js @@ -10,8 +10,8 @@ let App; Ember.MODEL_FACTORY_INJECTIONS = true; App = Application.extend({ - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix, + modulePrefix : config.modulePrefix, + podModulePrefix : config.podModulePrefix, Resolver }); diff --git a/app/components/category-item.js b/app/components/category-item.js index e44d3cfbe..838565571 100644 --- a/app/components/category-item.js +++ b/app/components/category-item.js @@ -23,9 +23,9 @@ const { * @extends Ember.Component */ export default Component.extend({ - classNames: ['category-item'], - classNameBindings: ['selected'], - isLoading: false, + classNames : ['category-item'], + classNameBindings : ['selected'], + isLoading : false, /** * @property flashMessages @@ -117,10 +117,10 @@ export default Component.extend({ flashMessages.clearMessages(); return flashMessages.add({ message, - type: 'danger', - fixed: true, - sticky: false, - timeout: 5000 + type : 'danger', + fixed : true, + sticky : false, + timeout : 5000 }); } }); diff --git a/app/components/code-theme-selector.js b/app/components/code-theme-selector.js index f52a011c4..a635d1d0c 100644 --- a/app/components/code-theme-selector.js +++ b/app/components/code-theme-selector.js @@ -16,8 +16,8 @@ const { * @extends Ember.Component */ export default Component.extend({ - classNames: ['code-theme-selector'], - classNameBindings: ['themeClass'], + classNames : ['code-theme-selector'], + classNameBindings : ['themeClass'], /** * @property codeTheme diff --git a/app/components/comment-item.js b/app/components/comment-item.js index b8f173fc9..472248acc 100644 --- a/app/components/comment-item.js +++ b/app/components/comment-item.js @@ -22,8 +22,8 @@ const { @extends Ember.Component */ export default Component.extend({ - classNames: ['comment-item', 'timeline-comment-wrapper'], - classNameBindings: ['isEditing:editing'], + classNames : ['comment-item', 'timeline-comment-wrapper'], + classNameBindings : ['isEditing:editing'], /** @property currentUser diff --git a/app/components/create-comment-form.js b/app/components/create-comment-form.js index d235e79a5..e2b886e13 100644 --- a/app/components/create-comment-form.js +++ b/app/components/create-comment-form.js @@ -21,8 +21,8 @@ const { @extends Ember.Component */ export default Component.extend({ - classNames: ['create-comment-form'], - tagName: 'form', + classNames : ['create-comment-form'], + tagName : 'form', /** @property session diff --git a/app/components/demo-categories.js b/app/components/demo-categories.js index 5b0a21166..ae8c72a71 100644 --- a/app/components/demo-categories.js +++ b/app/components/demo-categories.js @@ -16,25 +16,25 @@ const CONCURRENCY_TIMEOUT = testing ? 0 : 1500; export default Component.extend({ categories: [ Object.create({ - description: 'You want to improve government responsiveness.', - isLoading: false, - name: 'Government', - selected: false, - slug: 'government' + description : 'You want to improve government responsiveness.', + isLoading : false, + name : 'Government', + selected : false, + slug : 'government' }), Object.create({ - description: 'You want to improve tools for advancing science.', - isLoading: false, - name: 'Science', - selected: false, - slug: 'science' + description : 'You want to improve tools for advancing science.', + isLoading : false, + name : 'Science', + selected : false, + slug : 'science' }), Object.create({ - description: 'You want to improve software tools and infrastructure.', - isLoading: false, - name: 'Technology', - selected: false, - slug: 'technology' + description : 'You want to improve software tools and infrastructure.', + isLoading : false, + name : 'Technology', + selected : false, + slug : 'technology' }) ], classNames: ['demo-categories'], diff --git a/app/components/demo-projects.js b/app/components/demo-projects.js index fa894f079..255d166bb 100644 --- a/app/components/demo-projects.js +++ b/app/components/demo-projects.js @@ -6,98 +6,98 @@ const { } = Ember; export default Component.extend({ - classNames: ['demo-projects'], - projects: [ + classNames : ['demo-projects'], + projects : [ Object.create({ - title: 'Code Corps', - description: 'Building a better future together. Contribute to public software for social good.', - iconLargeUrl: 'https://d3pgew4wbk2vb1.cloudfront.net/images/cc-demo.png', - organizationName: 'Code Corps', - categories: [ - { - name: 'Society', - selected: false, - slug: 'society' + title : 'Code Corps', + description : 'Building a better future together. Contribute to public software for social good.', + iconLargeUrl : 'https://d3pgew4wbk2vb1.cloudfront.net/images/cc-demo.png', + organizationName : 'Code Corps', + categories : [ + { + name : 'Society', + selected : false, + slug : 'society' }, { - name: 'Technology', - selected: true, - slug: 'technology' + name : 'Technology', + selected : true, + slug : 'technology' } ], skills: [ { - title: 'Ember.js', - matched: true + title : 'Ember.js', + matched : true }, { - title: 'HTML', - matched: true + title : 'HTML', + matched : true }, { - title: 'Rails', - matched: true + title : 'Rails', + matched : true }, { - title: 'Ruby', - matched: true + title : 'Ruby', + matched : true }, { - title: 'Copywriting', - matched: false + title : 'Copywriting', + matched : false }, { - title: 'CSS', - matched: false + title : 'CSS', + matched : false } ] }), Object.create({ - title: 'Movement', - description: 'We help people elect their representatives and then hold them accountable.', - iconLargeUrl: 'https://d3pgew4wbk2vb1.cloudfront.net/images/movement-demo.png', - organizationName: 'Movement', - categories: [ - { - name: 'Government', - selected: true, - slug: 'government' + title : 'Movement', + description : 'We help people elect their representatives and then hold them accountable.', + iconLargeUrl : 'https://d3pgew4wbk2vb1.cloudfront.net/images/movement-demo.png', + organizationName : 'Movement', + categories : [ + { + name : 'Government', + selected : true, + slug : 'government' }, { - name: 'Politics', - selected: false, - slug: 'politics' + name : 'Politics', + selected : false, + slug : 'politics' }, { - name: 'Society', - selected: false, - slug: 'society' + name : 'Society', + selected : false, + slug : 'society' } ], skills: [ { - title: 'Rails', - matched: true + title : 'Rails', + matched : true }, { - title: 'Ruby', - matched: true + title : 'Ruby', + matched : true }, { - title: 'Amazon S3', - matched: false + title : 'Amazon S3', + matched : false }, { - title: 'iOS', - matched: false + title : 'iOS', + matched : false }, { - title: 'PostgreSQL', - matched: false + title : 'PostgreSQL', + matched : false }, { - title: 'Swift', - matched: false + title : 'Swift', + matched : false } ] }) diff --git a/app/components/demo-skills.js b/app/components/demo-skills.js index b6787d6f2..18dd4d5ca 100644 --- a/app/components/demo-skills.js +++ b/app/components/demo-skills.js @@ -11,44 +11,44 @@ const { export default Component.extend({ skills: [ Object.create({ - isLoading: false, - title: 'BASIC' + isLoading : false, + title : 'BASIC' }), Object.create({ - isLoading: false, - title: 'Copywriting' + isLoading : false, + title : 'Copywriting' }), Object.create({ - isLoading: false, - title: 'Ember.js' + isLoading : false, + title : 'Ember.js' }), Object.create({ - isLoading: false, - title: 'HTML' + isLoading : false, + title : 'HTML' }), Object.create({ - isLoading: false, - title: 'Python' + isLoading : false, + title : 'Python' }), Object.create({ - isLoading: false, - title: 'Rails' + isLoading : false, + title : 'Rails' }), Object.create({ - isLoading: false, - title: 'Ruby' + isLoading : false, + title : 'Ruby' }), Object.create({ - isLoading: false, - title: 'SEO' + isLoading : false, + title : 'SEO' }), Object.create({ - isLoading: false, - title: 'Sketch' + isLoading : false, + title : 'Sketch' }), Object.create({ - isLoading: false, - title: 'UX Design' + isLoading : false, + title : 'UX Design' }) ], classNames: ['demo-skills'], diff --git a/app/components/demo-tasks.js b/app/components/demo-tasks.js index 7370ec210..85e5f25fb 100644 --- a/app/components/demo-tasks.js +++ b/app/components/demo-tasks.js @@ -7,75 +7,75 @@ const { } = Ember; export default Component.extend({ - classNames: ['demo-tasks'], - tasks: [ + classNames : ['demo-tasks'], + tasks : [ Object.create({ - insertedAt: moment().subtract(2, 'days'), - number: 27, - taskType: 'task', - title: 'Improve the user experience of the landing page', - user: { + insertedAt : moment().subtract(2, 'days'), + number : 27, + taskType : 'task', + title : 'Improve the user experience of the landing page', + user : { username: 'joshsmith' }, skills: [ { - title: 'Rails', - matched: true + title : 'Rails', + matched : true }, { - title: 'Ruby', - matched: true + title : 'Ruby', + matched : true }, { - title: 'Amazon S3', - matched: false + title : 'Amazon S3', + matched : false }, { - title: 'iOS', - matched: false + title : 'iOS', + matched : false }, { - title: 'PostgreSQL', - matched: false + title : 'PostgreSQL', + matched : false }, { - title: 'Swift', - matched: false + title : 'Swift', + matched : false } ] }), Object.create({ - insertedAt: moment().subtract(3, 'days'), - number: 26, - taskType: 'issue', - title: "When signing up, there doesn't seem to be a GitHub option", - user: { + insertedAt : moment().subtract(3, 'days'), + number : 26, + taskType : 'issue', + title : "When signing up, there doesn't seem to be a GitHub option", + user : { username: 'githubber' }, skills: [ { - title: 'Rails', - matched: true + title : 'Rails', + matched : true }, { - title: 'Ruby', - matched: true + title : 'Ruby', + matched : true }, { - title: 'Amazon S3', - matched: false + title : 'Amazon S3', + matched : false }, { - title: 'iOS', - matched: false + title : 'iOS', + matched : false }, { - title: 'PostgreSQL', - matched: false + title : 'PostgreSQL', + matched : false }, { - title: 'Swift', - matched: false + title : 'Swift', + matched : false } ] }) diff --git a/app/components/donation/credit-card.js b/app/components/donation/credit-card.js index 8ac896308..715ed2c67 100644 --- a/app/components/donation/credit-card.js +++ b/app/components/donation/credit-card.js @@ -6,7 +6,7 @@ const { } = Ember; export default Component.extend({ - classNames: ['credit-card-form'], - canDonate: true, - cannotDonate: not('canDonate') + classNames : ['credit-card-form'], + canDonate : true, + cannotDonate : not('canDonate') }); diff --git a/app/components/donation/donation-container.js b/app/components/donation/donation-container.js index e6f63bfaf..9a3f87362 100644 --- a/app/components/donation/donation-container.js +++ b/app/components/donation/donation-container.js @@ -6,9 +6,9 @@ const { } = Ember; export default Component.extend({ - classNames: ['donation-container'], - donationAmount: 0, - projectTitle: null, + classNames : ['donation-container'], + donationAmount : 0, + projectTitle : null, canDonate: bool('projectTitle') }); diff --git a/app/components/editor-with-preview.js b/app/components/editor-with-preview.js index 2ff6e86eb..347a949f0 100644 --- a/app/components/editor-with-preview.js +++ b/app/components/editor-with-preview.js @@ -33,9 +33,9 @@ const { @extends Ember.Component */ export default Component.extend({ - attributeBindings: ['style'], - classNames: ['editor-with-preview'], - classNameBindings: ['mode'], + attributeBindings : ['style'], + classNames : ['editor-with-preview'], + classNameBindings : ['mode'], /** The mode that the editor is in. (example: 'preview', 'editing') diff --git a/app/components/image-drop.js b/app/components/image-drop.js index 87aff92ad..7b2767938 100644 --- a/app/components/image-drop.js +++ b/app/components/image-drop.js @@ -11,25 +11,25 @@ const { } = Ember; export default Component.extend({ - active: false, - attributeBindings: ['style'], - classNames: ['image-drop'], - classNameBindings: [ + active : false, + attributeBindings : ['style'], + classNames : ['image-drop'], + classNameBindings : [ 'active', 'circle:is-circular', 'isDraggingOnApp:is-dragging', 'hasImage' ], - droppedImage: null, - helpText: 'Drop your image here.', - originalImage: null, + droppedImage : null, + helpText : 'Drop your image here.', + originalImage : null, appDragState: service('dragState'), - hasDroppedImage: notEmpty('droppedImage'), - hasImage: or('hasDroppedImage', 'hasOriginalImage'), - hasOriginalImage: notEmpty('originalImage'), - isDraggingOnApp: alias('appDragState.isDragging'), + hasDroppedImage : notEmpty('droppedImage'), + hasImage : or('hasDroppedImage', 'hasOriginalImage'), + hasOriginalImage : notEmpty('originalImage'), + isDraggingOnApp : alias('appDragState.isDragging'), style: computed('droppedImage', 'originalImage', function() { let backgroundStyle = ''; diff --git a/app/components/landing-subsection.js b/app/components/landing-subsection.js index 427ad0a44..1ce7d2d58 100644 --- a/app/components/landing-subsection.js +++ b/app/components/landing-subsection.js @@ -8,9 +8,9 @@ const { } = Ember; export default Component.extend(CanAnimateMixin, { - attributeBindings: ['style'], - classNames: ['landing-subsection'], - classNameBindings: ['animated:animated'], + attributeBindings : ['style'], + classNames : ['landing-subsection'], + classNameBindings : ['animated:animated'], animated: computed('canAnimate', function() { let canAnimate = this.get('canAnimate'); diff --git a/app/components/member-list-item.js b/app/components/member-list-item.js index 72350aa43..b213bd993 100644 --- a/app/components/member-list-item.js +++ b/app/components/member-list-item.js @@ -7,8 +7,8 @@ const { } = Ember; export default Component.extend({ - classNames: ['member-list-item'], - tagName: 'li', + classNames : ['member-list-item'], + tagName : 'li', flashMessages: service(), @@ -34,10 +34,10 @@ export default Component.extend({ flashMessages.clearMessages(); return flashMessages.add({ message, - type: 'success', - fixed: true, - sticky: false, - timeout: 5000 + type : 'success', + fixed : true, + sticky : false, + timeout : 5000 }); } }); diff --git a/app/components/organization-header.js b/app/components/organization-header.js index 3f787eb2a..60d352285 100644 --- a/app/components/organization-header.js +++ b/app/components/organization-header.js @@ -6,9 +6,9 @@ const { } = Ember; export default Component.extend({ - classNames: ['organization-header'], - classNameBindings: ['expanded'], - expanded: false, + classNames : ['organization-header'], + classNameBindings : ['expanded'], + expanded : false, credentials: service() }); diff --git a/app/components/organization-settings-menu.js b/app/components/organization-settings-menu.js index 15aff244c..3f5f0a758 100644 --- a/app/components/organization-settings-menu.js +++ b/app/components/organization-settings-menu.js @@ -8,6 +8,6 @@ const { export default Component.extend({ classNames: ['organization-settings-menu', 'settings-menu'], - credentials: service(), - session: service() + credentials : service(), + session : service() }); diff --git a/app/components/pager-control.js b/app/components/pager-control.js index cb4f32d1b..6024b6f50 100644 --- a/app/components/pager-control.js +++ b/app/components/pager-control.js @@ -116,8 +116,8 @@ export default Component.extend({ if (totalPages < pagesToShow) { return { - lower: 1, - upper: totalPages + lower : 1, + upper : totalPages }; } else { let centerPage = this.get('centerPage'); @@ -125,8 +125,8 @@ export default Component.extend({ let pagesToShowIsEven = pagesToShow % 2 === 0; return { - lower: centerPage - range, - upper: centerPage + (pagesToShowIsEven ? range - 1 : range) + lower : centerPage - range, + upper : centerPage + (pagesToShowIsEven ? range - 1 : range) }; } }), diff --git a/app/components/progress-bar.js b/app/components/progress-bar.js index da7bc60b3..6c029ad2a 100644 --- a/app/components/progress-bar.js +++ b/app/components/progress-bar.js @@ -21,8 +21,8 @@ const { @extends Ember.Component */ export default Component.extend({ - attributeBindings: ['style'], - classNames: ['progress-bar'], + attributeBindings : ['style'], + classNames : ['progress-bar'], /** The `style` property consumes the current percentage to generate the style diff --git a/app/components/project-card-members.js b/app/components/project-card-members.js index 074bdf98a..e8c6696ce 100644 --- a/app/components/project-card-members.js +++ b/app/components/project-card-members.js @@ -24,8 +24,8 @@ const VISIBLE_MEMBERS_COUNT = 8; */ export default Component.extend({ - classNames: ['project-card-members'], - tagName: 'ul', + classNames : ['project-card-members'], + tagName : 'ul', /** The number of members visible on the project card. diff --git a/app/components/project-card.js b/app/components/project-card.js index e0d765e2d..2e30310c1 100644 --- a/app/components/project-card.js +++ b/app/components/project-card.js @@ -22,7 +22,7 @@ const { export default Component.extend({ classNames: ['project-card'], - projectCategories: mapBy('project.projectCategories', 'category'), - projectOrganizationMembers: mapBy('project.organization.organizationMemberships', 'member'), - projectSkills: mapBy('project.projectSkills', 'skill') + projectCategories : mapBy('project.projectCategories', 'category'), + projectOrganizationMembers : mapBy('project.organization.organizationMemberships', 'member'), + projectSkills : mapBy('project.projectSkills', 'skill') }); diff --git a/app/components/project-categories-list.js b/app/components/project-categories-list.js index 3c4b7abeb..25691445e 100644 --- a/app/components/project-categories-list.js +++ b/app/components/project-categories-list.js @@ -21,9 +21,9 @@ const { */ export default Component.extend({ - classNames: ['categories'], - sortByName: ['name'], - tagName: 'ul', + classNames : ['categories'], + sortByName : ['name'], + tagName : 'ul', /** Returns the categories sorted by name. diff --git a/app/components/project-details.js b/app/components/project-details.js index 2f1d80068..d87d37a0f 100644 --- a/app/components/project-details.js +++ b/app/components/project-details.js @@ -19,9 +19,9 @@ const { */ export default Component.extend({ - classNames: ['project-details'], - classNameBindings: ['expanded'], - expanded: false, + classNames : ['project-details'], + classNameBindings : ['expanded'], + expanded : false, /** @property store @@ -58,9 +58,9 @@ export default Component.extend({ this.get('project.organization').then((organization) => { let membership = this.get('store').createRecord('organization-membership', { - member: currentUser, + member : currentUser, organization, - role: 'pending' + role : 'pending' }); return membership.save(); diff --git a/app/components/project-menu.js b/app/components/project-menu.js index 7f33cafc9..12013bc20 100644 --- a/app/components/project-menu.js +++ b/app/components/project-menu.js @@ -20,8 +20,8 @@ const { @class project-menu */ export default Component.extend({ - classNames: ['project-menu', 'horizontal-menu'], - tagName: 'ul', + classNames : ['project-menu', 'horizontal-menu'], + tagName : 'ul', /** Retreives user credentials to show more content for project managers. diff --git a/app/components/project-settings-menu.js b/app/components/project-settings-menu.js index 6e5e0ae8f..c1c92d675 100644 --- a/app/components/project-settings-menu.js +++ b/app/components/project-settings-menu.js @@ -8,6 +8,6 @@ const { export default Component.extend({ classNames: ['project-settings-menu', 'settings-menu'], - credentials: service(), - session: service() + credentials : service(), + session : service() }); diff --git a/app/components/project-task-list.js b/app/components/project-task-list.js index 8dbfa72d3..43ec82173 100644 --- a/app/components/project-task-list.js +++ b/app/components/project-task-list.js @@ -98,10 +98,10 @@ export default Component.extend({ _normalizeMeta(meta) { if (isPresent(meta)) { return { - currentPage: parseInt(meta.current_page, 10), - pageSize: parseInt(meta.page_size, 10), - totalPages: parseInt(meta.total_pages, 10), - totalRecords: parseInt(meta.total_records) + currentPage : parseInt(meta.current_page, 10), + pageSize : parseInt(meta.page_size, 10), + totalPages : parseInt(meta.total_pages, 10), + totalRecords : parseInt(meta.total_records) }; } } diff --git a/app/components/role-item.js b/app/components/role-item.js index 51d331764..fb4f963e8 100644 --- a/app/components/role-item.js +++ b/app/components/role-item.js @@ -9,12 +9,12 @@ const { } = Ember; export default Component.extend({ - classNames: ['role-item'], - classNameBindings: ['selected'], - isLoading: false, + classNames : ['role-item'], + classNameBindings : ['selected'], + isLoading : false, - flashMessages: service(), - userRoles: service(), + flashMessages : service(), + userRoles : service(), selected: notEmpty('userRole'), @@ -53,10 +53,10 @@ export default Component.extend({ flashMessages.clearMessages(); return flashMessages.add({ message, - type: 'danger', - fixed: true, - sticky: false, - timeout: 5000 + type : 'danger', + fixed : true, + sticky : false, + timeout : 5000 }); } }); diff --git a/app/components/select-dropdown.js b/app/components/select-dropdown.js index 8bdd133a9..285d8ee36 100644 --- a/app/components/select-dropdown.js +++ b/app/components/select-dropdown.js @@ -3,8 +3,8 @@ import Ember from 'ember'; const { Component } = Ember; export default Component.extend({ - classNames: ['select-dropdown'], - classNameBindings: ['selectedItem'], + classNames : ['select-dropdown'], + classNameBindings : ['selectedItem'], actions: { selectItem(item) { diff --git a/app/components/select-option.js b/app/components/select-option.js index ed2ac58e7..978bb3a17 100644 --- a/app/components/select-option.js +++ b/app/components/select-option.js @@ -6,8 +6,8 @@ const { } = Ember; export default Component.extend({ - attributeBindings: ['value', 'selected'], - tagName: 'option', + attributeBindings : ['value', 'selected'], + tagName : 'option', label: computed('optionLabelPath', 'item', function() { let label = this.get('optionLabelPath'); diff --git a/app/components/signup-email-input.js b/app/components/signup-email-input.js index e53c12f2b..0d70bb9e2 100644 --- a/app/components/signup-email-input.js +++ b/app/components/signup-email-input.js @@ -10,28 +10,28 @@ const { } = Ember; export default Component.extend({ - cachedEmail: '', - canSubmit: false, - classNames: ['input-group'], - hasCheckedOnce: false, - isAvailableOnServer: false, - isChecking: false, - isValid: false, - timer: null, + cachedEmail : '', + canSubmit : false, + classNames : ['input-group'], + hasCheckedOnce : false, + isAvailableOnServer : false, + isChecking : false, + isValid : false, + timer : null, ajax: service(), - canCheck: and('isNotEmpty', 'isNotSameEmail'), - canShowValidations: and('hasCheckedOnce', 'isNotChecking', 'isNotEmpty'), - email: alias('user.email'), - isAvailable: and('isAvailableOnServer', 'isNotEmpty'), - isEmpty: empty('email'), - isInvalid: not('isValid'), - isNotEmpty: not('isEmpty'), - isNotSameEmail: not('isSameEmail'), - isNotChecking: not('isChecking'), - isOkay: and('isAvailable', 'isValid'), - isUnavailable: not('isAvailable'), + canCheck : and('isNotEmpty', 'isNotSameEmail'), + canShowValidations : and('hasCheckedOnce', 'isNotChecking', 'isNotEmpty'), + email : alias('user.email'), + isAvailable : and('isAvailableOnServer', 'isNotEmpty'), + isEmpty : empty('email'), + isInvalid : not('isValid'), + isNotEmpty : not('isEmpty'), + isNotSameEmail : not('isSameEmail'), + isNotChecking : not('isChecking'), + isOkay : and('isAvailable', 'isValid'), + isUnavailable : not('isAvailable'), isSameEmail: computed('cachedEmail', 'email', function() { return this.get('cachedEmail') === this.get('email'); @@ -60,8 +60,8 @@ export default Component.extend({ sendRequest(email) { return this.get('ajax').request('/users/email_available', { - method: 'GET', - data: { + method : 'GET', + data : { email } }); diff --git a/app/components/signup-form.js b/app/components/signup-form.js index 337fa0e3b..fd131792f 100644 --- a/app/components/signup-form.js +++ b/app/components/signup-form.js @@ -9,17 +9,17 @@ const { } = Ember; export default Component.extend({ - classNames: ['signup-form'], - emailValid: false, - hasError: false, - usernameValid: false, + classNames : ['signup-form'], + emailValid : false, + hasError : false, + usernameValid : false, - session: service(), - store: service(), + session : service(), + store : service(), - canSubmit: and('emailValid', 'passwordValid', 'usernameValid'), - passwordLength: alias('password.length'), - passwordValid: gte('passwordLength', 6), + canSubmit : and('emailValid', 'passwordValid', 'usernameValid'), + passwordLength : alias('password.length'), + passwordValid : gte('passwordLength', 6), password: computed('user.password', function() { return this.get('user.password') || ''; @@ -69,8 +69,8 @@ export default Component.extend({ _submit() { let credentials = { - identification: this.get('user.email'), - password: this.get('user.password') + identification : this.get('user.email'), + password : this.get('user.password') }; this.get('user').save().then(() => { diff --git a/app/components/signup-password-input.js b/app/components/signup-password-input.js index 85b85b21b..a9d774f99 100644 --- a/app/components/signup-password-input.js +++ b/app/components/signup-password-input.js @@ -13,14 +13,14 @@ export default Component.extend({ ajax: service(), - canShowValidations: alias('isNotEmpty'), - isEmpty: lt('passwordLength', 1), - isInvalid: not('isValid'), - isNotEmpty: not('isEmpty'), - isOkay: alias('isValid'), - isValid: gte('passwordLength', 6), - passwordLength: alias('password.length'), - suggestions: alias('strength.feedback.suggestions'), + canShowValidations : alias('isNotEmpty'), + isEmpty : lt('passwordLength', 1), + isInvalid : not('isValid'), + isNotEmpty : not('isEmpty'), + isOkay : alias('isValid'), + isValid : gte('passwordLength', 6), + passwordLength : alias('password.length'), + suggestions : alias('strength.feedback.suggestions'), password: computed('user.password', function() { return this.get('user.password') || ''; diff --git a/app/components/signup-username-input.js b/app/components/signup-username-input.js index cc4220e5e..ca19167d1 100644 --- a/app/components/signup-username-input.js +++ b/app/components/signup-username-input.js @@ -219,8 +219,8 @@ export default Component.extend({ */ sendRequest(username) { return this.get('ajax').request('/users/username_available', { - method: 'GET', - data: { + method : 'GET', + data : { username } }); diff --git a/app/components/skill-list-item.js b/app/components/skill-list-item.js index 9f02685ae..5d272ed18 100644 --- a/app/components/skill-list-item.js +++ b/app/components/skill-list-item.js @@ -8,13 +8,13 @@ const { } = Ember; export default Component.extend({ - classNameBindings: ['matched'], - tagName: 'li', + classNameBindings : ['matched'], + tagName : 'li', - matched: notEmpty('userSkill'), - userSkills: service(), - user: alias('currentUser.user'), - usersUserSkills: alias('user.userSkills'), + matched : notEmpty('userSkill'), + userSkills : service(), + user : alias('currentUser.user'), + usersUserSkills : alias('user.userSkills'), userSkill: computed('skill', 'userSkills.userSkills.isFulfilled', function() { let skill = this.get('skill'); diff --git a/app/components/skill-list-items.js b/app/components/skill-list-items.js index e6174ff37..9a01875a3 100644 --- a/app/components/skill-list-items.js +++ b/app/components/skill-list-items.js @@ -9,17 +9,17 @@ const { } = Ember; export default Component.extend({ - classNameBindings: ['overflowHidden:overflow-hidden'], - classNames: ['skills'], - tagName: 'ul', - sortByTitle: ['title:asc'], + classNameBindings : ['overflowHidden:overflow-hidden'], + classNames : ['skills'], + tagName : 'ul', + sortByTitle : ['title:asc'], userSkillsService: service('user-skills'), - alphaSkills: sort('skills', 'sortByTitle'), - skillsNotInCommon: setDiff('skillsToFilter', 'skillsInCommon'), - sortedSkills: union('skillsInCommon', 'skillsNotInCommon'), - userSkills: alias('userSkillsService.userSkills'), + alphaSkills : sort('skills', 'sortByTitle'), + skillsNotInCommon : setDiff('skillsToFilter', 'skillsInCommon'), + sortedSkills : union('skillsInCommon', 'skillsNotInCommon'), + userSkills : alias('userSkillsService.userSkills'), skillsInCommon: filter('skillsToFilter', function(skill) { let userSkillsService = get(this, 'userSkillsService'); diff --git a/app/components/task-filter-dropdown.js b/app/components/task-filter-dropdown.js index da56a84a3..67737c4b5 100644 --- a/app/components/task-filter-dropdown.js +++ b/app/components/task-filter-dropdown.js @@ -18,8 +18,8 @@ const { Component } = Ember; @extends Ember.Component */ export default Component.extend({ - classNames: ['dropdown-menu'], - tagName: 'ul', + classNames : ['dropdown-menu'], + tagName : 'ul', /** Sends the `hide` action when a filter is clicked. diff --git a/app/components/task-filter-type.js b/app/components/task-filter-type.js index 58c9aafc7..f47260153 100644 --- a/app/components/task-filter-type.js +++ b/app/components/task-filter-type.js @@ -17,8 +17,8 @@ const { Component } = Ember; @extends Ember.Component */ export default Component.extend({ - classNames: ['button-group', 'dropdown'], - classNameBindings: ['active:menu-visible:menu-hidden'], + classNames : ['button-group', 'dropdown'], + classNameBindings : ['active:menu-visible:menu-hidden'], /** Boolean that reflects whether or not the filter dropdown should be shown diff --git a/app/components/task-header.js b/app/components/task-header.js index 7d80f4fec..d4d2490e6 100644 --- a/app/components/task-header.js +++ b/app/components/task-header.js @@ -17,6 +17,6 @@ const { Component } = Ember; @extends Ember.Component */ export default Component.extend({ - classNames: ['task-header'], - classNameBindings: ['task.taskType'] + classNames : ['task-header'], + classNameBindings : ['task.taskType'] }); diff --git a/app/components/task-item.js b/app/components/task-item.js index 7f053a0c1..5c3052021 100644 --- a/app/components/task-item.js +++ b/app/components/task-item.js @@ -16,6 +16,6 @@ const { Component } = Ember; @extends Ember.Component */ export default Component.extend({ - classNames: ['task-item'], - classNameBindings: ['task.taskType'] + classNames : ['task-item'], + classNameBindings : ['task.taskType'] }); diff --git a/app/components/task-new-form.js b/app/components/task-new-form.js index 44cb66094..6fcaf17c1 100644 --- a/app/components/task-new-form.js +++ b/app/components/task-new-form.js @@ -21,9 +21,9 @@ const { @extends Ember.Component */ export default Component.extend({ - classNames: ['task-new-form'], - classNameBindings: ['task.taskType'], - tagName: 'form', + classNames : ['task-new-form'], + classNameBindings : ['task.taskType'], + tagName : 'form', /** @property credentials @@ -38,9 +38,9 @@ export default Component.extend({ @type Object */ placeholders: { - task: 'How can you describe the steps to complete the task so anyone can work on it?', - issue: "What issue needs resolved? If it's a bug, how can anyone reproduce it?", - idea: "What's your idea? Be specific so people can give more accurate feedback." + task : 'How can you describe the steps to complete the task so anyone can work on it?', + issue : "What issue needs resolved? If it's a bug, how can anyone reproduce it?", + idea : "What's your idea? Be specific so people can give more accurate feedback." }, /** diff --git a/app/components/task-status-button.js b/app/components/task-status-button.js index 0aebb9dbc..6f2381bc4 100644 --- a/app/components/task-status-button.js +++ b/app/components/task-status-button.js @@ -14,8 +14,8 @@ const { @extends Ember.Component */ export default Component.extend({ - classNames: ['task-status-button'], - tagName: 'span', + classNames : ['task-status-button'], + tagName : 'span', /** Computed property that checks if the task is open. diff --git a/app/components/task-title.js b/app/components/task-title.js index 5f9960608..8450807ae 100644 --- a/app/components/task-title.js +++ b/app/components/task-title.js @@ -12,8 +12,8 @@ const { @extends Ember.Component */ export default Component.extend({ - classNames: ['task-title'], - classNameBindings: ['isEditing:editing'], + classNames : ['task-title'], + classNameBindings : ['isEditing:editing'], /** @property currentUser diff --git a/app/components/user-menu.js b/app/components/user-menu.js index a3092d2c6..cf473cb76 100644 --- a/app/components/user-menu.js +++ b/app/components/user-menu.js @@ -17,9 +17,9 @@ const { Component } = Ember; @public */ export default Component.extend({ - classNames: ['user-menu', 'dropdown'], - classNameBindings: ['hidden:menu-hidden:menu-visible'], - hidden: true, + classNames : ['user-menu', 'dropdown'], + classNameBindings : ['hidden:menu-hidden:menu-visible'], + hidden : true, actions: { /** diff --git a/app/components/user-skills-input-item.js b/app/components/user-skills-input-item.js index e4c1e8b33..75d7acddb 100644 --- a/app/components/user-skills-input-item.js +++ b/app/components/user-skills-input-item.js @@ -8,14 +8,14 @@ const { } = Ember; export default Component.extend({ - classNameBindings: ['hasSkill', 'selected:selected'], - classNames: ['skill-dropdown-item'], - tagName: ['li'], + classNameBindings : ['hasSkill', 'selected:selected'], + classNames : ['skill-dropdown-item'], + tagName : ['li'], userSkills: service(), - hasSkill: notEmpty('userSkill'), - selected: alias('skill.selected'), + hasSkill : notEmpty('userSkill'), + selected : alias('skill.selected'), userSkill: computed('skill', 'userSkills.userSkills', function() { let skill = this.get('skill'); diff --git a/app/components/user-skills-input.js b/app/components/user-skills-input.js index 2fe729665..e8ac619a6 100644 --- a/app/components/user-skills-input.js +++ b/app/components/user-skills-input.js @@ -11,22 +11,22 @@ const { } = Ember; export default Component.extend({ - classNames: ['user-skills-input'], - cursorAt: 0, - cursorWas: 0, - hidden: true, - lastQuery: null, - limit: 5, - results: [], - - store: service(), - userSkills: service(), - - canShow: and('hasResults', 'notHidden'), - hasResults: notEmpty('results'), - notHidden: not('hidden'), - numberOfResults: alias('results.length'), - queryString: alias('query'), + classNames : ['user-skills-input'], + cursorAt : 0, + cursorWas : 0, + hidden : true, + lastQuery : null, + limit : 5, + results : [], + + store : service(), + userSkills : service(), + + canShow : and('hasResults', 'notHidden'), + hasResults : notEmpty('results'), + notHidden : not('hidden'), + numberOfResults : alias('results.length'), + queryString : alias('query'), queryStringChanged: observer('queryString', function() { once(this, '_search'); @@ -60,13 +60,13 @@ export default Component.extend({ } }, - _isCommaKey: equal('keyCode', 188), - _isDownKey: equal('keyCode', 40), - _isEnterKey: equal('keyCode', 13), - _isEscKey: equal('keyCode', 27), - _isUpKey: equal('keyCode', 38), - _isNewQuery: not('_sameQuery'), - _sameQuery: computed('queryString', 'lastQuery', function() { + _isCommaKey : equal('keyCode', 188), + _isDownKey : equal('keyCode', 40), + _isEnterKey : equal('keyCode', 13), + _isEscKey : equal('keyCode', 27), + _isUpKey : equal('keyCode', 38), + _isNewQuery : not('_sameQuery'), + _sameQuery : computed('queryString', 'lastQuery', function() { return this.get('queryString') === this.get('lastQuery'); }), diff --git a/app/controllers/application.js b/app/controllers/application.js index 360b68701..85deb14c0 100644 --- a/app/controllers/application.js +++ b/app/controllers/application.js @@ -7,9 +7,9 @@ const { } = Ember; export default Controller.extend({ - codeTheme: service(), - onboarding: service(), - session: service(), + codeTheme : service(), + onboarding : service(), + session : service(), isOnboarding: computed.alias('onboarding.isOnboarding'), diff --git a/app/controllers/oauth-stripe.js b/app/controllers/oauth-stripe.js index 82966fb4b..041bd6525 100644 --- a/app/controllers/oauth-stripe.js +++ b/app/controllers/oauth-stripe.js @@ -5,7 +5,7 @@ const { } = Ember; export default Controller.extend({ - queryParams: ['code', 'state'], - code: null, - state: null + queryParams : ['code', 'state'], + code : null, + state : null }); diff --git a/app/controllers/project/donate.js b/app/controllers/project/donate.js index 125d3666c..83cacd7a2 100644 --- a/app/controllers/project/donate.js +++ b/app/controllers/project/donate.js @@ -3,6 +3,6 @@ import Ember from 'ember'; const { Controller } = Ember; export default Controller.extend({ - queryParams: ['amount'], - amount: null + queryParams : ['amount'], + amount : null }); diff --git a/app/controllers/project/tasks/index.js b/app/controllers/project/tasks/index.js index dae097ab2..6e3e9ac85 100644 --- a/app/controllers/project/tasks/index.js +++ b/app/controllers/project/tasks/index.js @@ -8,36 +8,36 @@ const { } = Ember; export default Controller.extend({ - page: 1, - taskStatus: 'open', - taskType: null, - types: [ + page : 1, + taskStatus : 'open', + taskType : null, + types : [ Object.create({ - name: 'Tasks', - param: 'task', - slug: 'tasks', - selected: false + name : 'Tasks', + param : 'task', + slug : 'tasks', + selected : false }), Object.create({ - name: 'Issues', - param: 'issue', - slug: 'issues', - selected: false + name : 'Issues', + param : 'issue', + slug : 'issues', + selected : false }), Object.create({ - name: 'Ideas', - param: 'idea', - slug: 'ideas', - selected: false + name : 'Ideas', + param : 'idea', + slug : 'ideas', + selected : false }) ], status: computed.alias('taskStatus'), - isFilteringClosedTasks: computed.equal('status', 'closed'), - isFilteringOpenTasks: computed.equal('status', 'open'), - isFilteredByType: computed.notEmpty('taskTypes'), - isFiltered: computed.or('isFilteredByType'), + isFilteringClosedTasks : computed.equal('status', 'closed'), + isFilteringOpenTasks : computed.equal('status', 'open'), + isFilteredByType : computed.notEmpty('taskTypes'), + isFiltered : computed.or('isFilteredByType'), taskTypes: computed('taskType', function() { let taskTypes; diff --git a/app/controllers/start/hello.js b/app/controllers/start/hello.js index f12c5dd39..4a1604209 100644 --- a/app/controllers/start/hello.js +++ b/app/controllers/start/hello.js @@ -7,9 +7,9 @@ const { } = Ember; export default Controller.extend(OnboardingControllerMixin, { - firstNameIsEmpty: computed.empty('model.firstName'), - lastNameIsEmpty: computed.empty('model.lastName'), - usersNameIsEmpty: computed.or('firstNameIsEmpty', 'lastNameIsEmpty'), + firstNameIsEmpty : computed.empty('model.firstName'), + lastNameIsEmpty : computed.empty('model.lastName'), + usersNameIsEmpty : computed.or('firstNameIsEmpty', 'lastNameIsEmpty'), actions: { /** diff --git a/app/controllers/start/skills.js b/app/controllers/start/skills.js index e6d5952be..5bb92e7e5 100644 --- a/app/controllers/start/skills.js +++ b/app/controllers/start/skills.js @@ -8,8 +8,8 @@ const { } = Ember; export default Controller.extend(OnboardingControllerMixin, { - currentUser: service(), - userSkills: service(), + currentUser : service(), + userSkills : service(), user: computed.alias('currentUser.user') }); diff --git a/app/helpers/highlight-substrings.js b/app/helpers/highlight-substrings.js index 1f087b2f5..1c67bc96c 100644 --- a/app/helpers/highlight-substrings.js +++ b/app/helpers/highlight-substrings.js @@ -22,8 +22,8 @@ function _findPositionsToAdd(positionsToAdd, string, substrings, newString) { let substringToMatch = substrings[e].toLowerCase(); if (stringOfSize === substringToMatch) { positionsToAdd.push({ - index: i, - stringLength: substringToMatch.length + index : i, + stringLength : substringToMatch.length }); } } diff --git a/app/mixins/can-animate.js b/app/mixins/can-animate.js index 825a8e7a0..30256e0ee 100644 --- a/app/mixins/can-animate.js +++ b/app/mixins/can-animate.js @@ -8,10 +8,10 @@ const { } = Ember; export default Mixin.create({ - scrollTimeout: 100, - boundingClientRect: 0, - windowHeight: 0, - windowWidth: 0, + scrollTimeout : 100, + boundingClientRect : 0, + windowHeight : 0, + windowWidth : 0, canAnimate: computed('boundingClientRect', 'windowHeight', function() { let rect, windowHeight; diff --git a/app/mixins/onboarding-controller.js b/app/mixins/onboarding-controller.js index 2973dc975..44329fd61 100644 --- a/app/mixins/onboarding-controller.js +++ b/app/mixins/onboarding-controller.js @@ -7,8 +7,8 @@ const { } = Ember; export default Mixin.create({ - currentUser: service(), - onboarding: service(), + currentUser : service(), + onboarding : service(), user: computed.alias('currentUser.user'), diff --git a/app/mixins/onboarding-route.js b/app/mixins/onboarding-route.js index a40efd226..02569ecf6 100644 --- a/app/mixins/onboarding-route.js +++ b/app/mixins/onboarding-route.js @@ -6,8 +6,8 @@ const { } = Ember; export default Mixin.create({ - currentUser: service(), - onboarding: service(), + currentUser : service(), + onboarding : service(), beforeModel(transition) { let isOnboarding = this.get('onboarding.isOnboarding'); diff --git a/app/models/category.js b/app/models/category.js index fc58bd90b..2223f9f4e 100644 --- a/app/models/category.js +++ b/app/models/category.js @@ -3,10 +3,10 @@ import attr from 'ember-data/attr'; import { hasMany } from 'ember-data/relationships'; export default Model.extend({ - description: attr('string'), - name: attr('string'), - slug: attr('string'), + description : attr('string'), + name : attr('string'), + slug : attr('string'), - userCategories: hasMany('user-category', { async: true }), - projectCategories: hasMany('project-category', { async: true }) + userCategories : hasMany('user-category', { async: true }), + projectCategories : hasMany('project-category', { async: true }) }); diff --git a/app/models/comment-user-mention.js b/app/models/comment-user-mention.js index 4a124797b..404bac8f0 100644 --- a/app/models/comment-user-mention.js +++ b/app/models/comment-user-mention.js @@ -3,9 +3,9 @@ import attr from 'ember-data/attr'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - indices: attr('array'), - username: attr('string'), + indices : attr('array'), + username : attr('string'), - comment: belongsTo('comment', { async: true }), - user: belongsTo('user', { async: true }) + comment : belongsTo('comment', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/comment.js b/app/models/comment.js index 138902340..ac03f9843 100644 --- a/app/models/comment.js +++ b/app/models/comment.js @@ -4,11 +4,11 @@ import { belongsTo, hasMany } from 'ember-data/relationships'; import ContainsCodeMixin from '../mixins/contains-code'; export default Model.extend(ContainsCodeMixin, { - body: attr('string'), - insertedAt: attr('date'), - markdown: attr('string'), + body : attr('string'), + insertedAt : attr('date'), + markdown : attr('string'), - commentUserMentions: hasMany('comment-user-mention', { async: true }), - task: belongsTo('task', { async: true }), - user: belongsTo('user', { async: true }) + commentUserMentions : hasMany('comment-user-mention', { async: true }), + task : belongsTo('task', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/organization-membership.js b/app/models/organization-membership.js index 5fa7d1170..6ff9e7b64 100644 --- a/app/models/organization-membership.js +++ b/app/models/organization-membership.js @@ -8,11 +8,11 @@ const { computed } = Ember; export default Model.extend({ role: attr(), - member: belongsTo('user', { async: true }), - organization: belongsTo('organization', { async: true }), + member : belongsTo('user', { async: true }), + organization : belongsTo('organization', { async: true }), - isAdmin: computed.equal('role', 'admin'), - isContributor: computed.equal('role', 'contributor'), - isOwner: computed.equal('role', 'owner'), - isPending: computed.equal('role', 'pending') + isAdmin : computed.equal('role', 'admin'), + isContributor : computed.equal('role', 'contributor'), + isOwner : computed.equal('role', 'owner'), + isPending : computed.equal('role', 'pending') }); diff --git a/app/models/organization.js b/app/models/organization.js index 3f2d8140d..5d99ea8f1 100644 --- a/app/models/organization.js +++ b/app/models/organization.js @@ -6,17 +6,17 @@ import Ember from 'ember'; const { computed } = Ember; export default Model.extend({ - base64IconData: attr(), - description: attr(), - iconLargeUrl: attr(), - iconThumbUrl: attr(), - name: attr(), - slug: attr(), + base64IconData : attr(), + description : attr(), + iconLargeUrl : attr(), + iconThumbUrl : attr(), + name : attr(), + slug : attr(), - organizationMemberships: hasMany('organization-membership', { async: true }), - projects: hasMany('project', { async: true }), + organizationMemberships : hasMany('organization-membership', { async: true }), + projects : hasMany('project', { async: true }), - hasPendingMembers: computed.gt('pendingMembersCount', 0), - pendingMembersCount: computed.alias('pendingMemberships.length'), - pendingMemberships: computed.filterBy('organizationMemberships', 'isPending') + hasPendingMembers : computed.gt('pendingMembersCount', 0), + pendingMembersCount : computed.alias('pendingMemberships.length'), + pendingMemberships : computed.filterBy('organizationMemberships', 'isPending') }); diff --git a/app/models/preview-user-mention.js b/app/models/preview-user-mention.js index 0977fbf6c..6de15517f 100644 --- a/app/models/preview-user-mention.js +++ b/app/models/preview-user-mention.js @@ -3,9 +3,9 @@ import attr from 'ember-data/attr'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - indices: attr('array'), - username: attr('string'), + indices : attr('array'), + username : attr('string'), - preview: belongsTo('preview', { async: true }), - user: belongsTo('user', { async: true }) + preview : belongsTo('preview', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/preview.js b/app/models/preview.js index 6e52bf24a..01637bd14 100644 --- a/app/models/preview.js +++ b/app/models/preview.js @@ -3,9 +3,9 @@ import attr from 'ember-data/attr'; import { belongsTo, hasMany } from 'ember-data/relationships'; export default Model.extend({ - body: attr('string'), - markdown: attr('string'), + body : attr('string'), + markdown : attr('string'), - previewUserMentions: hasMany('preview-user-mention', { async: true }), - user: belongsTo('user', { async: true }) + previewUserMentions : hasMany('preview-user-mention', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/project-category.js b/app/models/project-category.js index a8552ae67..0333d96f6 100644 --- a/app/models/project-category.js +++ b/app/models/project-category.js @@ -2,6 +2,6 @@ import Model from 'ember-data/model'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - category: belongsTo('category', { async: true }), - project: belongsTo('project', { async: true }) + category : belongsTo('category', { async: true }), + project : belongsTo('project', { async: true }) }); diff --git a/app/models/project-skill.js b/app/models/project-skill.js index b9b6f6736..7470548aa 100644 --- a/app/models/project-skill.js +++ b/app/models/project-skill.js @@ -2,6 +2,6 @@ import Model from 'ember-data/model'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - project: belongsTo('project', { async: true }), - skill: belongsTo('skill', { async: true }) + project : belongsTo('project', { async: true }), + skill : belongsTo('skill', { async: true }) }); diff --git a/app/models/project.js b/app/models/project.js index 1a860f1c3..27adce999 100644 --- a/app/models/project.js +++ b/app/models/project.js @@ -6,23 +6,23 @@ import Ember from 'ember'; const { computed } = Ember; export default Model.extend({ - base64IconData: attr(), - closedTasksCount: attr('number'), - description: attr(), - iconLargeUrl: attr(), - iconThumbUrl: attr(), - longDescriptionBody: attr(), - longDescriptionMarkdown: attr(), - openTasksCount: attr('number'), - slug: attr(), - title: attr(), + base64IconData : attr(), + closedTasksCount : attr('number'), + description : attr(), + iconLargeUrl : attr(), + iconThumbUrl : attr(), + longDescriptionBody : attr(), + longDescriptionMarkdown : attr(), + openTasksCount : attr('number'), + slug : attr(), + title : attr(), - organization: belongsTo('organization', { async: true }), - tasks: hasMany('tasks', { async: true }), - projectCategories: hasMany('project-category', { async: true }), - projectSkills: hasMany('project-skill', { async: true }), + organization : belongsTo('organization', { async: true }), + tasks : hasMany('tasks', { async: true }), + projectCategories : hasMany('project-category', { async: true }), + projectSkills : hasMany('project-skill', { async: true }), - hasOpenTasks: computed.gt('openTasksCount', 0), - hasPendingMembers: computed.alias('organization.hasPendingMembers'), - pendingMembersCount: computed.alias('organization.pendingMembersCount') + hasOpenTasks : computed.gt('openTasksCount', 0), + hasPendingMembers : computed.alias('organization.hasPendingMembers'), + pendingMembersCount : computed.alias('organization.pendingMembersCount') }); diff --git a/app/models/role.js b/app/models/role.js index 8e10576ad..999b5d4b9 100644 --- a/app/models/role.js +++ b/app/models/role.js @@ -6,13 +6,13 @@ import Ember from 'ember'; const { computed } = Ember; export default Model.extend({ - ability: attr(), - kind: attr(), - name: attr(), + ability : attr(), + kind : attr(), + name : attr(), userRoles: hasMany('user-role', { async: true }), - isCreative: computed.equal('kind', 'creative'), - isSupport: computed.equal('kind', 'support'), - isTechnology: computed.equal('kind', 'technology') + isCreative : computed.equal('kind', 'creative'), + isSupport : computed.equal('kind', 'support'), + isTechnology : computed.equal('kind', 'technology') }); diff --git a/app/models/skill.js b/app/models/skill.js index b4042a99c..c7d91c0de 100644 --- a/app/models/skill.js +++ b/app/models/skill.js @@ -2,8 +2,8 @@ import Model from 'ember-data/model'; import attr from 'ember-data/attr'; export default Model.extend({ - description: attr(), - title: attr(), + description : attr(), + title : attr(), // Virtual attribute matched: attr('boolean') diff --git a/app/models/slugged-route.js b/app/models/slugged-route.js index c8bc2cced..e9f074345 100644 --- a/app/models/slugged-route.js +++ b/app/models/slugged-route.js @@ -5,6 +5,6 @@ import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ slug: attr('string'), - organization: belongsTo('organization', { async: true }), - user: belongsTo('user', { async: true }) + organization : belongsTo('organization', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/task-user-mention.js b/app/models/task-user-mention.js index 0abd41fa2..d2e87aeaa 100644 --- a/app/models/task-user-mention.js +++ b/app/models/task-user-mention.js @@ -3,9 +3,9 @@ import attr from 'ember-data/attr'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - indices: attr('array'), - username: attr('string'), + indices : attr('array'), + username : attr('string'), - task: belongsTo('task', { async: true }), - user: belongsTo('user', { async: true }) + task : belongsTo('task', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/task.js b/app/models/task.js index 014ebc695..54f113bf9 100644 --- a/app/models/task.js +++ b/app/models/task.js @@ -4,18 +4,18 @@ import { belongsTo, hasMany } from 'ember-data/relationships'; import ContainsCodeMixin from '../mixins/contains-code'; export default Model.extend(ContainsCodeMixin, { - body: attr(), - insertedAt: attr('date'), - likesCount: attr('number'), - markdown: attr(), - number: attr('number'), - taskType: attr(), - status: attr(), - title: attr(), + body : attr(), + insertedAt : attr('date'), + likesCount : attr('number'), + markdown : attr(), + number : attr('number'), + taskType : attr(), + status : attr(), + title : attr(), - comments: hasMany('comment', { async: true }), - commentUserMentions: hasMany('comment-user-mention', { asnyc: true }), - taskUserMentions: hasMany('task-user-mention', { asnyc: true }), - project: belongsTo('project', { async: true }), - user: belongsTo('user', { async: true }) + comments : hasMany('comment', { async: true }), + commentUserMentions : hasMany('comment-user-mention', { asnyc: true }), + taskUserMentions : hasMany('task-user-mention', { asnyc: true }), + project : belongsTo('project', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/user-category.js b/app/models/user-category.js index 5091c2129..3e18bf536 100644 --- a/app/models/user-category.js +++ b/app/models/user-category.js @@ -2,6 +2,6 @@ import Model from 'ember-data/model'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - category: belongsTo('category', { async: true }), - user: belongsTo('user', { async: true }) + category : belongsTo('category', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/user-role.js b/app/models/user-role.js index 9316cfb43..7d2c8e689 100644 --- a/app/models/user-role.js +++ b/app/models/user-role.js @@ -2,6 +2,6 @@ import Model from 'ember-data/model'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - role: belongsTo('role', { async: true }), - user: belongsTo('user', { async: true }) + role : belongsTo('role', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/user-skill.js b/app/models/user-skill.js index de5450d13..c8ffb0c54 100644 --- a/app/models/user-skill.js +++ b/app/models/user-skill.js @@ -2,6 +2,6 @@ import Model from 'ember-data/model'; import { belongsTo } from 'ember-data/relationships'; export default Model.extend({ - skill: belongsTo('skill', { async: true }), - user: belongsTo('user', { async: true }) + skill : belongsTo('skill', { async: true }), + user : belongsTo('user', { async: true }) }); diff --git a/app/models/user.js b/app/models/user.js index 2ebaf1af3..158491407 100644 --- a/app/models/user.js +++ b/app/models/user.js @@ -6,27 +6,27 @@ import Ember from 'ember'; const { computed } = Ember; export default Model.extend({ - base64PhotoData: attr(), - biography: attr(), - insertedAt: attr('date'), - email: attr(), - firstName: attr(), - lastName: attr(), - name: attr(), - password: attr(), - photoLargeUrl: attr(), - photoThumbUrl: attr(), - state: attr(), - twitter: attr(), - username: attr(), - website: attr(), + base64PhotoData : attr(), + biography : attr(), + insertedAt : attr('date'), + email : attr(), + firstName : attr(), + lastName : attr(), + name : attr(), + password : attr(), + photoLargeUrl : attr(), + photoThumbUrl : attr(), + state : attr(), + twitter : attr(), + username : attr(), + website : attr(), stateTransition: attr(), - organizationMemberships: hasMany('organization-membership', { async: true }), - userCategories: hasMany('user-category', { async: true }), - userRoles: hasMany('user-role', { async: true }), - userSkills: hasMany('user-skill', { async: true }), + organizationMemberships : hasMany('organization-membership', { async: true }), + userCategories : hasMany('user-category', { async: true }), + userRoles : hasMany('user-role', { async: true }), + userSkills : hasMany('user-skill', { async: true }), atUsername: computed('username', function() { return `@${this.get('username')}`; diff --git a/app/router.js b/app/router.js index fcf2c6fc6..dc0a1bd3a 100644 --- a/app/router.js +++ b/app/router.js @@ -9,9 +9,9 @@ const { } = Ember; let AppRouter = Router.extend({ - location: config.locationType, - rootURL: config.rootURL, - metrics: service(), + location : config.locationType, + rootURL : config.rootURL, + metrics : service(), didTransition() { this._super(...arguments); diff --git a/app/routes/application.js b/app/routes/application.js index 8b1bd260a..771319c1e 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -11,141 +11,141 @@ const { } = Ember; export default Route.extend(ApplicationRouteMixin, { - currentUser: service(), - flashMessages: service(), - metrics: service(), - onboarding: service(), + currentUser : service(), + flashMessages : service(), + metrics : service(), + onboarding : service(), - isOnboarding: computed.alias('onboarding.isOnboarding'), - onboardingRoute: computed.alias('onboarding.currentRoute'), + isOnboarding : computed.alias('onboarding.isOnboarding'), + onboardingRoute : computed.alias('onboarding.currentRoute'), headTags: [ { - type: 'link', - tagId: 'link-canonical', - attrs: { - rel: 'canonical', - content: ENV.WEB_BASE_URL + type : 'link', + tagId : 'link-canonical', + attrs : { + rel : 'canonical', + content : ENV.WEB_BASE_URL } }, { - type: 'meta', - tagId: 'meta-description', - attrs: { - property: 'description', - content: 'Contribute to software projects for social good. Give your time or money to help build software to better the arts, education, government, science, and more.' + type : 'meta', + tagId : 'meta-description', + attrs : { + property : 'description', + content : 'Contribute to software projects for social good. Give your time or money to help build software to better the arts, education, government, science, and more.' } }, { - type: 'meta', - tagId: 'meta-og-description', - attrs: { - property: 'og:description', - content: 'Contribute to software projects for social good. Give your time or money to help build software to better the arts, education, government, science, and more.' + type : 'meta', + tagId : 'meta-og-description', + attrs : { + property : 'og:description', + content : 'Contribute to software projects for social good. Give your time or money to help build software to better the arts, education, government, science, and more.' } }, { - type: 'meta', - tagId: 'meta-og-image', - attrs: { - property: 'og:image', - content: 'https://d3pgew4wbk2vb1.cloudfront.net/images/universal-card.png' + type : 'meta', + tagId : 'meta-og-image', + attrs : { + property : 'og:image', + content : 'https://d3pgew4wbk2vb1.cloudfront.net/images/universal-card.png' } }, { - type: 'meta', - tagId: 'meta-og-site-name', - attrs: { - property: 'og:site_name', - content: 'Code Corps' + type : 'meta', + tagId : 'meta-og-site-name', + attrs : { + property : 'og:site_name', + content : 'Code Corps' } }, { - type: 'meta', - tagId: 'meta-og-title', - attrs: { - property: 'og:title', - content: 'Code Corps | Build a better future.' + type : 'meta', + tagId : 'meta-og-title', + attrs : { + property : 'og:title', + content : 'Code Corps | Build a better future.' } }, { - type: 'meta', - tagId: 'meta-og-type', - attrs: { - property: 'og:type', - content: 'website' + type : 'meta', + tagId : 'meta-og-type', + attrs : { + property : 'og:type', + content : 'website' } }, { - type: 'meta', - tagId: 'meta-og-url', - attrs: { - property: 'og:url', - content: ENV.WEB_BASE_URL + type : 'meta', + tagId : 'meta-og-url', + attrs : { + property : 'og:url', + content : ENV.WEB_BASE_URL } }, { - type: 'meta', - tagId: 'twitter-card', - attrs: { - name: 'twitter:card', - content: 'summary_large_image' + type : 'meta', + tagId : 'twitter-card', + attrs : { + name : 'twitter:card', + content : 'summary_large_image' } }, { - type: 'meta', - tagId: 'twitter-creator', - attrs: { - name: 'twitter:creator', - content: '@thecodecorps' + type : 'meta', + tagId : 'twitter-creator', + attrs : { + name : 'twitter:creator', + content : '@thecodecorps' } }, { - type: 'meta', - tagId: 'twitter-creator-id', - attrs: { - name: 'twitter:creator:id', - content: '4608917052' + type : 'meta', + tagId : 'twitter-creator-id', + attrs : { + name : 'twitter:creator:id', + content : '4608917052' } }, { - type: 'meta', - tagId: 'twitter-description', - attrs: { - name: 'twitter:description', - content: 'Contribute to software projects for social good. Give your time or money to help build software to better the arts, education, government, science, and more.' + type : 'meta', + tagId : 'twitter-description', + attrs : { + name : 'twitter:description', + content : 'Contribute to software projects for social good. Give your time or money to help build software to better the arts, education, government, science, and more.' } }, { - type: 'meta', - tagId: 'twitter-image', - attrs: { - name: 'twitter:image', - content: 'https://d3pgew4wbk2vb1.cloudfront.net/images/universal-card.png' + type : 'meta', + tagId : 'twitter-image', + attrs : { + name : 'twitter:image', + content : 'https://d3pgew4wbk2vb1.cloudfront.net/images/universal-card.png' } }, { - type: 'meta', - tagId: 'twitter-site', - attrs: { - name: 'twitter:site', - content: '@thecodecorps' + type : 'meta', + tagId : 'twitter-site', + attrs : { + name : 'twitter:site', + content : '@thecodecorps' } }, { - type: 'meta', - tagId: 'twitter-site-id', - attrs: { - name: 'twitter:site:id', - content: '4608917052' + type : 'meta', + tagId : 'twitter-site-id', + attrs : { + name : 'twitter:site:id', + content : '4608917052' } }, { - type: 'meta', - tagId: 'twitter-title', - attrs: { - name: 'twitter:title', - content: 'Code Corps | Build a better future.' + type : 'meta', + tagId : 'twitter-title', + attrs : { + name : 'twitter:title', + content : 'Code Corps | Build a better future.' } } ], diff --git a/app/routes/organizations/slugged-route/settings.js b/app/routes/organizations/slugged-route/settings.js index ce88e9b94..9509b0b13 100644 --- a/app/routes/organizations/slugged-route/settings.js +++ b/app/routes/organizations/slugged-route/settings.js @@ -8,8 +8,8 @@ const { } = Ember; export default Route.extend(AuthenticatedRouteMixin, CanMixin, { - credentials: service(), - session: service(), + credentials : service(), + session : service(), beforeModel() { let organization = this.modelFor('organizations.slugged-route'); diff --git a/app/routes/project.js b/app/routes/project.js index aafb2c111..806611d67 100644 --- a/app/routes/project.js +++ b/app/routes/project.js @@ -8,8 +8,8 @@ const { export default Route.extend({ model(params) { return this.store.queryRecord('project', { - slug: params.project_slug, - sluggedRouteSlug: params.slugged_route_slug + slug : params.project_slug, + sluggedRouteSlug : params.slugged_route_slug }, { reload: true }); }, @@ -25,8 +25,8 @@ export default Route.extend({ serialize(model) { if (model) { return { - slugged_route_slug: model.get('organization.slug'), - project_slug: model.get('slug') + slugged_route_slug : model.get('organization.slug'), + project_slug : model.get('slug') }; } else { return this._super(...arguments); diff --git a/app/routes/project/settings.js b/app/routes/project/settings.js index 5af81b0f4..92a013123 100644 --- a/app/routes/project/settings.js +++ b/app/routes/project/settings.js @@ -8,8 +8,8 @@ const { } = Ember; export default Route.extend(AuthenticatedRouteMixin, CanMixin, { - credentials: service(), - session: service(), + credentials : service(), + session : service(), beforeModel() { if (this.get('session.isAuthenticated')) { diff --git a/app/routes/project/tasks/index.js b/app/routes/project/tasks/index.js index 1d306b915..f3dceabd8 100644 --- a/app/routes/project/tasks/index.js +++ b/app/routes/project/tasks/index.js @@ -7,9 +7,9 @@ const { export default Route.extend({ queryParams: { - page: { refreshModel: true, scope: 'controller' }, - taskType: { refreshModel: true, scope: 'controller' }, - status: { refreshModel: true, scope: 'controller' } + page : { refreshModel: true, scope: 'controller' }, + taskType : { refreshModel: true, scope: 'controller' }, + status : { refreshModel: true, scope: 'controller' } }, model(params) { diff --git a/app/routes/project/tasks/new.js b/app/routes/project/tasks/new.js index 9a8a1b99a..193aeb097 100644 --- a/app/routes/project/tasks/new.js +++ b/app/routes/project/tasks/new.js @@ -9,13 +9,13 @@ const { } = Ember; export default Route.extend(AuthenticatedRouteMixin, { - credentials: service(), - currentUser: service(), + credentials : service(), + currentUser : service(), ability: EmberCan.computed.ability('organization', 'currentUserMembership'), - canCreateTask: computed.alias('ability.canCreateTaskTask'), - currentUserMembership: computed.alias('credentials.currentUserMembership'), + canCreateTask : computed.alias('ability.canCreateTaskTask'), + currentUserMembership : computed.alias('credentials.currentUserMembership'), taskType: computed('canCreateTask', function() { return this.get('canCreateTask') ? 'task' : 'issue'; @@ -27,9 +27,9 @@ export default Route.extend(AuthenticatedRouteMixin, { setupController(controller, model) { let newTask = this.store.createRecord('task', { - project: model, - user: this.get('currentUser.user'), - taskType: this.get('taskType') + project : model, + user : this.get('currentUser.user'), + taskType : this.get('taskType') }); controller.set('task', newTask); }, diff --git a/app/services/credentials.js b/app/services/credentials.js index 349eabfdb..593de2fb3 100644 --- a/app/services/credentials.js +++ b/app/services/credentials.js @@ -8,8 +8,8 @@ const { } = Ember; export default Service.extend({ - currentUser: service(), - store: service(), + currentUser : service(), + store : service(), user: computed.alias('currentUser.user'), @@ -51,9 +51,9 @@ export default Service.extend({ return this.get('currentOrganizationMemberships').reload(); }, - userIsMemberInOrganization: computed.notEmpty('currentUserMembership'), - userCanJoinOrganization: computed.empty('currentUserMembership'), + userIsMemberInOrganization : computed.notEmpty('currentUserMembership'), + userCanJoinOrganization : computed.empty('currentUserMembership'), - userCanManageOrganization: computed.alias('currentUserMembership.isAtLeastAdmin'), - userMembershipIsPending: computed.alias('currentUserMembership.isPending') + userCanManageOrganization : computed.alias('currentUserMembership.isAtLeastAdmin'), + userMembershipIsPending : computed.alias('currentUserMembership.isPending') }); diff --git a/app/services/current-user.js b/app/services/current-user.js index 09c264171..4dd496667 100644 --- a/app/services/current-user.js +++ b/app/services/current-user.js @@ -9,9 +9,9 @@ const { } = Ember; export default Service.extend({ - metrics: service(), - session: service(), - store: service(), + metrics : service(), + session : service(), + store : service(), loadCurrentUser() { return new RSVP.Promise((resolve, reject) => { @@ -31,14 +31,14 @@ export default Service.extend({ _identifyUser(user) { // Segment get(this, 'metrics').identify({ - distinctId: user.get('id'), - biography: user.get('biography'), - insertedAt: user.get('insertedAt'), - email: user.get('email'), - name: user.get('name'), - state: user.get('state'), - username: user.get('username'), - website: user.get('website') + distinctId : user.get('id'), + biography : user.get('biography'), + insertedAt : user.get('insertedAt'), + email : user.get('email'), + name : user.get('name'), + state : user.get('state'), + username : user.get('username'), + website : user.get('website') }); } }); diff --git a/app/services/navigation-menu.js b/app/services/navigation-menu.js index c7685b043..c939c996d 100644 --- a/app/services/navigation-menu.js +++ b/app/services/navigation-menu.js @@ -9,8 +9,8 @@ const { export default Service.extend({ onboarding: service(), - isDefault: computed.equal('menuType', 'default'), - isOnboarding: computed.equal('menuType', 'onboarding'), + isDefault : computed.equal('menuType', 'default'), + isOnboarding : computed.equal('menuType', 'onboarding'), menuType: computed('onboarding.isOnboarding', function() { let isOnboarding = this.get('onboarding.isOnboarding'); diff --git a/app/services/onboarding.js b/app/services/onboarding.js index 78b868d72..3624035a4 100644 --- a/app/services/onboarding.js +++ b/app/services/onboarding.js @@ -7,37 +7,37 @@ const { } = Ember; export default Service.extend({ - currentUser: service(), - totalSteps: computed.alias('_steps.length'), + currentUser : service(), + totalSteps : computed.alias('_steps.length'), _steps: [ { - number: 1, - state: 'signed_up', - currentRoute: 'start.hello', - nextRoute: 'start.interests', - nextStateTransition: 'edit_profile' + number : 1, + state : 'signed_up', + currentRoute : 'start.hello', + nextRoute : 'start.interests', + nextStateTransition : 'edit_profile' }, { - number: 2, - state: 'edited_profile', - currentRoute: 'start.interests', - nextRoute: 'start.expertise', - nextStateTransition: 'select_categories' + number : 2, + state : 'edited_profile', + currentRoute : 'start.interests', + nextRoute : 'start.expertise', + nextStateTransition : 'select_categories' }, { - number: 3, - state: 'selected_categories', - currentRoute: 'start.expertise', - nextRoute: 'start.skills', - nextStateTransition: 'select_roles' + number : 3, + state : 'selected_categories', + currentRoute : 'start.expertise', + nextRoute : 'start.skills', + nextStateTransition : 'select_roles' }, { - number: 4, - state: 'selected_roles', - currentRoute: 'start.skills', - nextRoute: 'projects-list', - nextStateTransition: 'select_skills' + number : 4, + state : 'selected_roles', + currentRoute : 'start.skills', + nextRoute : 'projects-list', + nextStateTransition : 'select_skills' } ], @@ -49,17 +49,17 @@ export default Service.extend({ }); }), - currentRoute: computed.alias('_currentStep.currentRoute'), - currentStepNumber: computed.alias('_currentStep.number'), - currentStepState: computed.alias('_currentStep.state'), - isEditingProfile: computed.equal('currentStepState', 'signed_up'), - isOnboarding: computed.or('isEditingProfile', 'isSelectingCategories', 'isSelectingRoles', 'isSelectingSkills'), - isSelectingCategories: computed.equal('currentStepState', 'edited_profile'), - isSelectingRoles: computed.equal('currentStepState', 'selected_categories'), - isSelectingSkills: computed.equal('currentStepState', 'selected_roles'), - nextRoute: computed.alias('_currentStep.nextRoute'), - nextStateTransition: computed.alias('_currentStep.nextStateTransition'), - routes: computed.mapBy('_steps', 'currentRoute'), + currentRoute : computed.alias('_currentStep.currentRoute'), + currentStepNumber : computed.alias('_currentStep.number'), + currentStepState : computed.alias('_currentStep.state'), + isEditingProfile : computed.equal('currentStepState', 'signed_up'), + isOnboarding : computed.or('isEditingProfile', 'isSelectingCategories', 'isSelectingRoles', 'isSelectingSkills'), + isSelectingCategories : computed.equal('currentStepState', 'edited_profile'), + isSelectingRoles : computed.equal('currentStepState', 'selected_categories'), + isSelectingSkills : computed.equal('currentStepState', 'selected_roles'), + nextRoute : computed.alias('_currentStep.nextRoute'), + nextStateTransition : computed.alias('_currentStep.nextStateTransition'), + routes : computed.mapBy('_steps', 'currentRoute'), progressPercentage: computed('currentStepNumber', 'totalSteps', function() { return (this.get('currentStepNumber') / this.get('totalSteps')) * 100; diff --git a/app/services/user-categories.js b/app/services/user-categories.js index 87926daa9..8d47b87b9 100644 --- a/app/services/user-categories.js +++ b/app/services/user-categories.js @@ -7,11 +7,11 @@ const { } = Ember; export default Service.extend({ - currentUser: service(), - store: service(), + currentUser : service(), + store : service(), - isEmpty: computed.empty('userCategories'), - user: computed.alias('currentUser.user'), + isEmpty : computed.empty('userCategories'), + user : computed.alias('currentUser.user'), userCategories: computed('user.userCategories', 'user.userCategories.@each.category', diff --git a/app/services/user-roles.js b/app/services/user-roles.js index 85e5cf7b9..5a8e1016e 100644 --- a/app/services/user-roles.js +++ b/app/services/user-roles.js @@ -7,11 +7,11 @@ const { } = Ember; export default Service.extend({ - currentUser: service(), - store: service(), + currentUser : service(), + store : service(), - isEmpty: computed.empty('userRoles'), - user: computed.alias('currentUser.user'), + isEmpty : computed.empty('userRoles'), + user : computed.alias('currentUser.user'), userRoles: computed('user.userRoles', 'user.userRoles.@each.role', diff --git a/app/services/user-skills.js b/app/services/user-skills.js index 226d31d2e..f3ca6cd0a 100644 --- a/app/services/user-skills.js +++ b/app/services/user-skills.js @@ -8,11 +8,11 @@ const { } = Ember; export default Service.extend({ - currentUser: service(), - store: service(), + currentUser : service(), + store : service(), - isEmpty: computed.empty('userSkills'), - user: computed.alias('currentUser.user'), + isEmpty : computed.empty('userSkills'), + user : computed.alias('currentUser.user'), userSkills: computed('user.userSkills', 'user.userSkills.@each.skill', diff --git a/config/deploy.js b/config/deploy.js index ea8280049..95049e49d 100644 --- a/config/deploy.js +++ b/config/deploy.js @@ -1,16 +1,16 @@ -var VALID_DEPLOY_TARGETS = [ //update these to match what you call your deployment targets +let VALID_DEPLOY_TARGETS = [ // update these to match what you call your deployment targets 'development-postbuild', 'staging', 'production' ]; module.exports = function(deployTarget) { - var ENV = { + let ENV = { build: {} }; if (VALID_DEPLOY_TARGETS.indexOf(deployTarget) === -1) { - throw new Error('Invalid deployTarget ' + deployTarget); + throw new Error(`Invalid deployTarget ${ deployTarget}`); } if (deployTarget === 'development-postbuild') { @@ -21,52 +21,52 @@ module.exports = function(deployTarget) { if (deployTarget === 'staging' || deployTarget === 'production') { ENV.s3 = { - accessKeyId: process.env.AWS_ACCESS_KEY_ID, - secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY - } + accessKeyId : process.env.AWS_ACCESS_KEY_ID, + secretAccessKey : process.env.AWS_SECRET_ACCESS_KEY + }; ENV['s3-index'] = { - accessKeyId: process.env.AWS_ACCESS_KEY_ID, - secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY - } + accessKeyId : process.env.AWS_ACCESS_KEY_ID, + secretAccessKey : process.env.AWS_SECRET_ACCESS_KEY + }; ENV.slack = { - webhookURL: 'https://hooks.slack.com/services/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', - username: 'ember-cli-deploy', - iconEmoji: ':rocket:', - } + webhookURL : 'https://hooks.slack.com/services/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', + username : 'ember-cli-deploy', + iconEmoji : ':rocket:' + }; } if (deployTarget === 'staging') { ENV.build.environment = 'staging'; ENV.s3.bucket = process.env.STAGING_S3_BUCKET; ENV.s3.region = process.env.STAGING_S3_REGION; - ENV['s3-index']['bucket'] = process.env.STAGING_S3_INDEX_BUCKET; - ENV['s3-index']['region'] = process.env.STAGING_S3_INDEX_REGION; + ENV['s3-index'].bucket = process.env.STAGING_S3_INDEX_BUCKET; + ENV['s3-index'].region = process.env.STAGING_S3_INDEX_REGION; ENV.sentry = { - publicUrl: process.env.STAGING_SENTRY_SITE_URL, - sentryUrl: process.env.SENTRY_BASE_URL, - sentryOrganizationSlug: process.env.STAGING_SENTRY_ORGANIZATION_SLUG, - sentryProjectSlug: process.env.STAGING_SENTRY_PROJECT_SLUG, - sentryApiKey: process.env.STAGING_SENTRY_API_KEY, - sentryBearerApiKey: process.env.STAGING_SENTRY_API_KEY, - } + publicUrl : process.env.STAGING_SENTRY_SITE_URL, + sentryUrl : process.env.SENTRY_BASE_URL, + sentryOrganizationSlug : process.env.STAGING_SENTRY_ORGANIZATION_SLUG, + sentryProjectSlug : process.env.STAGING_SENTRY_PROJECT_SLUG, + sentryApiKey : process.env.STAGING_SENTRY_API_KEY, + sentryBearerApiKey : process.env.STAGING_SENTRY_API_KEY + }; } if (deployTarget === 'production') { ENV.build.environment = 'production'; ENV.s3.bucket = process.env.PRODUCTION_S3_BUCKET; ENV.s3.region = process.env.PRODUCTION_S3_REGION; - ENV['s3-index']['bucket'] = process.env.PRODUCTION_S3_INDEX_BUCKET; - ENV['s3-index']['region'] = process.env.PRODUCTION_S3_INDEX_REGION; + ENV['s3-index'].bucket = process.env.PRODUCTION_S3_INDEX_BUCKET; + ENV['s3-index'].region = process.env.PRODUCTION_S3_INDEX_REGION; ENV.sentry = { - publicUrl: process.env.PRODUCTION_SENTRY_SITE_URL, - sentryUrl: process.env.SENTRY_BASE_URL, - sentryOrganizationSlug: process.env.PRODUCTION_SENTRY_ORGANIZATION_SLUG, - sentryProjectSlug: process.env.PRODUCTION_SENTRY_PROJECT_SLUG, - sentryApiKey: process.env.PRODUCTION_SENTRY_API_KEY, - sentryBearerApiKey: process.env.PRODUCTION_SENTRY_API_KEY, - } + publicUrl : process.env.PRODUCTION_SENTRY_SITE_URL, + sentryUrl : process.env.SENTRY_BASE_URL, + sentryOrganizationSlug : process.env.PRODUCTION_SENTRY_ORGANIZATION_SLUG, + sentryProjectSlug : process.env.PRODUCTION_SENTRY_PROJECT_SLUG, + sentryApiKey : process.env.PRODUCTION_SENTRY_API_KEY, + sentryBearerApiKey : process.env.PRODUCTION_SENTRY_API_KEY + }; } // Note: if you need to build some configuration asynchronously,ou can return diff --git a/config/ember-try.js b/config/ember-try.js index 71aac7a81..bde76679b 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -1,15 +1,15 @@ module.exports = { - command: "ember exam --split=3 --weighted --parallel", - scenarios: [ + command : 'ember exam --split=3 --weighted --parallel', + scenarios : [ { - name: 'default', - bower: { + name : 'default', + bower : { dependencies: { } } }, { - name: 'ember-release', - bower: { + name : 'ember-release', + bower : { dependencies: { 'ember': 'components/ember#release' }, @@ -19,8 +19,8 @@ module.exports = { } }, { - name: 'ember-beta', - bower: { + name : 'ember-beta', + bower : { dependencies: { 'ember': 'components/ember#beta' }, @@ -30,8 +30,8 @@ module.exports = { } }, { - name: 'ember-canary', - bower: { + name : 'ember-canary', + bower : { dependencies: { 'ember': 'components/ember#canary' }, diff --git a/config/environment.js b/config/environment.js index ddab714b3..46c917687 100644 --- a/config/environment.js +++ b/config/environment.js @@ -1,12 +1,12 @@ /* jshint node: true */ module.exports = function(environment) { - var ENV = { - modulePrefix: 'code-corps-ember', - environment: environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { + let ENV = { + modulePrefix : 'code-corps-ember', + environment, + rootURL : '/', + locationType : 'auto', + EmberENV : { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true @@ -24,36 +24,36 @@ module.exports = function(environment) { flashMessageDefaults: { // flash message defaults - timeout: 2000, - extendedTimeout: 0, - priority: 200, - sticky: true, - showProgress: true, + timeout : 2000, + extendedTimeout : 0, + priority : 200, + sticky : true, + showProgress : true, // service defaults // do not inject into factories automatically // use Ember.inject.service() explicitly where needed instead // since that's the new Ember convention - injectionFactories: [], - preventDuplicates: true + injectionFactories : [], + preventDuplicates : true }, metricsAdapters: [ { - name: 'Segment', - environments: ['development', 'staging'], - config: { + name : 'Segment', + environments : ['development', 'staging'], + config : { key: 'AkZqGsSMgLz15lGhyatw2T0EXnAHfocr' } }, { - name: 'Segment', - environments: ['production'], - config: { + name : 'Segment', + environments : ['production'], + config : { key: 'Nz7hL2eY2yHzuIwUbExfDanbJp2q0IO0' } - }, + } ], moment: { @@ -62,22 +62,22 @@ module.exports = function(environment) { pace: { // addon-specific options to configure theme - theme: 'minimal', - color: 'blue', - restartOnRequestAfter: 500, - ajax: { + theme : 'minimal', + color : 'blue', + restartOnRequestAfter : 500, + ajax : { ignoreURLs: ['intercom', 'segment', 'sentry'] } }, pageTitle: { - prepend: true, - separator: " — " + prepend : true, + separator : ' — ' }, sentry: { dsn: 'https://cecdf7d399e74b72bc73dc8e4e62737d@app.getsentry.com/82741' - }, + } }; if (environment === 'development') { @@ -97,35 +97,35 @@ module.exports = function(environment) { }; ENV.contentSecurityPolicy = { - 'default-src': "'none'", - 'script-src': [ - "'self'", + 'default-src' : "'none'", + 'script-src' : [ + "'self'" ], // Allow fonts to be loaded from http://fonts.gstatic.com - 'font-src': ["'self'", "data:", "https://fonts.gstatic.com"], + 'font-src' : ["'self'", 'data:', 'https://fonts.gstatic.com'], // Allow data (ajax/websocket) from api.lvh.me:49235 - 'connect-src': [ + 'connect-src' : [ "'self'", - "http://api.lvh.me:49235" + 'http://api.lvh.me:49235' ], // Allow images from the origin itself (i.e. current domain), and data 'img-src': [ "'self'", - "data:", - "https://d3pgew4wbk2vb1.cloudfront.net", - "https://dawxes9syhrgg.cloudfront.net", - "http://lorempixel.com", - "https://s3.amazonaws.com", + 'data:', + 'https://d3pgew4wbk2vb1.cloudfront.net', + 'https://dawxes9syhrgg.cloudfront.net', + 'http://lorempixel.com', + 'https://s3.amazonaws.com' ], // Allow inline styles and loaded CSS from http://fonts.googleapis.com 'style-src': [ "'self'", - "'unsafe-inline'", + "'unsafe-inline'" ], // `media-src` will be omitted from policy // Browser will fallback to default-src for media resources (which is to deny, see above). 'media-src': null - } + }; } if (environment === 'remote-development') { @@ -173,10 +173,10 @@ module.exports = function(environment) { } ENV['ember-simple-auth-token'] = { - serverTokenEndpoint: ENV.API_BASE_URL + '/token', - serverTokenRefreshEndpoint: ENV.API_BASE_URL + '/token/refresh', - refreshLeeway: 3000, // 5 minutes before expiry - timeFactor: 1000, + serverTokenEndpoint : `${ENV.API_BASE_URL }/token`, + serverTokenRefreshEndpoint : `${ENV.API_BASE_URL }/token/refresh`, + refreshLeeway : 3000, // 5 minutes before expiry + timeFactor : 1000 }; return ENV; diff --git a/testem.js b/testem.js index 26044b2f8..c6c4a586f 100644 --- a/testem.js +++ b/testem.js @@ -1,13 +1,13 @@ -/*jshint node:true*/ +/* jshint node:true*/ module.exports = { - "framework": "qunit", - "test_page": "tests/index.html?hidepassed", - "disable_watching": true, - "launch_in_ci": [ - "PhantomJS" + 'framework' : 'qunit', + 'test_page' : 'tests/index.html?hidepassed', + 'disable_watching' : true, + 'launch_in_ci' : [ + 'PhantomJS' ], - "launch_in_dev": [ - "PhantomJS", - "Chrome" + 'launch_in_dev': [ + 'PhantomJS', + 'Chrome' ] }; diff --git a/tests/acceptance/contributors-test.js b/tests/acceptance/contributors-test.js index a057e4286..aa5afdfdf 100644 --- a/tests/acceptance/contributors-test.js +++ b/tests/acceptance/contributors-test.js @@ -23,9 +23,9 @@ test('when not an admin on the project', function(assert) { let user = server.create('user'); server.create('organizationMembership', { - member: user, - organization: project.organization, - role: 'contributor' + member : user, + organization : project.organization, + role : 'contributor' }); let contributorURLParts = buildURLParts(project.organization.slug, project.slug); @@ -45,9 +45,9 @@ test('when only the owner is a contributor', function(assert) { let project = createProjectWithSluggedRoute(); let user = server.create('user'); server.create('organizationMembership', { - member: user, - organization: project.organization, - role: 'owner' + member : user, + organization : project.organization, + role : 'owner' }); let contributorURLParts = buildURLParts(project.organization.slug, project.slug); @@ -77,33 +77,33 @@ test('when there are multiple contributors', function(assert) { let project = createProjectWithSluggedRoute(); let user = server.create('user'); server.create('organizationMembership', { - member: user, - organization: project.organization, - role: 'owner' + member : user, + organization : project.organization, + role : 'owner' }); server.create('organizationMembership', { - member: server.create('user'), - organization: project.organization, - role: 'admin' + member : server.create('user'), + organization : project.organization, + role : 'admin' }); server.create('organizationMembership', { - member: server.create('user'), - organization: project.organization, - role: 'pending' + member : server.create('user'), + organization : project.organization, + role : 'pending' }); server.create('organizationMembership', { - member: server.create('user'), - organization: project.organization, - role: 'pending' + member : server.create('user'), + organization : project.organization, + role : 'pending' }); server.create('organizationMembership', { - member: server.create('user'), - organization: project.organization, - role: 'contributor' + member : server.create('user'), + organization : project.organization, + role : 'contributor' }); let contributorURLParts = buildURLParts(project.organization.slug, project.slug); diff --git a/tests/acceptance/onboarding-test.js b/tests/acceptance/onboarding-test.js index 3c6b1ddc4..229511602 100644 --- a/tests/acceptance/onboarding-test.js +++ b/tests/acceptance/onboarding-test.js @@ -10,19 +10,19 @@ test('A user can onboard as expected', function(assert) { let user = server.create('user', { username: 'test_user', state: 'signed_up' }); server.create('category'); server.create('role', { - name: 'Backend Developer', - ability: 'Backend Development', - kind: 'technology' + name : 'Backend Developer', + ability : 'Backend Development', + kind : 'technology' }); server.create('role', { - name: 'Marketer', - ability: 'Marketing', - kind: 'creative' + name : 'Marketer', + ability : 'Marketing', + kind : 'creative' }); server.create('role', { - name: 'Donor', - ability: 'Donations', - kind: 'support' + name : 'Donor', + ability : 'Donations', + kind : 'support' }); server.create('skill', { title: 'Ruby' diff --git a/tests/acceptance/organization-settings-profile-test.js b/tests/acceptance/organization-settings-profile-test.js index dd13a1f85..966fa1abb 100644 --- a/tests/acceptance/organization-settings-profile-test.js +++ b/tests/acceptance/organization-settings-profile-test.js @@ -27,9 +27,9 @@ test('it allows editing of organization profile', function(assert) { let organization = createOrganizationWithSluggedRoute(); server.create('organizationMembership', { - member: user, + member : user, organization, - role: 'admin' + role : 'admin' }); authenticateSession(this.application, { user_id: user.id }); @@ -69,9 +69,9 @@ test("it allows editing of organization's image", function(assert) { let organization = createOrganizationWithSluggedRoute(); server.create('organizationMembership', { - member: user, + member : user, organization, - role: 'admin' + role : 'admin' }); authenticateSession(this.application, { user_id: user.id }); diff --git a/tests/acceptance/organization-test.js b/tests/acceptance/organization-test.js index cfe3cad52..e58f43c29 100644 --- a/tests/acceptance/organization-test.js +++ b/tests/acceptance/organization-test.js @@ -42,9 +42,9 @@ test('an admin can navigate to settings', function(assert) { let user = server.create('user'); server.create('organization-membership', { - member: user, + member : user, organization, - role: 'admin' + role : 'admin' }); // we assume authenticate session here. specific behavior regarding authentication and diff --git a/tests/acceptance/project-about-test.js b/tests/acceptance/project-about-test.js index 845de46a5..26037247f 100644 --- a/tests/acceptance/project-about-test.js +++ b/tests/acceptance/project-about-test.js @@ -10,14 +10,14 @@ test('When unauthenticated, and project has no long description, it shows proper assert.expect(2); let organization = createOrganizationWithSluggedRoute(); let project = server.create('project', { - longDescriptionBody: null, - longDescriptionMarkdown: null, + longDescriptionBody : null, + longDescriptionMarkdown : null, organization }); projectAboutPage.visit({ - organization: organization.slug, - project: project.slug + organization : organization.slug, + project : project.slug }); andThen(() => { @@ -30,14 +30,14 @@ test('When unauthenticated, and project has long description, it shows the proje assert.expect(2); let organization = createOrganizationWithSluggedRoute(); let project = server.create('project', { - longDescriptionBody: 'A body', - longDescriptionMarkdown: 'A body', + longDescriptionBody : 'A body', + longDescriptionMarkdown : 'A body', organization }); projectAboutPage.visit({ - organization: organization.slug, - project: project.slug + organization : organization.slug, + project : project.slug }); andThen(() => { @@ -54,16 +54,16 @@ test('When authenticated as admin, and project has no long description, it allow server.create('organization-membership', { organization, member: user, role: 'admin' }); let project = server.create('project', { - longDescriptionBody: null, - longDescriptionMarkdown: null, + longDescriptionBody : null, + longDescriptionMarkdown : null, organization }); authenticateSession(this.application, { user_id: user.id }); projectAboutPage.visit({ - organization: organization.slug, - project: project.slug + organization : organization.slug, + project : project.slug }); andThen(() => { @@ -87,16 +87,16 @@ test('When authenticated as admin, and project has long description, it allows e server.create('organization-membership', { organization, member: user, role: 'admin' }); let project = server.create('project', { - longDescriptionBody: 'A body', - longDescriptionMarkdown: 'A body', + longDescriptionBody : 'A body', + longDescriptionMarkdown : 'A body', organization }); authenticateSession(this.application, { user_id: user.id }); projectAboutPage.visit({ - organization: organization.slug, - project: project.slug + organization : organization.slug, + project : project.slug }); andThen(() => { diff --git a/tests/acceptance/project-settings-test.js b/tests/acceptance/project-settings-test.js index 2586020f2..b41e7e307 100644 --- a/tests/acceptance/project-settings-test.js +++ b/tests/acceptance/project-settings-test.js @@ -12,8 +12,8 @@ test('it requires authentication', function(assert) { let project = createProjectWithSluggedRoute(); projectSettingsPage.visit({ - organization: project.organization.slug, - project: project.slug + organization : project.organization.slug, + project : project.slug }); andThen(() => { @@ -29,16 +29,16 @@ test('it allows editing of project profile', function(assert) { let project = createProjectWithSluggedRoute(); server.create('organizationMembership', { - member: user, - organization: project.organization, - role: 'admin' + member : user, + organization : project.organization, + role : 'admin' }); authenticateSession(this.application, { user_id: user.id }); projectSettingsPage.visit({ - organization: project.organization.slug, - project: project.slug + organization : project.organization.slug, + project : project.slug }); andThen(() => { @@ -76,16 +76,16 @@ test("it allows editing of project's image", function(assert) { let project = createProjectWithSluggedRoute(); server.create('organizationMembership', { - member: user, - organization: project.organization, - role: 'admin' + member : user, + organization : project.organization, + role : 'admin' }); authenticateSession(this.application, { user_id: user.id }); projectSettingsPage.visit({ - organization: project.organization.slug, - project: project.slug + organization : project.organization.slug, + project : project.slug }); let done = assert.async(); diff --git a/tests/acceptance/project-test.js b/tests/acceptance/project-test.js index 08194ee8c..04bc41416 100644 --- a/tests/acceptance/project-test.js +++ b/tests/acceptance/project-test.js @@ -316,8 +316,8 @@ test('A user can join the organization of the project', function(assert) { return { data: { - id: 1, - type: 'organization-membership', + id : 1, + type : 'organization-membership', attributes, relationships } diff --git a/tests/acceptance/signup-test.js b/tests/acceptance/signup-test.js index 27cb15f45..f4a3992e2 100644 --- a/tests/acceptance/signup-test.js +++ b/tests/acceptance/signup-test.js @@ -55,8 +55,8 @@ test('Successful signup', function(assert) { signInDone(); return { - token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6InBhc3N3b3JkIiwidXNlcm5hbWUiOiJqb3NoQGNvZGVybHkuY29tIiwidXNlcl9pZCI6MSwiZXhwIjo3MjAwfQ.QVDyAznECIWL6DjDs9iPezvMmoPuzDqAl4bQ6CY-fCQ', - user_id: 1 + token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6InBhc3N3b3JkIiwidXNlcm5hbWUiOiJqb3NoQGNvZGVybHkuY29tIiwidXNlcl9pZCI6MSwiZXhwIjo3MjAwfQ.QVDyAznECIWL6DjDs9iPezvMmoPuzDqAl4bQ6CY-fCQ', + user_id : 1 }; }); diff --git a/tests/acceptance/slugged-route-test.js b/tests/acceptance/slugged-route-test.js index 5aedc55dd..bcbad3b51 100644 --- a/tests/acceptance/slugged-route-test.js +++ b/tests/acceptance/slugged-route-test.js @@ -36,10 +36,10 @@ test('It renders a 404 error when no slugged route exists', function(assert) { server.get('/no_slug', { errors: [{ - id: 'RECORD_NOT_FOUND', - title: 'Record not found', - detail: "Couldn't find SluggedRoute", - status: 404 + id : 'RECORD_NOT_FOUND', + title : 'Record not found', + detail : "Couldn't find SluggedRoute", + status : 404 }] }, 404); diff --git a/tests/acceptance/stripe-connect-test.js b/tests/acceptance/stripe-connect-test.js index 2b625a74e..3d28f1f97 100644 --- a/tests/acceptance/stripe-connect-test.js +++ b/tests/acceptance/stripe-connect-test.js @@ -14,9 +14,9 @@ test('it navigates through Stripes OAuth flow', function(assert) { let { organization } = project; server.create('organizationMembership', { - member: user, + member : user, organization, - role: 'admin' + role : 'admin' }); authenticateSession(this.application, { user_id: user.id }); diff --git a/tests/acceptance/task-comments-test.js b/tests/acceptance/task-comments-test.js index fed66164b..4a57ec032 100644 --- a/tests/acceptance/task-comments-test.js +++ b/tests/acceptance/task-comments-test.js @@ -17,9 +17,9 @@ test('Task comments are displayed correctly', function(assert) { server.createList('comment', 4, { taskId: task.id }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -38,9 +38,9 @@ test('A comment can be added to a task', function(assert) { authenticateSession(this.application, { user_id: user.id }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -72,9 +72,9 @@ test('Comment preview works during creation', function(assert) { let task = server.schema.tasks.create({ projectId: project.id, number: 1 }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); let markdown = 'Some type of markdown'; @@ -138,9 +138,9 @@ test('When comment creation fails due to validation, validation errors are displ authenticateSession(this.application, { user_id: user.id }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -152,16 +152,16 @@ test('When comment creation fails due to validation, validation errors are displ return new Mirage.Response(422, {}, { errors: [ { - id: 'VALIDATION_ERROR', - source: { pointer:'data/attributes/markdown' }, - detail:'is invalid', - status: 422 + id : 'VALIDATION_ERROR', + source : { pointer: 'data/attributes/markdown' }, + detail : 'is invalid', + status : 422 }, { - id:'VALIDATION_ERROR', - source: { pointer:'data/attributes/markdown' }, - detail: "can't be blank", - status: 422 + id : 'VALIDATION_ERROR', + source : { pointer: 'data/attributes/markdown' }, + detail : "can't be blank", + status : 422 } ] }); @@ -185,9 +185,9 @@ test('When comment creation fails due to non-validation issues, the error is dis authenticateSession(this.application, { user_id: user.id }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -199,10 +199,10 @@ test('When comment creation fails due to non-validation issues, the error is dis return new Mirage.Response(400, {}, { errors: [ { - id: 'UNKNOWN ERROR', - title: 'An unknown error', - detail:'Something happened', - status: 400 + id : 'UNKNOWN ERROR', + title : 'An unknown error', + detail : 'Something happened', + status : 400 } ] }); @@ -228,18 +228,18 @@ test('A comment can only be edited by the author', function(assert) { server.createList('comment', 1, { task, user }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { assert.notOk(taskPage.commentItem.editLink.isVisible, 'Edit link is not rendered when logged out'); authenticateSession(this.application, { user_id: user.id }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); }); @@ -262,9 +262,9 @@ test('Comment editing with preview works', function(assert) { server.createList('comment', 1, { task, user }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { diff --git a/tests/acceptance/task-creation-test.js b/tests/acceptance/task-creation-test.js index 48fe9e6e9..db522f194 100644 --- a/tests/acceptance/task-creation-test.js +++ b/tests/acceptance/task-creation-test.js @@ -152,28 +152,28 @@ test('When task creation fails due to validation, validation errors are displaye return new Mirage.Response(422, {}, { errors: [ { - id: 'VALIDATION_ERROR', - source: { pointer: 'data/attributes/title' }, - detail:'is invalid', - status: 422 + id : 'VALIDATION_ERROR', + source : { pointer: 'data/attributes/title' }, + detail : 'is invalid', + status : 422 }, { - id:'VALIDATION_ERROR', - source: { pointer: 'data/attributes/markdown' }, - detail: "can't be blank", - status: 422 + id : 'VALIDATION_ERROR', + source : { pointer: 'data/attributes/markdown' }, + detail : "can't be blank", + status : 422 }, { - id: 'VALIDATION_ERROR', - source: { pointer: 'data/attributes/task-type' }, - detail: 'is invalid', - status: 422 + id : 'VALIDATION_ERROR', + source : { pointer: 'data/attributes/task-type' }, + detail : 'is invalid', + status : 422 }, { - id: 'VALIDATION_ERROR', - source: { pointer: 'data/attributes/task-type' }, - detail: 'can only be one of the specified values', - status: 422 + id : 'VALIDATION_ERROR', + source : { pointer: 'data/attributes/task-type' }, + detail : 'can only be one of the specified values', + status : 422 } ] }); }); @@ -205,10 +205,10 @@ test('When task creation fails due to non-validation issues, the error is displa return new Mirage.Response(400, {}, { errors: [ { - id: 'UNKNOWN ERROR', - title: 'An unknown error', - detail:'Something happened', - status: 400 + id : 'UNKNOWN ERROR', + title : 'An unknown error', + detail : 'Something happened', + status : 400 } ] }); diff --git a/tests/acceptance/task-editing-test.js b/tests/acceptance/task-editing-test.js index d9b3bdc5f..27ac8282f 100644 --- a/tests/acceptance/task-editing-test.js +++ b/tests/acceptance/task-editing-test.js @@ -18,9 +18,9 @@ test('Task editing requires logging in', function(assert) { task.save(); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -29,9 +29,9 @@ test('Task editing requires logging in', function(assert) { authenticateSession(this.application, { user_id: user.id }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); }); @@ -54,9 +54,9 @@ test('A task body can be edited on its own', function(assert) { task.save(); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -92,9 +92,9 @@ test('A task title can be edited on its own', function(assert) { task.save(); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -167,17 +167,17 @@ test('A task can be opened or closed by the author', function(assert) { let project = server.create('project', { organization }); let task = server.schema.create('task', { - type: 'issue', - status: 'open', - number: 1, + type : 'issue', + status : 'open', + number : 1, user, project }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -206,18 +206,18 @@ test('A task can be opened or closed by the organization admin', function(assert let project = server.create('project', { organization }); let task = server.schema.create('task', { - type: 'issue', - status: 'open', - number: 1, + type : 'issue', + status : 'open', + number : 1, project }); - server.schema.create('organization-membership', { organization, member: user, role: 'admin' }); + server.schema.create('organization-membership', { organization, member: user, role: 'admin' }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { @@ -246,16 +246,16 @@ test('A task cannot be opened or closed by someone else', function(assert) { let project = server.create('project', { organization }); let task = server.schema.create('task', { - type: 'issue', - status: 'open', - number: 1, + type : 'issue', + status : 'open', + number : 1, project }); taskPage.visit({ - organization: organization.slug, - project: project.slug, - number: task.number + organization : organization.slug, + project : project.slug, + number : task.number }); andThen(() => { diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js index 9f5b2c3b7..672157826 100644 --- a/tests/helpers/resolver.js +++ b/tests/helpers/resolver.js @@ -4,8 +4,8 @@ import config from '../../config/environment'; const resolver = Resolver.create(); resolver.namespace = { - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix + modulePrefix : config.modulePrefix, + podModulePrefix : config.podModulePrefix }; resolver.pluralizedTypes.ability = 'abilities'; diff --git a/tests/integration/components/categories-list-test.js b/tests/integration/components/categories-list-test.js index 74c100ae0..c486bc8e4 100644 --- a/tests/integration/components/categories-list-test.js +++ b/tests/integration/components/categories-list-test.js @@ -16,16 +16,16 @@ test('it renders the categories and sorts them by name', function(assert) { let categories = [ { - id: 2, - name: 'Society' + id : 2, + name : 'Society' }, { - id: 1, - name: 'Zoology' + id : 1, + name : 'Zoology' }, { - id: 3, - name: 'Alphabets' + id : 3, + name : 'Alphabets' } ]; diff --git a/tests/integration/components/category-item-test.js b/tests/integration/components/category-item-test.js index 7b7c9f4ed..3b624823c 100644 --- a/tests/integration/components/category-item-test.js +++ b/tests/integration/components/category-item-test.js @@ -61,23 +61,23 @@ let mockUserCategoriesServiceForErrors = { }; let mockUserCategory = Object.create({ - id: 1, - categoryId: defaultCategoryId, - userId: 1 + id : 1, + categoryId : defaultCategoryId, + userId : 1 }); let unselectedCategory = Object.create({ - id: 1, - name: 'Technology', - slug: 'technology', - description: 'You want to help technology.' + id : 1, + name : 'Technology', + slug : 'technology', + description : 'You want to help technology.' }); let selectedCategory = Object.create({ - id: 2, - name: 'Society', - slug: 'society', - description: 'You want to help society.' + id : 2, + name : 'Society', + slug : 'society', + description : 'You want to help society.' }); test('it works for selecting unselected categories', function(assert) { diff --git a/tests/integration/components/comment-item-test.js b/tests/integration/components/comment-item-test.js index ecb415de9..e734f0403 100644 --- a/tests/integration/components/comment-item-test.js +++ b/tests/integration/components/comment-item-test.js @@ -10,8 +10,8 @@ const { } = Ember; let mockMentionFetcher = { - fetchBodyWithMentions: RSVP.resolve, - prefetchBodyWithMentions: K + fetchBodyWithMentions : RSVP.resolve, + prefetchBodyWithMentions : K }; let mockStore = { @@ -27,8 +27,8 @@ let mockCurrentUser = { }; let mockComment = Object.create({ - body: 'A body', - user: { id: 1 }, + body : 'A body', + user : { id: 1 }, save() { return RSVP.resolve(); } diff --git a/tests/integration/components/create-comment-form-test.js b/tests/integration/components/create-comment-form-test.js index 344712b72..bd95db773 100644 --- a/tests/integration/components/create-comment-form-test.js +++ b/tests/integration/components/create-comment-form-test.js @@ -12,9 +12,9 @@ const { let mockSession = { isAuthenticated: true }; let pressCtrlEnter = $.Event('keydown', { - keyCode: 13, - which: 13, - ctrlKey: true + keyCode : 13, + which : 13, + ctrlKey : true }); moduleForComponent('create-comment-form', 'Integration | Component | create comment form', { diff --git a/tests/integration/components/editor-with-preview-test.js b/tests/integration/components/editor-with-preview-test.js index c735a4806..0da6b79ee 100644 --- a/tests/integration/components/editor-with-preview-test.js +++ b/tests/integration/components/editor-with-preview-test.js @@ -10,8 +10,8 @@ const { } = Ember; let mockPreview = Object.create({ - markdown: 'A **body**', - body: 'A body', + markdown : 'A **body**', + body : 'A body', save() { return RSVP.resolve(this); } @@ -38,9 +38,9 @@ moduleForComponent('editor-with-preview', 'Integration | Component | editor with }); let pressCtrlEnter = $.Event('keydown', { - keyCode: 13, - which: 13, - ctrlKey: true + keyCode : 13, + which : 13, + ctrlKey : true }); test('it renders', function(assert) { diff --git a/tests/integration/components/flash-messages-test.js b/tests/integration/components/flash-messages-test.js index ed76568bc..be4f4d919 100644 --- a/tests/integration/components/flash-messages-test.js +++ b/tests/integration/components/flash-messages-test.js @@ -16,11 +16,11 @@ test('it renders a fixed error message', function(assert) { run(() => { getOwner(this).lookup('service:flash-messages').add({ - message: 'Error message', - type: 'danger', - fixed: true, - sticky: false, - timeout: 5000 + message : 'Error message', + type : 'danger', + fixed : true, + sticky : false, + timeout : 5000 }); }); @@ -32,8 +32,8 @@ test('it renders a normal success message', function(assert) { run(() => { getOwner(this).lookup('service:flash-messages').add({ - message: 'Success message', - type: 'success' + message : 'Success message', + type : 'success' }); }); diff --git a/tests/integration/components/member-list-item-test.js b/tests/integration/components/member-list-item-test.js index 56714a853..1f907defb 100644 --- a/tests/integration/components/member-list-item-test.js +++ b/tests/integration/components/member-list-item-test.js @@ -9,10 +9,10 @@ const { } = Ember; let user = { - name: 'Josh Smith', - username: 'joshsmith', - photoThumbUrl: 'http://lorempixel.com/image_output/people-q-c-50-50-4.jpg', - userCategories: [ + name : 'Josh Smith', + username : 'joshsmith', + photoThumbUrl : 'http://lorempixel.com/image_output/people-q-c-50-50-4.jpg', + userCategories : [ { category: { name: 'Technology' diff --git a/tests/integration/components/navigation-menu-test.js b/tests/integration/components/navigation-menu-test.js index d254f082d..9a4825d67 100644 --- a/tests/integration/components/navigation-menu-test.js +++ b/tests/integration/components/navigation-menu-test.js @@ -31,9 +31,9 @@ test('it renders elements for the default menu when logged in', function(assert) test('it renders elements for the onboarding menu', function(assert) { stubService(this, 'navigation-menu', { isOnboarding: true }); stubService(this, 'onboarding', { - currentStepNumber: 1, - totalSteps: 3, - progressPercentage: 100 + currentStepNumber : 1, + totalSteps : 3, + progressPercentage : 100 }); this.render(hbs`{{navigation-menu}}`); diff --git a/tests/integration/components/organization-header-test.js b/tests/integration/components/organization-header-test.js index 6729391d7..1fb611d5e 100644 --- a/tests/integration/components/organization-header-test.js +++ b/tests/integration/components/organization-header-test.js @@ -10,9 +10,9 @@ moduleForComponent('organization-header', 'Integration | Component | organizatio beforeEach() { stubService(this, 'credentials', { currentUserMembership: Object.create({ - member: user, + member : user, organization, - role: 'admin' + role : 'admin' }) }); } @@ -20,10 +20,10 @@ moduleForComponent('organization-header', 'Integration | Component | organizatio let user = Object.create({}); let organization = Object.create({ - name: 'Test Organization', - description: 'A test organization', - iconThumbUrl: 'icon_thumb.png', - iconLargeUrl: 'icon_large.png' + name : 'Test Organization', + description : 'A test organization', + iconThumbUrl : 'icon_thumb.png', + iconLargeUrl : 'icon_large.png' }); test('it renders', function(assert) { diff --git a/tests/integration/components/organization-members-test.js b/tests/integration/components/organization-members-test.js index 32a5bb337..4cf294fc7 100644 --- a/tests/integration/components/organization-members-test.js +++ b/tests/integration/components/organization-members-test.js @@ -19,8 +19,8 @@ test('it renders an item for each member in the list', function(assert) { let mockMembers = []; for (let i = 1; i <= 3; i++) { mockMembers.push({ - id: i, - photoThumbUrl: `image_${i}.png` + id : i, + photoThumbUrl : `image_${i}.png` }); } diff --git a/tests/integration/components/organization-profile-test.js b/tests/integration/components/organization-profile-test.js index 6b1db1e14..04276d635 100644 --- a/tests/integration/components/organization-profile-test.js +++ b/tests/integration/components/organization-profile-test.js @@ -26,10 +26,10 @@ let projects = [ ]; let organization = { - name: 'Test Organization', - description: 'Test organization description', - slug: 'test_organization', - organizationMemberships: memberships, + name : 'Test Organization', + description : 'Test organization description', + slug : 'test_organization', + organizationMemberships : memberships, projects }; diff --git a/tests/integration/components/organization-settings-form-test.js b/tests/integration/components/organization-settings-form-test.js index 757056e4e..a06d1f683 100644 --- a/tests/integration/components/organization-settings-form-test.js +++ b/tests/integration/components/organization-settings-form-test.js @@ -10,8 +10,8 @@ moduleForComponent('organization-settings-form', 'Integration | Component | orga }); let organization = { - name: 'Test Organization', - description: 'A test organization' + name : 'Test Organization', + description : 'A test organization' }; test('it renders', function(assert) { diff --git a/tests/integration/components/pager-control-test.js b/tests/integration/components/pager-control-test.js index 597a23902..c281505cf 100644 --- a/tests/integration/components/pager-control-test.js +++ b/tests/integration/components/pager-control-test.js @@ -12,10 +12,10 @@ test('it renders', function(assert) { test('it renders the correct control elements', function(assert) { this.set('options', { - pageSize: 5, - totalRecords: 43, - currentPage: 3, - totalPages: 5 + pageSize : 5, + totalRecords : 43, + currentPage : 3, + totalPages : 5 }); this.render(hbs`{{pager-control options=options}}`); @@ -30,10 +30,10 @@ test('it renders the correct control elements', function(assert) { test('If there is less than 5 pages of records in total, it only renders buttons for those pages', function(assert) { this.set('options', { - pageSize: 5, - totalRecords: 7, - currentPage: 1, - totalPages: 2 + pageSize : 5, + totalRecords : 7, + currentPage : 1, + totalPages : 2 }); this.render(hbs`{{pager-control options=options}}`); @@ -45,10 +45,10 @@ test('If there is less than 5 pages of records in total, it only renders buttons test('If we are currently on the first page, the previous page button does not render', function(assert) { this.set('options', { - pageSize: 5, - totalRecords: 7, - currentPage: 1, - totalPages: 2 + pageSize : 5, + totalRecords : 7, + currentPage : 1, + totalPages : 2 }); this.render(hbs`{{pager-control options=options}}`); @@ -58,10 +58,10 @@ test('If we are currently on the first page, the previous page button does not r test('If we are currently on the only page with some records, nothing renders', function(assert) { this.set('options', { - pageSize: 5, - totalRecords: 5, - currentPage: 1, - totalPages: 1 + pageSize : 5, + totalRecords : 5, + currentPage : 1, + totalPages : 1 }); this.render(hbs`{{pager-control options=options}}`); @@ -71,10 +71,10 @@ test('If we are currently on the only page with some records, nothing renders', test('If we are currently on the only page with no records, nothing renders', function(assert) { this.set('options', { - pageSize: 5, - totalRecords: 0, - currentPage: 1, - totalPages: 0 + pageSize : 5, + totalRecords : 0, + currentPage : 1, + totalPages : 0 }); this.render(hbs`{{pager-control options=options}}`); @@ -84,10 +84,10 @@ test('If we are currently on the only page with no records, nothing renders', fu test('If we are currently on the last page, the next page button does not render', function(assert) { this.set('options', { - pageSize: 5, - totalRecords: 7, - currentPage: 2, - totalPages: 2 + pageSize : 5, + totalRecords : 7, + currentPage : 2, + totalPages : 2 }); this.render(hbs`{{pager-control options=options}}`); diff --git a/tests/integration/components/project-card-test.js b/tests/integration/components/project-card-test.js index 0019e37da..c0fa20ebf 100644 --- a/tests/integration/components/project-card-test.js +++ b/tests/integration/components/project-card-test.js @@ -24,13 +24,13 @@ test('it renders', function(assert) { let projectCategory = server.create('project-category', { project }); let mockedProject = { - id: project.id, - title: project.title, - description: project.description, - iconLargeUrl: project.iconLargeUrl, - organization: { - name: organization.name, - organizationMemberships: [membership] + id : project.id, + title : project.title, + description : project.description, + iconLargeUrl : project.iconLargeUrl, + organization : { + name : organization.name, + organizationMemberships : [membership] }, projectCategories: [projectCategory] }; diff --git a/tests/integration/components/project-categories-list-test.js b/tests/integration/components/project-categories-list-test.js index 52209c46c..d528100b6 100644 --- a/tests/integration/components/project-categories-list-test.js +++ b/tests/integration/components/project-categories-list-test.js @@ -11,16 +11,16 @@ moduleForComponent('project-categories-list', 'Integration | Component | project let categories = [ { - id: 2, - name: 'Society' + id : 2, + name : 'Society' }, { - id: 1, - name: 'Zoology' + id : 1, + name : 'Zoology' }, { - id: 3, - name: 'Alphabets' + id : 3, + name : 'Alphabets' } ]; diff --git a/tests/integration/components/project-category-item-test.js b/tests/integration/components/project-category-item-test.js index aceb0f34d..8bcdbd89d 100644 --- a/tests/integration/components/project-category-item-test.js +++ b/tests/integration/components/project-category-item-test.js @@ -22,19 +22,19 @@ moduleForComponent('project-category-item', 'Integration | Component | project c }); let mockUserCategory = Object.create({ - id: 1, - categoryId: 2, - userId: 1 + id : 1, + categoryId : 2, + userId : 1 }); test('it works for unselected categories', function(assert) { assert.expect(6); let category = { - id: 1, - name: 'Technology', - slug: 'technology', - description: 'You want to help technology.' + id : 1, + name : 'Technology', + slug : 'technology', + description : 'You want to help technology.' }; this.set('category', category); @@ -56,10 +56,10 @@ test('it works for selected categories', function(assert) { assert.expect(6); let category = { - id: 2, - name: 'Society', - slug: 'society', - description: 'You want to help society.' + id : 2, + name : 'Society', + slug : 'society', + description : 'You want to help society.' }; this.set('category', category); diff --git a/tests/integration/components/project-item-test.js b/tests/integration/components/project-item-test.js index 6a432e2ea..05097cf29 100644 --- a/tests/integration/components/project-item-test.js +++ b/tests/integration/components/project-item-test.js @@ -17,9 +17,9 @@ test('it renders the correct UI elements', function(assert) { assert.expect(3); this.set('project', { - iconThumbUrl: 'icon.png', - title: 'A project', - description: 'A description' + iconThumbUrl : 'icon.png', + title : 'A project', + description : 'A description' }); this.render(hbs`{{project-item project=project}}`); diff --git a/tests/integration/components/project-long-description-test.js b/tests/integration/components/project-long-description-test.js index 29d4dbd00..a742fa48a 100644 --- a/tests/integration/components/project-long-description-test.js +++ b/tests/integration/components/project-long-description-test.js @@ -19,13 +19,13 @@ let credentialsWithAdminMembership = { }; let projectWithDescription = Object.create({ - longDescriptionBody: 'A body', - longDescriptionMarkdown: 'A **body**' + longDescriptionBody : 'A body', + longDescriptionMarkdown : 'A **body**' }); let blankProject = Object.create({ - longDescriptionBody: null, - longDescriptionMarkdown: null + longDescriptionBody : null, + longDescriptionMarkdown : null }); test('it renders properly when decription is blank and the user cannot add to it', function(assert) { diff --git a/tests/integration/components/project-menu-test.js b/tests/integration/components/project-menu-test.js index 3738209c4..a2951a959 100644 --- a/tests/integration/components/project-menu-test.js +++ b/tests/integration/components/project-menu-test.js @@ -30,8 +30,8 @@ test('it renders the task count when it has tasks', function(assert) { stubService(this, 'session', { isAuthenticated: false }); this.set('project', { - hasOpenTasks: true, - openTasksCount: 7 + hasOpenTasks : true, + openTasksCount : 7 }); this.render(hbs`{{project-menu project=project}}`); @@ -44,8 +44,8 @@ test('it does not render the task count when it has no tasks', function(assert) stubService(this, 'session', { isAuthenticated: false }); this.set('project', { - hasOpenTasks: false, - openTasksCount: 0 + hasOpenTasks : false, + openTasksCount : 0 }); this.render(hbs`{{project-menu project=project}}`); diff --git a/tests/integration/components/project-settings-form-test.js b/tests/integration/components/project-settings-form-test.js index 823cfda95..a94df8bd7 100644 --- a/tests/integration/components/project-settings-form-test.js +++ b/tests/integration/components/project-settings-form-test.js @@ -10,8 +10,8 @@ moduleForComponent('project-settings-form', 'Integration | Component | project s }); let project = { - title: 'Test Organization', - description: 'A test project' + title : 'Test Organization', + description : 'A test project' }; test('it renders', function(assert) { diff --git a/tests/integration/components/role-item-test.js b/tests/integration/components/role-item-test.js index b8ba77a58..ad1b93671 100644 --- a/tests/integration/components/role-item-test.js +++ b/tests/integration/components/role-item-test.js @@ -54,23 +54,23 @@ let mockUserRolesServiceForErrors = { }; let mockUserRole = Object.create({ - id: 1, - roleId: defaultRoleId, - userId: 1 + id : 1, + roleId : defaultRoleId, + userId : 1 }); let unselectedRole = Object.create({ - id: 1, - name: 'Backend Developer', - ability: 'Backend Development', - kind: 'technology' + id : 1, + name : 'Backend Developer', + ability : 'Backend Development', + kind : 'technology' }); let selectedRole = Object.create({ - id: 2, - name: 'Mobile Developer', - ability: 'Mobile Development', - kind: 'technology' + id : 2, + name : 'Mobile Developer', + ability : 'Mobile Development', + kind : 'technology' }); moduleForComponent('role-item', 'Integration | Component | role item', { diff --git a/tests/integration/components/select-dropdown-test.js b/tests/integration/components/select-dropdown-test.js index aac1dc87a..e42f71ff7 100644 --- a/tests/integration/components/select-dropdown-test.js +++ b/tests/integration/components/select-dropdown-test.js @@ -18,12 +18,12 @@ test('it renders proper ui elements, properly bound', function(assert) { let items = [ { - value: 'task', - label: 'Task' + value : 'task', + label : 'Task' }, { - value: 'idea', - label: 'Idea' + value : 'idea', + label : 'Idea' } ]; diff --git a/tests/integration/components/submittable-textarea-test.js b/tests/integration/components/submittable-textarea-test.js index 81223b4b9..270b6026a 100644 --- a/tests/integration/components/submittable-textarea-test.js +++ b/tests/integration/components/submittable-textarea-test.js @@ -9,15 +9,15 @@ moduleForComponent('submittable-textarea', 'Integration | Component | submittabl }); let pressCtrlEnter = $.Event('keydown', { - keyCode: 13, - which: 13, - ctrlKey: true + keyCode : 13, + which : 13, + ctrlKey : true }); let pressCmdEnter = $.Event('keydown', { - keyCode: 13, - which: 13, - metaKey: true + keyCode : 13, + which : 13, + metaKey : true }); // This test is necessary because a new line after yield in the file will diff --git a/tests/integration/components/task-details-test.js b/tests/integration/components/task-details-test.js index 6a7ea961f..c038af6c8 100644 --- a/tests/integration/components/task-details-test.js +++ b/tests/integration/components/task-details-test.js @@ -10,8 +10,8 @@ const { } = Ember; let mockMentionFetcher = { - fetchBodyWithMentions: RSVP.resolve, - prefetchBodyWithMentions: K + fetchBodyWithMentions : RSVP.resolve, + prefetchBodyWithMentions : K }; let mockCurrentUser = { @@ -27,11 +27,11 @@ let mockStore = { }; let mockTask = Object.create({ - title: 'A task', - body: 'A body', - containsCode: true, - taskType: 'issue', - user: { id: 1 }, + title : 'A task', + body : 'A body', + containsCode : true, + taskType : 'issue', + user : { id: 1 }, save() { return RSVP.resolve(); } diff --git a/tests/integration/components/task-filter-dropdown-test.js b/tests/integration/components/task-filter-dropdown-test.js index 3621e010a..829050458 100644 --- a/tests/integration/components/task-filter-dropdown-test.js +++ b/tests/integration/components/task-filter-dropdown-test.js @@ -10,22 +10,22 @@ moduleForComponent('task-filter-dropdown', 'Integration | Component | task filte let types = [ Object.create({ - name: 'Tasks', - param: 'task', - slug: 'tasks', - selected: true + name : 'Tasks', + param : 'task', + slug : 'tasks', + selected : true }), Object.create({ - name: 'Issues', - param: 'issue', - slug: 'issues', - selected: false + name : 'Issues', + param : 'issue', + slug : 'issues', + selected : false }), Object.create({ - name: 'Ideas', - param: 'idea', - slug: 'ideas', - selected: false + name : 'Ideas', + param : 'idea', + slug : 'ideas', + selected : false }) ]; diff --git a/tests/integration/components/task-filter-type-test.js b/tests/integration/components/task-filter-type-test.js index 902611cc7..129e5de85 100644 --- a/tests/integration/components/task-filter-type-test.js +++ b/tests/integration/components/task-filter-type-test.js @@ -10,22 +10,22 @@ moduleForComponent('task-filter-type', 'Integration | Component | task filter ty let types = [ Object.create({ - name: 'Tasks', - param: 'task', - slug: 'tasks', - selected: true + name : 'Tasks', + param : 'task', + slug : 'tasks', + selected : true }), Object.create({ - name: 'Issues', - param: 'issue', - slug: 'issues', - selected: false + name : 'Issues', + param : 'issue', + slug : 'issues', + selected : false }), Object.create({ - name: 'Ideas', - param: 'idea', - slug: 'ideas', - selected: false + name : 'Ideas', + param : 'idea', + slug : 'ideas', + selected : false }) ]; diff --git a/tests/integration/components/task-header-test.js b/tests/integration/components/task-header-test.js index 7c613ec85..7bfa9a049 100644 --- a/tests/integration/components/task-header-test.js +++ b/tests/integration/components/task-header-test.js @@ -8,10 +8,10 @@ const { } = Ember; let mockTask = Object.create({ - title: 'A task', - body: 'A body', - number: 12, - taskType: 'issue', + title : 'A task', + body : 'A body', + number : 12, + taskType : 'issue', save() { return RSVP.resolve(); } diff --git a/tests/integration/components/task-item-test.js b/tests/integration/components/task-item-test.js index 82cfd6709..9808b5e0c 100644 --- a/tests/integration/components/task-item-test.js +++ b/tests/integration/components/task-item-test.js @@ -14,8 +14,8 @@ test('it renders all required elements', function(assert) { assert.expect(3); let task = { - title: 'Clean the house', - taskType: 'task' + title : 'Clean the house', + taskType : 'task' }; this.set('task', task); diff --git a/tests/integration/components/task-new-form-test.js b/tests/integration/components/task-new-form-test.js index a4c05d59d..d2701d036 100644 --- a/tests/integration/components/task-new-form-test.js +++ b/tests/integration/components/task-new-form-test.js @@ -22,9 +22,9 @@ test('it renders proper ui elements, properly bound', function(assert) { stubService(this, 'credentials', { currentUserMembership: null }); let task = { - title: 'A task', - markdown: 'A body', - taskType: 'idea' + title : 'A task', + markdown : 'A body', + taskType : 'idea' }; let placeholder = 'Test placeholder'; diff --git a/tests/integration/components/task-title-test.js b/tests/integration/components/task-title-test.js index ee2cdad8e..56b0ff476 100644 --- a/tests/integration/components/task-title-test.js +++ b/tests/integration/components/task-title-test.js @@ -21,11 +21,11 @@ let mockDifferentUser = { }; let mockTask = Object.create({ - title: 'Original title', - body: 'A body', - number: 12, - taskType: 'issue', - user: { + title : 'Original title', + body : 'A body', + number : 12, + taskType : 'issue', + user : { id: 1 }, save() { diff --git a/tests/integration/components/user-dropdown-test.js b/tests/integration/components/user-dropdown-test.js index 22dd16c75..d3315365b 100644 --- a/tests/integration/components/user-dropdown-test.js +++ b/tests/integration/components/user-dropdown-test.js @@ -12,9 +12,9 @@ moduleForComponent('user-dropdown', 'Integration | Component | user dropdown', { }); const stubUser = Object.extend({ - id: 1, - username: 'tester', - photoThumbUrl: '/assets/images/twitter.png', + id : 1, + username : 'tester', + photoThumbUrl : '/assets/images/twitter.png', atUsername: computed('username', function() { return `@${this.get('username')}`; diff --git a/tests/integration/components/user-menu-test.js b/tests/integration/components/user-menu-test.js index e1a0aa1a2..01039b1d2 100644 --- a/tests/integration/components/user-menu-test.js +++ b/tests/integration/components/user-menu-test.js @@ -8,9 +8,9 @@ const { } = Ember; const stubUser = Object.extend({ - id: 1, - username: 'tester', - photoThumbUrl: '/assets/images/twitter.png', + id : 1, + username : 'tester', + photoThumbUrl : '/assets/images/twitter.png', atUsername: computed('username', function() { return `@${this.get('username')}`; diff --git a/tests/integration/components/user-organizations-list-test.js b/tests/integration/components/user-organizations-list-test.js index 71db48fb5..e3044cd08 100644 --- a/tests/integration/components/user-organizations-list-test.js +++ b/tests/integration/components/user-organizations-list-test.js @@ -35,11 +35,11 @@ test('with several organizations renders all required elements', function(assert let mockOrganizations = []; for (let i = 1; i <= 3; i++) { mockOrganizations.push({ - id: i, - name: `Organization ${i}`, - slug: `organization_${i}`, - description: `Organization ${i} description`, - iconThumbUrl: `/icon_${i}.png` + id : i, + name : `Organization ${i}`, + slug : `organization_${i}`, + description : `Organization ${i} description`, + iconThumbUrl : `/icon_${i}.png` }); } diff --git a/tests/integration/components/user-settings-form-test.js b/tests/integration/components/user-settings-form-test.js index 07497ad43..07a1a7f89 100644 --- a/tests/integration/components/user-settings-form-test.js +++ b/tests/integration/components/user-settings-form-test.js @@ -18,11 +18,11 @@ test('it renders', function(assert) { }); let user = { - firstName: 'Test', - lastName: 'User', - twitter: '@testuser', - website: 'example.com', - biography: 'A test user' + firstName : 'Test', + lastName : 'User', + twitter : '@testuser', + website : 'example.com', + biography : 'A test user' }; test('it renders form elements properly', function(assert) { diff --git a/tests/integration/components/user-sidebar-test.js b/tests/integration/components/user-sidebar-test.js index 764de461f..cf90e0d45 100644 --- a/tests/integration/components/user-sidebar-test.js +++ b/tests/integration/components/user-sidebar-test.js @@ -27,14 +27,14 @@ function mockUser() { // trying to redefine its properties // TODO: figure out how to do it better let user = { - id: 1, - name: 'Josh Smith', - username: 'JoshSmith', - twitter: 'joshsmith', - website: 'https://codecorps.org', + id : 1, + name : 'Josh Smith', + username : 'JoshSmith', + twitter : 'joshsmith', + website : 'https://codecorps.org', // TODO: remove this because it's a computed property and // Mirage doesn't do a great job with that - twitterUrl: 'https://twitter.com/joshsmith' + twitterUrl : 'https://twitter.com/joshsmith' }; server.schema.users.create(user); return user; diff --git a/tests/integration/components/user-skills-input-item-test.js b/tests/integration/components/user-skills-input-item-test.js index a101b7034..e082f702a 100644 --- a/tests/integration/components/user-skills-input-item-test.js +++ b/tests/integration/components/user-skills-input-item-test.js @@ -6,8 +6,8 @@ import stubService from 'code-corps-ember/tests/helpers/stub-service'; const { Object } = Ember; let skill = Object.create({ - selected: true, - title: 'Ruby on Rails' + selected : true, + title : 'Ruby on Rails' }); moduleForComponent('user-skills-input-item', 'Integration | Component | user skills input item', { diff --git a/tests/integration/components/user-skills-input-test.js b/tests/integration/components/user-skills-input-test.js index 350e32a66..766972d7a 100644 --- a/tests/integration/components/user-skills-input-test.js +++ b/tests/integration/components/user-skills-input-test.js @@ -37,33 +37,33 @@ moduleForComponent('user-skills-input', 'Integration | Component | user skills i }); let pressCommaKey = jQuery.Event('keydown', { - keyCode: 188, - which: 188 + keyCode : 188, + which : 188 }); let pressDownKey = jQuery.Event('keydown', { - keyCode: 40, - which: 40 + keyCode : 40, + which : 40 }); let pressEnterKey = jQuery.Event('keydown', { - keyCode: 13, - which: 13 + keyCode : 13, + which : 13 }); let pressEscKey = jQuery.Event('keydown', { - keyCode: 27, - which: 27 + keyCode : 27, + which : 27 }); let pressRKey = jQuery.Event('keydown', { - keyCode: 82, - which: 82 + keyCode : 82, + which : 82 }); let pressUpKey = jQuery.Event('keydown', { - keyCode: 38, - which: 38 + keyCode : 38, + which : 38 }); test('it does nothing when pressing a random key', function(assert) { diff --git a/tests/pages/components/comment-item.js b/tests/pages/components/comment-item.js index ade7a918e..ded398c24 100644 --- a/tests/pages/components/comment-item.js +++ b/tests/pages/components/comment-item.js @@ -7,8 +7,8 @@ import { export default { scope: '.comment-item', - clickEdit: clickable('.edit'), - clickSave: clickable('.save'), + clickEdit : clickable('.edit'), + clickSave : clickable('.save'), commentBody: { scope: '.comment-body p' diff --git a/tests/pages/components/error-wrapper.js b/tests/pages/components/error-wrapper.js index e7f35bfa7..0fea7008e 100644 --- a/tests/pages/components/error-wrapper.js +++ b/tests/pages/components/error-wrapper.js @@ -9,7 +9,7 @@ export default { clickLink: clickable('a'), title: { - scope: 'h1', - text: text() + scope : 'h1', + text : text() } }; diff --git a/tests/pages/components/login-form.js b/tests/pages/components/login-form.js index d9a9c6978..9cf3fa6e7 100644 --- a/tests/pages/components/login-form.js +++ b/tests/pages/components/login-form.js @@ -5,13 +5,13 @@ import { } from 'ember-cli-page-object'; export default { - scope: '.login-form', + scope: '.login-form', - username: fillable('#identification'), - password: fillable('#password'), - submit: clickable('#login'), + username : fillable('#identification'), + password : fillable('#password'), + submit : clickable('#login'), - errors: collection({ + errors: collection({ itemScope: 'p.error' }), diff --git a/tests/pages/components/navigation-menu.js b/tests/pages/components/navigation-menu.js index 6f564eed3..48b91f474 100644 --- a/tests/pages/components/navigation-menu.js +++ b/tests/pages/components/navigation-menu.js @@ -14,16 +14,16 @@ export default { scope: 'a.signup' }, userMenu: { - scope: '.user-menu', - open: clickable('a.user-menu-select'), + scope : '.user-menu', + open : clickable('a.user-menu-select'), profileLink: { - scope: 'a.slugged-route', - href: attribute('href') + scope : 'a.slugged-route', + href : attribute('href') }, settingsLink: { - scope: '.profile', - href: attribute('href') + scope : '.profile', + href : attribute('href') }, logOut: { scope: 'a.logout' diff --git a/tests/pages/components/pager-control.js b/tests/pages/components/pager-control.js index 41548d28b..e1ae090cd 100644 --- a/tests/pages/components/pager-control.js +++ b/tests/pages/components/pager-control.js @@ -7,19 +7,19 @@ export default { scope: '.pager-control', nextPage: { - scope: '.next-page', - href: attribute('href') + scope : '.next-page', + href : attribute('href') }, pages: collection({ - itemScope: '.page', - item: { + itemScope : '.page', + item : { href: attribute('href') } }), previousPage: { - scope: '.previous-page', - href: attribute('href') + scope : '.previous-page', + href : attribute('href') } }; diff --git a/tests/pages/components/project-card.js b/tests/pages/components/project-card.js index e94354c3a..81c095446 100644 --- a/tests/pages/components/project-card.js +++ b/tests/pages/components/project-card.js @@ -10,7 +10,7 @@ export default { }, members: collection({ - scope: '.project-card-members', - itemScope: 'li.member' + scope : '.project-card-members', + itemScope : 'li.member' }) }; diff --git a/tests/pages/components/project-details.js b/tests/pages/components/project-details.js index 25b1e6fba..9a569e67d 100644 --- a/tests/pages/components/project-details.js +++ b/tests/pages/components/project-details.js @@ -6,12 +6,12 @@ export default { scope: '.project-details', joinProjectButton: { - scope: '.join-project button', - href: attribute('href') + scope : '.join-project button', + href : attribute('href') }, signUpLink: { - scope: '.join-project a', - href: attribute('href') + scope : '.join-project a', + href : attribute('href') } }; diff --git a/tests/pages/components/project-list.js b/tests/pages/components/project-list.js index 83058ef9b..381a097a3 100644 --- a/tests/pages/components/project-list.js +++ b/tests/pages/components/project-list.js @@ -7,8 +7,8 @@ export default { scope: '.project-list', items: collection({ - itemScope: '.project-item', - item: { + itemScope : '.project-item', + item : { href: attribute('href', 'a:eq(0)') } }) diff --git a/tests/pages/components/project-long-description.js b/tests/pages/components/project-long-description.js index 928ddc82d..3d0f13b5c 100644 --- a/tests/pages/components/project-long-description.js +++ b/tests/pages/components/project-long-description.js @@ -8,8 +8,8 @@ import { export default { scope: '.project-long-description', - clickEdit: clickable('button[name=edit]'), - clickSave: clickable('button[name=save]'), + clickEdit : clickable('button[name=edit]'), + clickSave : clickable('button[name=save]'), textarea: fillable('textarea'), @@ -20,12 +20,12 @@ export default { longDescription: { scope: '.long-description', - text: text(), - isEmpty: hasClass('empty'), + text : text(), + isEmpty : hasClass('empty'), paragraph: { - scope: 'p', - text: text() + scope : 'p', + text : text() } } }; diff --git a/tests/pages/components/project-menu.js b/tests/pages/components/project-menu.js index 85f8dcfd4..c73d90aef 100644 --- a/tests/pages/components/project-menu.js +++ b/tests/pages/components/project-menu.js @@ -7,13 +7,13 @@ export default { scope: '.project-menu', aboutLink: { - scope: 'li:eq(0) a', - href: attribute('href'), - isActive: hasClass('active') + scope : 'li:eq(0) a', + href : attribute('href'), + isActive : hasClass('active') }, tasksLink: { - scope: 'li:eq(1) a', - href: attribute('href'), - isActive: hasClass('active') + scope : 'li:eq(1) a', + href : attribute('href'), + isActive : hasClass('active') } }; diff --git a/tests/pages/components/project-settings-form.js b/tests/pages/components/project-settings-form.js index 206d212c5..a0c5270d6 100644 --- a/tests/pages/components/project-settings-form.js +++ b/tests/pages/components/project-settings-form.js @@ -10,8 +10,8 @@ import removeDoubleQuotes from '../../helpers/remove-double-quotes'; export default { scope: '.project-settings-form', - description: fillable('input[name=description]'), - title: fillable('input[name=title]'), + description : fillable('input[name=description]'), + title : fillable('input[name=title]'), clickSave: clickable('.save'), diff --git a/tests/pages/components/project-task-list.js b/tests/pages/components/project-task-list.js index 1099130f3..79a699cc8 100644 --- a/tests/pages/components/project-task-list.js +++ b/tests/pages/components/project-task-list.js @@ -11,9 +11,9 @@ export default { }), taskItems: collection({ - scope: '.task-item', - itemScope: 'a', - item: { + scope : '.task-item', + itemScope : 'a', + item : { href: attribute('href') } }), diff --git a/tests/pages/components/site-footer.js b/tests/pages/components/site-footer.js index 6d02fd74e..46e9a17e4 100644 --- a/tests/pages/components/site-footer.js +++ b/tests/pages/components/site-footer.js @@ -3,8 +3,8 @@ import { } from 'ember-cli-page-object'; export default { - scope: '.site-footer', - clickLogo: clickable('.footer-logo'), - clickTeamLink: clickable('ul > li:eq(1) li:eq(1) a'), - clickAboutLink: clickable('ul > li:eq(1) li:eq(0) a') + scope : '.site-footer', + clickLogo : clickable('.footer-logo'), + clickTeamLink : clickable('ul > li:eq(1) li:eq(1) a'), + clickAboutLink : clickable('ul > li:eq(1) li:eq(0) a') }; \ No newline at end of file diff --git a/tests/pages/components/user-details.js b/tests/pages/components/user-details.js index 4739bf09e..4978e67e7 100644 --- a/tests/pages/components/user-details.js +++ b/tests/pages/components/user-details.js @@ -10,18 +10,18 @@ export default { scope: '.twitter', link: { - scope: 'a', - href: attribute('href'), - text: text() + scope : 'a', + href : attribute('href'), + text : text() } }, website: { scope: '.website', link: { - scope: 'a', - href: attribute('href'), - text: text() + scope : 'a', + href : attribute('href'), + text : text() } } }; diff --git a/tests/pages/components/user-settings-form.js b/tests/pages/components/user-settings-form.js index bac7c1186..ad0e1e42a 100644 --- a/tests/pages/components/user-settings-form.js +++ b/tests/pages/components/user-settings-form.js @@ -10,11 +10,11 @@ import removeDoubleQuotes from '../../helpers/remove-double-quotes'; export default { scope: '.user-settings-form', - firstName: fillable('input[name=firstName]'), - lastName: fillable('input[name=lastName]'), - twitter: fillable('input[name=twitter]'), - website: fillable('input[name=website]'), - biography: fillable('input[name=biography]'), + firstName : fillable('input[name=firstName]'), + lastName : fillable('input[name=lastName]'), + twitter : fillable('input[name=twitter]'), + website : fillable('input[name=website]'), + biography : fillable('input[name=biography]'), clickSave: clickable('.save'), diff --git a/tests/pages/components/user-skills-input.js b/tests/pages/components/user-skills-input.js index 2c4126d12..46570042f 100644 --- a/tests/pages/components/user-skills-input.js +++ b/tests/pages/components/user-skills-input.js @@ -9,16 +9,16 @@ import { export default { scope: '.user-skills-input', - fillIn: fillable('input'), - focus: triggerable('focus', 'input'), + fillIn : fillable('input'), + focus : triggerable('focus', 'input'), dropdown: collection({ - scope: '.dropdown-menu', - itemScope: 'li', + scope : '.dropdown-menu', + itemScope : 'li', item: { - text: text(), - click: clickable() + text : text(), + click : clickable() } }) }; diff --git a/tests/pages/contributors.js b/tests/pages/contributors.js index c9f19082c..07441ef01 100644 --- a/tests/pages/contributors.js +++ b/tests/pages/contributors.js @@ -9,13 +9,13 @@ import { function buildContributorsDefinitionForIndex(index) { return { - scope: `.contributors-list:eq(${index})`, - emptyMessageVisible: isVisible('.contributors-list-empty'), - members: collection({ - itemScope: '.member-list-item', - item: { - approveMembership: clickable('button.default'), - denyMembership: clickable('button.danger') + scope : `.contributors-list:eq(${index})`, + emptyMessageVisible : isVisible('.contributors-list-empty'), + members : collection({ + itemScope : '.member-list-item', + item : { + approveMembership : clickable('button.default'), + denyMembership : clickable('button.danger') } }) }; @@ -24,17 +24,17 @@ function buildContributorsDefinitionForIndex(index) { export default create({ visit: visitable('/:project_organization_slug/:project_slug/settings/contributors'), - pendingContributors: buildContributorsDefinitionForIndex(0), - owners: buildContributorsDefinitionForIndex(1), - admins: buildContributorsDefinitionForIndex(2), - others: buildContributorsDefinitionForIndex(3), + pendingContributors : buildContributorsDefinitionForIndex(0), + owners : buildContributorsDefinitionForIndex(1), + admins : buildContributorsDefinitionForIndex(2), + others : buildContributorsDefinitionForIndex(3), projectMenu: { - scope: '.project-menu', - contributors: { - scope: '.contributors', - infoVisible: isVisible('.info'), - infoText: text('.info') + scope : '.project-menu', + contributors : { + scope : '.contributors', + infoVisible : isVisible('.info'), + infoText : text('.info') } } }); diff --git a/tests/pages/onboarding.js b/tests/pages/onboarding.js index 025fe3907..ec4ef9e15 100644 --- a/tests/pages/onboarding.js +++ b/tests/pages/onboarding.js @@ -13,48 +13,48 @@ import userSkillsInput from './components/user-skills-input'; import navMenu from './components/navigation-menu'; export default create({ - start: visitable('/start'), - interests: visitable('/start/interests'), - skills: visitable('/start/skills'), - expertise: visitable('/start/expertise'), + start : visitable('/start'), + interests : visitable('/start/interests'), + skills : visitable('/start/skills'), + expertise : visitable('/start/expertise'), - firstName: fillable('[name="firstName"]'), - firstNameEnter: triggerable('keyup', '[name="firstName"]', { eventProperties: { keyCode: 13 } }), - lastName: fillable('[name="lastName"]'), - lastNameEnter: triggerable('keyup', '[name="lastName"]', { eventProperties: { keyCode: 13 } }), - clickCategoryItem: clickable('.category-item button'), - footer: { + firstName : fillable('[name="firstName"]'), + firstNameEnter : triggerable('keyup', '[name="firstName"]', { eventProperties: { keyCode: 13 } }), + lastName : fillable('[name="lastName"]'), + lastNameEnter : triggerable('keyup', '[name="lastName"]', { eventProperties: { keyCode: 13 } }), + clickCategoryItem : clickable('.category-item button'), + footer : { scope: '.site-footer' }, startButton: { - scope: '.start-actions button', - isDisabled: attribute('disabled') + scope : '.start-actions button', + isDisabled : attribute('disabled') }, roles: collection({ itemScope: '.roles-column', item: { - title: text('h3'), - header: { + title : text('h3'), + header : { scope: '.roles-column-header', hasClass }, button: { - scope: 'button', - text: text(), + scope : 'button', + text : text(), hasClass } } }), userSkillsList: collection({ - scope: '.user-skills-list', - itemScope: 'button', - item: { - text: text(), - click: clickable() + scope : '.user-skills-list', + itemScope : 'button', + item : { + text : text(), + click : clickable() } }), diff --git a/tests/pages/organization.js b/tests/pages/organization.js index 3d8d1fbb0..8e19b8986 100644 --- a/tests/pages/organization.js +++ b/tests/pages/organization.js @@ -9,16 +9,16 @@ import { } from 'ember-cli-page-object'; export default create({ - visitIndex: visitable(':organization'), - visitSettingsProfile: visitable('organizations/:organization/settings/profile'), + visitIndex : visitable(':organization'), + visitSettingsProfile : visitable('organizations/:organization/settings/profile'), - name: fillable('[name=name]'), - description: fillable('[name=description]'), - clickSave: clickable('.save'), + name : fillable('[name=name]'), + description : fillable('[name=description]'), + clickSave : clickable('.save'), successAlerts: collection({ - scope: '.alert-success', - item: { + scope : '.alert-success', + item : { scope: 'p' } }), @@ -58,11 +58,11 @@ export default create({ }, projectListItems: collection({ - scope: '.project-list .project-item', - itemScope: 'h4 a', - item: { - text: text(), - click: clickable() + scope : '.project-list .project-item', + itemScope : 'h4 a', + item : { + text : text(), + click : clickable() } }), diff --git a/tests/pages/project/settings/donations.js b/tests/pages/project/settings/donations.js index 9500e0810..3700ba825 100644 --- a/tests/pages/project/settings/donations.js +++ b/tests/pages/project/settings/donations.js @@ -11,7 +11,7 @@ export default create({ clickStripeConnectButton: clickable('.stripe-connect'), stripeConnectButton: { - scope: '.stripe-connect', - href: attribute('href') + scope : '.stripe-connect', + href : attribute('href') } }); diff --git a/tests/pages/project/settings/profile.js b/tests/pages/project/settings/profile.js index a5caec555..58cfe68df 100644 --- a/tests/pages/project/settings/profile.js +++ b/tests/pages/project/settings/profile.js @@ -9,8 +9,8 @@ export default create({ visit: visitable(':organization/:project/settings/profile'), successAlert: { - scope: '.alert-success', - message: text('p') + scope : '.alert-success', + message : text('p') }, projectSettingsForm diff --git a/tests/pages/project/tasks/index.js b/tests/pages/project/tasks/index.js index 2efe00fd1..a47f2d3a3 100644 --- a/tests/pages/project/tasks/index.js +++ b/tests/pages/project/tasks/index.js @@ -11,8 +11,8 @@ import projectTaskList from '../../components/project-task-list'; export default create({ visit: visitable(':organization/:project/tasks'), - clickNewTask: clickable('.new-task'), - clickPreviewTask: clickable('.preview'), + clickNewTask : clickable('.new-task'), + clickPreviewTask : clickable('.preview'), pagerControl, projectDetails, diff --git a/tests/pages/project/tasks/new.js b/tests/pages/project/tasks/new.js index fe7bd71df..49eb6fe24 100644 --- a/tests/pages/project/tasks/new.js +++ b/tests/pages/project/tasks/new.js @@ -11,9 +11,9 @@ export default create({ clickPreviewTask: clickable('.preview'), - taskTitle: fillable('[name=title]'), - taskMarkdown: fillable('[name=markdown]'), - taskType: fillable('[name=task-type]'), + taskTitle : fillable('[name=title]'), + taskMarkdown : fillable('[name=markdown]'), + taskType : fillable('[name=task-type]'), clickSubmit: clickable('[name=submit]'), diff --git a/tests/pages/project/tasks/task.js b/tests/pages/project/tasks/task.js index ef77df1a1..dc716e304 100644 --- a/tests/pages/project/tasks/task.js +++ b/tests/pages/project/tasks/task.js @@ -18,8 +18,8 @@ export default create({ clickSave: clickable('.save'), comments: collection({ - scope: '.task-comment-list', - itemScope: '.comment-item' + scope : '.task-comment-list', + itemScope : '.comment-item' }), editor: { diff --git a/tests/pages/settings-profile.js b/tests/pages/settings-profile.js index a6fa50408..0623f6b31 100644 --- a/tests/pages/settings-profile.js +++ b/tests/pages/settings-profile.js @@ -9,8 +9,8 @@ export default create({ visit: visitable('/settings/profile'), successAlert: { - scope: '.alert-success', - message: text('p') + scope : '.alert-success', + message : text('p') }, userSettingsForm diff --git a/tests/pages/signup.js b/tests/pages/signup.js index eba7fd2e4..81bcf4233 100644 --- a/tests/pages/signup.js +++ b/tests/pages/signup.js @@ -9,10 +9,10 @@ export default create({ visit: visitable('/signup'), form: { - scope: '.signup-form', - email: fillable('[name=email]'), - password: fillable('[name=password]'), - save: clickable('[name=signup]'), - username: fillable('[name=username]') + scope : '.signup-form', + email : fillable('[name=email]'), + password : fillable('[name=password]'), + save : clickable('[name=signup]'), + username : fillable('[name=username]') } }); diff --git a/tests/pages/team.js b/tests/pages/team.js index f5b892be2..8a4e08967 100644 --- a/tests/pages/team.js +++ b/tests/pages/team.js @@ -11,14 +11,14 @@ export default create({ company: { scope: '.company', - header: text('h2'), - items: collection({ scope: 'li' }) + header : text('h2'), + items : collection({ scope: 'li' }) }, contributors: { scope: '.contributors', - header: text('h2'), - items: collection({ scope: 'li' }) + header : text('h2'), + items : collection({ scope: 'li' }) } }); diff --git a/tests/pages/user.js b/tests/pages/user.js index 2f93884ad..6ae2d51f8 100644 --- a/tests/pages/user.js +++ b/tests/pages/user.js @@ -11,11 +11,11 @@ export default create({ visit: visitable(':username'), organizations: collection({ - scope: '.user-organizations-list li', - itemScope: 'h3 a', - item: { - click: clickable(), - href: attribute('href') + scope : '.user-organizations-list li', + itemScope : 'h3 a', + item : { + click : clickable(), + href : attribute('href') } }), diff --git a/tests/unit/abilities/task-test.js b/tests/unit/abilities/task-test.js index 3654ecadb..e45a8413a 100644 --- a/tests/unit/abilities/task-test.js +++ b/tests/unit/abilities/task-test.js @@ -7,16 +7,16 @@ moduleFor('ability:task', 'Unit | Ability | task', { }); test('it can edit task if user is the task author', function(assert) { let ability = this.subject({ - model: Object.create({ user: Object.create({ id: 1 }) }), - currentUser: Object.create({ user: Object.create({ id: 1 }) }) + model : Object.create({ user: Object.create({ id: 1 }) }), + currentUser : Object.create({ user: Object.create({ id: 1 }) }) }); assert.ok(ability.get('canEdit')); }); test('it cannot edit task if user is not the task author', function(assert) { let ability = this.subject({ - model: Object.create({ user: Object.create({ id: 1 }) }), - currentUser: Object.create({ user: Object.create({ id: 2 }) }) + model : Object.create({ user: Object.create({ id: 1 }) }), + currentUser : Object.create({ user: Object.create({ id: 2 }) }) }); assert.notOk(ability.get('canEdit')); }); diff --git a/tests/unit/utils/mention-parser-test.js b/tests/unit/utils/mention-parser-test.js index 25ef1d53e..475f2bb5c 100644 --- a/tests/unit/utils/mention-parser-test.js +++ b/tests/unit/utils/mention-parser-test.js @@ -13,15 +13,15 @@ test('it replaces all "@username" mention strings with links to the user profile let mentions = [ Object.create({ - indices: [14, 19], - username: 'user1', - user: { id: 1 } + indices : [14, 19], + username : 'user1', + user : { id: 1 } }), Object.create({ - indices: [25, 30], - username: 'user2', - user: { id: 2 } + indices : [25, 30], + username : 'user2', + user : { id: 2 } }) ];