From 3f030c151f44f06308370b65c8578938e907fbb7 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Sun, 14 Aug 2016 16:14:45 -0400 Subject: [PATCH 01/11] Updates two more #each deprecations --- app/templates/joint-rounds.hbs | 2 +- app/templates/turns.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/joint-rounds.hbs b/app/templates/joint-rounds.hbs index b9885a8..c3bcad2 100644 --- a/app/templates/joint-rounds.hbs +++ b/app/templates/joint-rounds.hbs @@ -16,7 +16,7 @@ - {{#each round in model}} + {{#each model as |round|}} {{#link-to "round" round.id tagName="tr" classNames="u-pointer"}} {{round.courseName}} diff --git a/app/templates/turns.hbs b/app/templates/turns.hbs index 6b7b905..f5ed58b 100644 --- a/app/templates/turns.hbs +++ b/app/templates/turns.hbs @@ -19,7 +19,7 @@ -{{#each controller as |turn|}} +{{#each model as |turn|}}
{{#if turn.scorecard.hasUserAvatar}} From 619a475e37904ccecf82b52ec9699737f116aa2a Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Sun, 14 Aug 2016 16:22:30 -0400 Subject: [PATCH 02/11] Upgrades to newer pagination (older used deprecated code from ember) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c54f96..7913909 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "ember-cli-ic-ajax": "0.2.4", "ember-cli-inject-live-reload": "^1.3.1", "ember-cli-mirage": "0.2.1", - "ember-cli-pagination": "^0.6.6", + "ember-cli-pagination": "0.9.0", "ember-cli-qunit": "^1.0.4", "ember-cli-release": "0.2.8", "ember-cli-sri": "^1.2.0", From 9fbedb082b32a8baf0032b7d1e7c4d292078317f Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Mon, 15 Aug 2016 17:49:54 -0400 Subject: [PATCH 03/11] Moves towards heroku, and thereby removes silent errors deprecation --- README.md | 7 ------- ember-cli-build.js | 4 +--- package.json | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index 2347442..b290354 100644 --- a/README.md +++ b/README.md @@ -43,13 +43,6 @@ Make use of the many generators for code, try `ember help generate` for more det * `ember build` (development) * `ember build --environment production` (production) -### Deploying - -You'll need to set up `deploy.json` and put in your app's main directory. - -* `ember deploy --environment production` -* `ember deploy:activate --revision frolfr-client:REVISION_SHA --environment production` - ## Further Reading / Useful Links * [ember.js](http://emberjs.com/) diff --git a/ember-cli-build.js b/ember-cli-build.js index 93a33d2..67601d9 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -4,9 +4,7 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { var app = new EmberApp(defaults, { - fingerprint: { - prepend: "http://s3.amazonaws.com/frolfr-assets/" - } + // }); var pickFiles = require('broccoli-static-compiler'); diff --git a/package.json b/package.json index 7913909..bf346fb 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,6 @@ "ember-cli-sri": "^1.2.0", "ember-cli-uglify": "^1.2.0", "ember-data": "1.13.15", - "ember-deploy": "^0.3.1", - "ember-deploy-s3": "0.0.3", - "ember-deploy-s3-index": "^0.2.0", "ember-disable-proxy-controllers": "^1.0.1", "ember-export-application-global": "^1.0.4", "express": "^4.8.5", From 15cda64d73983a89c94b86acda5f5f091999a9ad Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Tue, 16 Aug 2016 11:11:05 -0400 Subject: [PATCH 04/11] Cleans up helper deprecation http://emberjs.com/deprecations/v1.x/#toc_handlebars-htmlbars-helpers --- app/helpers/display-date.js | 2 +- app/helpers/display-score.js | 2 +- app/helpers/formatted-address.js | 7 ------- app/helpers/ranking-from-index.js | 2 +- tests/unit/helpers/formatted-address-test.js | 12 ------------ 5 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 app/helpers/formatted-address.js delete mode 100644 tests/unit/helpers/formatted-address-test.js diff --git a/app/helpers/display-date.js b/app/helpers/display-date.js index 342ee14..6034219 100644 --- a/app/helpers/display-date.js +++ b/app/helpers/display-date.js @@ -1,6 +1,6 @@ import Ember from 'ember'; /* global moment */ -export default Ember.Handlebars.makeBoundHelper(function(value) { +export default Ember.Helper.helper(function([value]) { return moment(value).format('dddd, MMM Do YYYY'); }); diff --git a/app/helpers/display-score.js b/app/helpers/display-score.js index c93857c..8d092e0 100644 --- a/app/helpers/display-score.js +++ b/app/helpers/display-score.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -export default Ember.Handlebars.makeBoundHelper(function(score) { +export default Ember.Helper.helper(function([score]) { if (score > 0) { return "+" + score; } else if (Math.abs(score) === 0) { diff --git a/app/helpers/formatted-address.js b/app/helpers/formatted-address.js deleted file mode 100644 index c09296b..0000000 --- a/app/helpers/formatted-address.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export function formattedAddress(input) { - return input; -} - -export default Ember.Handlebars.makeBoundHelper(formattedAddress); diff --git a/app/helpers/ranking-from-index.js b/app/helpers/ranking-from-index.js index 481a0e2..87c190c 100644 --- a/app/helpers/ranking-from-index.js +++ b/app/helpers/ranking-from-index.js @@ -1,5 +1,5 @@ import Ember from 'ember'; -export default Ember.Handlebars.makeBoundHelper(function(index) { +export default Ember.Helper.helper(function([index]) { return index + 1 + "."; }); diff --git a/tests/unit/helpers/formatted-address-test.js b/tests/unit/helpers/formatted-address-test.js deleted file mode 100644 index 43950c8..0000000 --- a/tests/unit/helpers/formatted-address-test.js +++ /dev/null @@ -1,12 +0,0 @@ -import { - formattedAddress -} from '../../../helpers/formatted-address'; -import { module, test } from 'qunit'; - -module('FormattedAddressHelper'); - -// Replace this with your real tests. -test('it works', function(assert) { - var result = formattedAddress(42); - assert.ok(result); -}); From b0b563f126fd485d0f96cfd719ca29dce206c0c6 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Wed, 17 Aug 2016 14:31:43 -0400 Subject: [PATCH 05/11] Removes unused public round model/controller/functions/etc --- app/controllers/public-round.js | 22 ---------------------- app/controllers/round.js | 18 +----------------- app/models/public-round.js | 5 ----- app/models/round.js | 1 - app/router.js | 1 - app/routes/public-round.js | 9 --------- app/templates/public-round.hbs | 8 -------- 7 files changed, 1 insertion(+), 63 deletions(-) delete mode 100644 app/controllers/public-round.js delete mode 100644 app/models/public-round.js delete mode 100644 app/routes/public-round.js delete mode 100644 app/templates/public-round.hbs diff --git a/app/controllers/public-round.js b/app/controllers/public-round.js deleted file mode 100644 index 428d8b6..0000000 --- a/app/controllers/public-round.js +++ /dev/null @@ -1,22 +0,0 @@ -import Ember from 'ember'; - -var PublicRoundController = Ember.ObjectController.extend({ - columnWidth: function() { - var scorecardColumns = this.get('scorecards.length'); - var scorecardColumnPercentage = 100 / scorecardColumns; - - return 'width: ' + scorecardColumnPercentage + '%;'; - }.property('scorecards.length'), - - holeNumbers: function() { - var turnsCount = this.get('scorecards.firstObject.turns.length'); - var holeNumbers = new Array(turnsCount) - .join().split(',') - .map(function(item, index){ return ++index; }); - - return holeNumbers; - }.property('scorecards.firstObject.turns.length') - -}); - -export default PublicRoundController; diff --git a/app/controllers/round.js b/app/controllers/round.js index 1940dd6..6719d26 100644 --- a/app/controllers/round.js +++ b/app/controllers/round.js @@ -1,21 +1,5 @@ import Ember from 'ember'; -var RoundController = Ember.ObjectController.extend({ - publicRoundUrl: function () { - return 'http://frolfr.com/public/rounds/' + this.get('model.id'); - }.property(), - - actions: { - makePrivate: function() { - this.get('model').set('publicRecap', false); - this.get('model').save(); - }, - - publish: function() { - this.get('model').set('publicRecap', true); - this.get('model').save(); - } - } -}); +var RoundController = Ember.Controller.extend({}); export default RoundController; diff --git a/app/models/public-round.js b/app/models/public-round.js deleted file mode 100644 index f3cf41e..0000000 --- a/app/models/public-round.js +++ /dev/null @@ -1,5 +0,0 @@ -import Round from './round'; - -var PublicRound = Round.extend(); - -export default PublicRound; diff --git a/app/models/round.js b/app/models/round.js index e295e5a..fbc0edb 100644 --- a/app/models/round.js +++ b/app/models/round.js @@ -6,7 +6,6 @@ var Round = DS.Model.extend({ scorecards: DS.hasMany('scorecard', {async: true}), course: DS.belongsTo('course', {async: true}), holeCount: DS.attr('string'), - publicRecap: DS.attr('boolean'), isStarted: function() { return this.get('scorecards').any(function (scorecard) { diff --git a/app/router.js b/app/router.js index d34c49d..b61f939 100644 --- a/app/router.js +++ b/app/router.js @@ -7,7 +7,6 @@ const Router = Ember.Router.extend({ Router.map(function() { this.route('welcome'); - this.resource('publicRound', { path: '/public/rounds/:id' }); this.resource('sessions', function() { this.route('login'); }); diff --git a/app/routes/public-round.js b/app/routes/public-round.js deleted file mode 100644 index e1999d2..0000000 --- a/app/routes/public-round.js +++ /dev/null @@ -1,9 +0,0 @@ -import Ember from 'ember'; - -var PublicRoundRoute = Ember.Route.extend({ - model: function(params) { - return this.store.find('publicRound', params.id); - } -}); - -export default PublicRoundRoute; diff --git a/app/templates/public-round.hbs b/app/templates/public-round.hbs deleted file mode 100644 index cb41ae5..0000000 --- a/app/templates/public-round.hbs +++ /dev/null @@ -1,8 +0,0 @@ -
-
-

{{courseName}}

-
{{display-date createdAt}}
-
-
- -{{scorecards-table scorecards=scorecards holeNumbers=holeNumbers hasHoleLinks=false}} From 80d9fcd013fc2b3adca4477e3f0f6ef73cbf5522 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Wed, 17 Aug 2016 15:22:32 -0400 Subject: [PATCH 06/11] Changes all ObjectControllers to Controller * Except current user, which is a particularly tricky transition --- app/controllers/courses/new.js | 2 +- app/controllers/current-user.js | 1 + app/controllers/password/edit.js | 7 ++++--- app/controllers/profile/settings.js | 2 +- app/controllers/review/edit.js | 2 +- app/controllers/reviews/index.js | 2 +- app/controllers/reviews/new.js | 2 +- app/controllers/round/index.js | 10 +++++----- app/controllers/rounds/new.js | 10 +++++----- app/controllers/users/new.js | 8 ++++---- app/templates/courses/new.hbs | 8 ++++---- app/templates/password/edit.hbs | 6 +++--- app/templates/profile/settings.hbs | 14 +++++++------- app/templates/review/edit.hbs | 8 ++++---- app/templates/reviews/new.hbs | 4 ++-- app/templates/round/index.hbs | 6 +++--- app/templates/rounds/new.hbs | 4 ++-- app/templates/users/new.hbs | 12 ++++++------ 18 files changed, 55 insertions(+), 53 deletions(-) diff --git a/app/controllers/courses/new.js b/app/controllers/courses/new.js index 96b491d..021a43b 100644 --- a/app/controllers/courses/new.js +++ b/app/controllers/courses/new.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var CoursesNewController = Ember.ObjectController.extend({ +var CoursesNewController = Ember.Controller.extend({ stateAbbreviations: ["","AK","AL","AR","AZ","CA","CO", "CT","DC","DE","FL","GA","GU","HI","IA","ID","IL", "IN","KS","KY","LA","MA","MD","ME","MH","MI","MN", diff --git a/app/controllers/current-user.js b/app/controllers/current-user.js index 5934e3c..fb3c0a7 100644 --- a/app/controllers/current-user.js +++ b/app/controllers/current-user.js @@ -1,5 +1,6 @@ import Ember from 'ember'; +// TODO: Update to simply 'Controller' after getting rid of janky auth var CurrentUserController = Ember.ObjectController.extend({ isAuthenticated: function() { return this.get('model.isLoaded'); diff --git a/app/controllers/password/edit.js b/app/controllers/password/edit.js index 6bae07e..dc82b51 100644 --- a/app/controllers/password/edit.js +++ b/app/controllers/password/edit.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var PasswordEditController = Ember.ObjectController.extend({ +var PasswordEditController = Ember.Controller.extend({ needs: "sessions", showPasswordError: false, @@ -8,12 +8,13 @@ var PasswordEditController = Ember.ObjectController.extend({ changePassword: function() { var _this = this, password = this.get('model'), - isValidPassword = this.get('password') === this.get('passwordConfirmation'); + isValidPassword = password.get('password') === password.get('passwordConfirmation'); if (isValidPassword) { password.save().then(function(user) { var email = user.get('email'), - password = _this.get('password'); + password = user.get('password'); + _this.get('controllers.sessions').send('loginWithCredentials', email, password); }); } else { diff --git a/app/controllers/profile/settings.js b/app/controllers/profile/settings.js index 1c6bee3..d4c1373 100644 --- a/app/controllers/profile/settings.js +++ b/app/controllers/profile/settings.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var ProfileSettingsController = Ember.ObjectController.extend({ +var ProfileSettingsController = Ember.Controller.extend({ actions: { saveChanges: function() { this.get('model').save(); diff --git a/app/controllers/review/edit.js b/app/controllers/review/edit.js index 87954b4..8647a23 100644 --- a/app/controllers/review/edit.js +++ b/app/controllers/review/edit.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var ReviewEditController = Ember.ObjectController.extend({ +var ReviewEditController = Ember.Controller.extend({ ratingChoices: [1,2,3,4,5,6,7,8,9,10], actions: { diff --git a/app/controllers/reviews/index.js b/app/controllers/reviews/index.js index 41cb6e3..29f1956 100644 --- a/app/controllers/reviews/index.js +++ b/app/controllers/reviews/index.js @@ -15,7 +15,7 @@ var ReviewsIndexController = Ember.ArrayController.extend({ isAlreadyReviewed: function () { var currentUserId = this.get('currentUser.id'), - currentUserReview = this.get('content').findBy('user.id', currentUserId); + currentUserReview = this.get('content').findBy('model.user.id', currentUserId); return !!currentUserReview; }.property('content'), diff --git a/app/controllers/reviews/new.js b/app/controllers/reviews/new.js index 27e2537..cc0776f 100644 --- a/app/controllers/reviews/new.js +++ b/app/controllers/reviews/new.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var ReviewsNewController = Ember.ObjectController.extend({ +var ReviewsNewController = Ember.Controller.extend({ ratingChoices: [1,2,3,4,5,6,7,8,9,10], diff --git a/app/controllers/round/index.js b/app/controllers/round/index.js index bdd4614..f165934 100644 --- a/app/controllers/round/index.js +++ b/app/controllers/round/index.js @@ -1,21 +1,21 @@ import Ember from 'ember'; -var RoundIndexController = Ember.ObjectController.extend({ +var RoundIndexController = Ember.Controller.extend({ columnWidth: function() { - var scorecardColumns = this.get('scorecards.length'); + var scorecardColumns = this.get('model.scorecards.length'); var scorecardColumnPercentage = 100 / scorecardColumns; return 'width: ' + scorecardColumnPercentage + '%;'; - }.property('scorecards.length'), + }.property('model.scorecards.length'), holeNumbers: function() { - var turnsCount = this.get('scorecards.firstObject.turns.length'); + var turnsCount = this.get('model.scorecards.firstObject.turns.length'); var holeNumbers = new Array(turnsCount) .join().split(',') .map(function(item, index){ return ++index; }); return holeNumbers; - }.property('scorecards.firstObject.turns.length') + }.property('model.scorecards.firstObject.turns.length') }); diff --git a/app/controllers/rounds/new.js b/app/controllers/rounds/new.js index 832d25a..d955d76 100644 --- a/app/controllers/rounds/new.js +++ b/app/controllers/rounds/new.js @@ -1,17 +1,17 @@ import Ember from 'ember'; -var RoundsNewController = Ember.ObjectController.extend({ +var RoundsNewController = Ember.Controller.extend({ selectedPlayer: null, query: null, nearestCourses: false, potentialPlayers: function() { var friends = this.get('friends'); - var players = this.get('players'); + var players = this.get('model.players'); players.forEach(function(p) { friends.removeObject(p); }); return friends; - }.property('friends.@each', 'players.@each'), + }.property('friends.@each', 'model.players.@each'), noPlayerSelected: function() { @@ -20,13 +20,13 @@ var RoundsNewController = Ember.ObjectController.extend({ actions: { addPlayer: function() { - this.get('players').addObject(this.get('selectedPlayer')); + this.get('model.players').addObject(this.get('selectedPlayer')); this.set('selectedPlayer', null); this.set('query', null); }, removePlayer: function(player) { - this.get('players').removeObject(player); + this.get('model.players').removeObject(player); }, updateCourseInput: function(nearestCourse) { diff --git a/app/controllers/users/new.js b/app/controllers/users/new.js index 7d13ff1..18d2a6c 100644 --- a/app/controllers/users/new.js +++ b/app/controllers/users/new.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var UsersNewController = Ember.ObjectController.extend({ +var UsersNewController = Ember.Controller.extend({ needs: "sessions", actions: { @@ -9,9 +9,9 @@ var UsersNewController = Ember.ObjectController.extend({ user = this.get('model'); if (user.get('hasValidPassword')) { - user.save().then(function() { - var email = self.get('email'), - password = self.get('password'); + user.save().then(function(user) { + var email = user.get('email'), + password = user.get('password'); self.get('controllers.sessions').send("loginWithCredentials", email, password); }); diff --git a/app/templates/courses/new.hbs b/app/templates/courses/new.hbs index 3966456..70f0664 100644 --- a/app/templates/courses/new.hbs +++ b/app/templates/courses/new.hbs @@ -7,25 +7,25 @@ - {{input value=name type="text" id="name" required=true classNames="form-control"}} + {{input value=model.name type="text" id="name" required=true classNames="form-control"}}
- {{input value=city type="text" id="city" required=true classNames="form-control"}} + {{input value=model.city type="text" id="city" required=true classNames="form-control"}}
- {{view "select" content=stateAbbreviations value=state required=true classNames="form-control"}} + {{view "select" content=stateAbbreviations value=model.state required=true classNames="form-control"}}
- {{input value=holeCount type="number" id="holeCount" required=true min=9 max=27 classNames="form-control"}} + {{input value=model.holeCount type="number" id="holeCount" required=true min=9 max=27 classNames="form-control"}}

For now, Frolfr only supports U.S. courses diff --git a/app/templates/password/edit.hbs b/app/templates/password/edit.hbs index ad734ec..8779c87 100644 --- a/app/templates/password/edit.hbs +++ b/app/templates/password/edit.hbs @@ -7,13 +7,13 @@ - {{input value=password type="password" id="password" required=true classNames="form-control"}} + {{input value=model.password type="password" id="password" required=true classNames="form-control"}}

- {{input value=passwordConfirmation type="password" id="passwordConfirmation" required=true classNames="form-control"}} + {{input value=model.passwordConfirmation type="password" id="passwordConfirmation" required=true classNames="form-control"}}
{{#if showPasswordError}}

@@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/app/templates/profile/settings.hbs b/app/templates/profile/settings.hbs index 7ec0864..399c8db 100644 --- a/app/templates/profile/settings.hbs +++ b/app/templates/profile/settings.hbs @@ -9,28 +9,28 @@ - {{input value=firstName type="text" id="firstName" required=true classNames="form-control"}} + {{input value=model.firstName type="text" id="firstName" required=true classNames="form-control"}}

- {{input value=middleName type="text" id="middleName" classNames="form-control"}} + {{input value=model.middleName type="text" id="middleName" classNames="form-control"}}
- {{input value=lastName type="text" id="lastName" required=true classNames="form-control"}} + {{input value=model.lastName type="text" id="lastName" required=true classNames="form-control"}}
-
-
@@ -42,9 +42,9 @@

Avatar

-{{#if hasAvatar}} +{{#if model.hasAvatar}}
- +
{{else}}

diff --git a/app/templates/review/edit.hbs b/app/templates/review/edit.hbs index d2644cf..25a72d6 100644 --- a/app/templates/review/edit.hbs +++ b/app/templates/review/edit.hbs @@ -3,22 +3,22 @@

- {{view Ember.Select content=ratingChoices value=rating required=true prompt="Select Rating" classNames='form-control'}} + {{view Ember.Select content=ratingChoices value=model.rating required=true prompt="Select Rating" classNames='form-control'}}
- {{textarea value=post required=true classNames='form-control' rows=10}} + {{textarea value=model.post required=true classNames='form-control' rows=10}}
-
-
diff --git a/app/templates/reviews/new.hbs b/app/templates/reviews/new.hbs index b8d9cc4..f74e377 100644 --- a/app/templates/reviews/new.hbs +++ b/app/templates/reviews/new.hbs @@ -2,11 +2,11 @@
- {{view Ember.Select content=ratingChoices value=rating required=true prompt="Select Rating" classNames='form-control'}} + {{view Ember.Select content=ratingChoices value=model.rating required=true prompt="Select Rating" classNames='form-control'}}
- {{textarea value=post required=true classNames='form-control' rows=10}} + {{textarea value=model.post required=true classNames='form-control' rows=10}}
diff --git a/app/templates/round/index.hbs b/app/templates/round/index.hbs index 914c7bb..d2fc30c 100644 --- a/app/templates/round/index.hbs +++ b/app/templates/round/index.hbs @@ -1,8 +1,8 @@
-

{{courseName}}

-
{{display-date createdAt}}
+

{{model.courseName}}

+
{{display-date model.createdAt}}
-{{scorecards-table scorecards=scorecards holeNumbers=holeNumbers hasHoleLinks=true}} +{{scorecards-table scorecards=model.scorecards holeNumbers=holeNumbers hasHoleLinks=true}} diff --git a/app/templates/rounds/new.hbs b/app/templates/rounds/new.hbs index 9bf7f4a..18c54bb 100644 --- a/app/templates/rounds/new.hbs +++ b/app/templates/rounds/new.hbs @@ -18,7 +18,7 @@ - {{view "select" content=courses selection=course.content optionValuePath="content.id" optionLabelPath="content.name" prompt="Select Course" id="course" required=true classNames="form-control"}} + {{view "select" content=courses selection=model.course.content optionValuePath="content.id" optionLabelPath="content.name" prompt="Select Course" id="course" required=true classNames="form-control"}}

Can't see the course you're looking for? Why not @@ -50,7 +50,7 @@ {{currentUser.fullName}}

- {{#each players as |player|}} + {{#each model.players as |player|}}
{{#if player.hasAvatar}} diff --git a/app/templates/users/new.hbs b/app/templates/users/new.hbs index 9021bd5..a5843d5 100644 --- a/app/templates/users/new.hbs +++ b/app/templates/users/new.hbs @@ -7,25 +7,25 @@ - {{input value=firstName type="text" id="firstName" required=true classNames="form-control"}} + {{input value=model.firstName type="text" id="firstName" required=true classNames="form-control"}}
- {{input value=middleName type="text" id="middleName" classNames="form-control"}} + {{input value=model.middleName type="text" id="middleName" classNames="form-control"}}
- {{input value=lastName type="text" id="lastName" required=true classNames="form-control"}} + {{input value=model.lastName type="text" id="lastName" required=true classNames="form-control"}}
- {{input value=email type="text" id="email" required=true classNames="form-control"}} + {{input value=model.email type="text" id="email" required=true classNames="form-control"}} {{#each model.errors.email as |error|}}
{{error.message}} @@ -36,13 +36,13 @@ - {{input value=password type="password" id="password" required=true classNames="form-control"}} + {{input value=model.password type="password" id="password" required=true classNames="form-control"}}
- {{input value=passwordConfirmation type="password" id="passwordConfirmation" required=true classNames="form-control"}} + {{input value=model.passwordConfirmation type="password" id="passwordConfirmation" required=true classNames="form-control"}}
{{#if showPasswordError}}

From c6f5f35ee08091c988a7ce56db25b49628ca7688 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Wed, 17 Aug 2016 15:52:49 -0400 Subject: [PATCH 07/11] Cleans up several ArrayController's to Controller * Except reviews and course rounds --- app/controllers/course-rounds.js | 1 + app/controllers/courses/index.js | 2 +- app/controllers/friendable-users.js | 2 +- app/controllers/friends.js | 2 +- app/controllers/turns.js | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/course-rounds.js b/app/controllers/course-rounds.js index 70ce5e0..6997225 100644 --- a/app/controllers/course-rounds.js +++ b/app/controllers/course-rounds.js @@ -1,5 +1,6 @@ import Ember from 'ember'; +// TODO: Change to just Controller var CourseRoundsController = Ember.ArrayController.extend({ // Pagination page: 1, diff --git a/app/controllers/courses/index.js b/app/controllers/courses/index.js index 4a9124d..47a1dfa 100644 --- a/app/controllers/courses/index.js +++ b/app/controllers/courses/index.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var CoursesIndexController = Ember.ArrayController.extend({ +var CoursesIndexController = Ember.Controller.extend({ queryParams: ["page"], pageBinding: "content.page", diff --git a/app/controllers/friendable-users.js b/app/controllers/friendable-users.js index 28a7e43..bee17ee 100644 --- a/app/controllers/friendable-users.js +++ b/app/controllers/friendable-users.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var FriendableUsersController = Ember.ArrayController.extend({ +var FriendableUsersController = Ember.Controller.extend({ selection: null, query: null, diff --git a/app/controllers/friends.js b/app/controllers/friends.js index 7149e1c..cfe3438 100644 --- a/app/controllers/friends.js +++ b/app/controllers/friends.js @@ -1,7 +1,7 @@ import Ember from 'ember'; import pagedArray from 'ember-cli-pagination/computed/paged-array'; -var FriendsController = Ember.ArrayController.extend({ +var FriendsController = Ember.Controller.extend({ pagedContent: pagedArray("content", {infinite: true}), hasNextPage: function() { diff --git a/app/controllers/turns.js b/app/controllers/turns.js index 56c7cb5..985461b 100644 --- a/app/controllers/turns.js +++ b/app/controllers/turns.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -var TurnsController = Ember.ArrayController.extend({ +var TurnsController = Ember.Controller.extend({ holeNumber: Ember.computed.alias('model.firstObject.holeNumber'), holePar: Ember.computed.alias('model.firstObject.par'), From db70f702810bd4cd2537319d5d8941b217c68825 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Wed, 17 Aug 2016 16:00:20 -0400 Subject: [PATCH 08/11] Removes all review-related code This is the least-used and least-relevant feature on the app --- app/controllers/review/edit.js | 22 ---------------- app/controllers/reviews/index.js | 37 --------------------------- app/controllers/reviews/new.js | 19 -------------- app/models/course.js | 1 - app/models/review.js | 15 ----------- app/router.js | 6 ----- app/routes/review.js | 9 ------- app/routes/reviews/index.js | 9 ------- app/routes/reviews/new.js | 13 ---------- app/styles/app.scss | 1 - app/styles/reviews.scss | 12 --------- app/templates/course.hbs | 9 ------- app/templates/review/edit.hbs | 26 ------------------- app/templates/reviews.hbs | 1 - app/templates/reviews/index.hbs | 44 -------------------------------- app/templates/reviews/new.hbs | 12 --------- tests/unit/models/course-test.js | 10 +------- 17 files changed, 1 insertion(+), 245 deletions(-) delete mode 100644 app/controllers/review/edit.js delete mode 100644 app/controllers/reviews/index.js delete mode 100644 app/controllers/reviews/new.js delete mode 100644 app/models/review.js delete mode 100644 app/routes/review.js delete mode 100644 app/routes/reviews/index.js delete mode 100644 app/routes/reviews/new.js delete mode 100644 app/styles/reviews.scss delete mode 100644 app/templates/review/edit.hbs delete mode 100644 app/templates/reviews.hbs delete mode 100644 app/templates/reviews/index.hbs delete mode 100644 app/templates/reviews/new.hbs diff --git a/app/controllers/review/edit.js b/app/controllers/review/edit.js deleted file mode 100644 index 8647a23..0000000 --- a/app/controllers/review/edit.js +++ /dev/null @@ -1,22 +0,0 @@ -import Ember from 'ember'; - -var ReviewEditController = Ember.Controller.extend({ - ratingChoices: [1,2,3,4,5,6,7,8,9,10], - - actions: { - saveChanges: function () { - var _this = this; - var review = this.get('model'); - review.save().then(function () { - _this.transitionToRoute('reviews.index'); - }); - }, - - cancel: function() { - this.get('model').rollback(); - } - } - -}); - -export default ReviewEditController; diff --git a/app/controllers/reviews/index.js b/app/controllers/reviews/index.js deleted file mode 100644 index 29f1956..0000000 --- a/app/controllers/reviews/index.js +++ /dev/null @@ -1,37 +0,0 @@ -import Ember from 'ember'; - -var ReviewsIndexController = Ember.ArrayController.extend({ - needs: ['currentUser'], - currentUser: Ember.computed.alias('controllers.currentUser'), - - sortProperties: ['createdAt'], - sortAscending: false, - - filteredReviews: function() { - return this.get('arrangedContent').filter(function(review) { - return !review.get('isDirty'); - }); - }.property('arrangedContent.@each.isDirty'), - - isAlreadyReviewed: function () { - var currentUserId = this.get('currentUser.id'), - currentUserReview = this.get('content').findBy('model.user.id', currentUserId); - - return !!currentUserReview; - }.property('content'), - - averageRating: function() { - var sumOfRatings = this.get('filteredReviews').reduce(function (total, review) { - return total + review.get('rating'); - }, 0), - reviewsCount = this.get('filteredReviews').length; - - return sumOfRatings / reviewsCount; - }.property('filteredReviews.@each.rating'), - - averageRatingRoundedToNearestHalf: function() { - return (Math.round(this.get('averageRating') * 2) / 2).toFixed(1); - }.property('averageRating') -}); - -export default ReviewsIndexController; diff --git a/app/controllers/reviews/new.js b/app/controllers/reviews/new.js deleted file mode 100644 index cc0776f..0000000 --- a/app/controllers/reviews/new.js +++ /dev/null @@ -1,19 +0,0 @@ -import Ember from 'ember'; - -var ReviewsNewController = Ember.Controller.extend({ - - ratingChoices: [1,2,3,4,5,6,7,8,9,10], - - actions: { - submitReview: function () { - var _this = this; - var review = this.get('content'); - review.save().then(function () { - _this.transitionToRoute('reviews.index'); - }); - } - } - -}); - -export default ReviewsNewController; diff --git a/app/models/course.js b/app/models/course.js index a1949d7..71fdc64 100644 --- a/app/models/course.js +++ b/app/models/course.js @@ -12,7 +12,6 @@ var Course = DS.Model.extend({ scorecards: DS.hasMany('scorecard', { async: true }), holes: DS.hasMany('hole', { async: true }), holeCount: DS.attr('number'), - reviews: DS.hasMany('review', { async: true }), photos: DS.hasMany('photo', {async: true}), isApproved: function() { diff --git a/app/models/review.js b/app/models/review.js deleted file mode 100644 index ce5cc4f..0000000 --- a/app/models/review.js +++ /dev/null @@ -1,15 +0,0 @@ -import DS from 'ember-data'; -import Ember from 'ember'; - -var Review = DS.Model.extend({ - rating: DS.attr('number'), - canUpdate: DS.attr('boolean'), - post: DS.attr('string'), - course: DS.belongsTo('course', { async: true }), - user: DS.belongsTo('user', { async: true }), - createdAt: DS.attr('date'), - - userFullName: Ember.computed.alias('user.fullName') -}); - -export default Review; diff --git a/app/router.js b/app/router.js index b61f939..1a43908 100644 --- a/app/router.js +++ b/app/router.js @@ -18,12 +18,6 @@ Router.map(function() { this.resource('courseRounds', { path: '/rounds' }); this.resource('courseStatLog', { path: '/stats' }); this.resource('holeStatLogs', { path: '/holes' }); - this.resource('reviews', function() { - this.route('new'); - }); - this.resource('review', { path: '/reviews/:review_id' }, function() { - this.route('edit'); - }); }); this.resource('friends'); this.resource('profile', function() { diff --git a/app/routes/review.js b/app/routes/review.js deleted file mode 100644 index 645f2a7..0000000 --- a/app/routes/review.js +++ /dev/null @@ -1,9 +0,0 @@ -import AuthenticatedRoute from './authenticated'; - -var ReviewRoute = AuthenticatedRoute.extend({ - model: function(params) { - return this.store.find('review', params.review_id); - } -}); - -export default ReviewRoute; diff --git a/app/routes/reviews/index.js b/app/routes/reviews/index.js deleted file mode 100644 index 0cc9c5e..0000000 --- a/app/routes/reviews/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import AuthenticatedRoute from '../authenticated'; - -var ReviewsIndexRoute = AuthenticatedRoute.extend({ - model: function() { - return this.modelFor('course').get('reviews'); - } -}); - -export default ReviewsIndexRoute; diff --git a/app/routes/reviews/new.js b/app/routes/reviews/new.js deleted file mode 100644 index 76b34fb..0000000 --- a/app/routes/reviews/new.js +++ /dev/null @@ -1,13 +0,0 @@ -import AuthenticatedRoute from '../authenticated'; - -var ReviewsNewRoute = AuthenticatedRoute.extend({ - - model: function() { - return this.store.createRecord('review', { - course: this.modelFor('course') - }); - } - -}); - -export default ReviewsNewRoute; diff --git a/app/styles/app.scss b/app/styles/app.scss index 68dcddd..888db89 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -12,7 +12,6 @@ @import "flatboot"; @import "variables_and_overrides"; @import "round-show-table"; -@import "reviews"; @import "twitter-typeahead"; @import "block-grids"; @import "turns"; diff --git a/app/styles/reviews.scss b/app/styles/reviews.scss deleted file mode 100644 index a267f91..0000000 --- a/app/styles/reviews.scss +++ /dev/null @@ -1,12 +0,0 @@ -.review-header { - background-color: #fafafa; - padding: 5px; -} - -.review-body { - padding: 5px; -} - -.review { - margin-bottom: 10px; -} diff --git a/app/templates/course.hbs b/app/templates/course.hbs index 37c1323..af403ff 100644 --- a/app/templates/course.hbs +++ b/app/templates/course.hbs @@ -37,15 +37,6 @@ {{/link-to}} - {{#link-to "reviews" tagName="li" classNames="u-pointer"}} - - - - - - {{/link-to}} {{#link-to "leaderboard" tagName="li" classNames="u-pointer"}}

Edit Review

-
- -
- - {{view Ember.Select content=ratingChoices value=model.rating required=true prompt="Select Rating" classNames='form-control'}} -
- -
- - {{textarea value=model.post required=true classNames='form-control' rows=10}} -
- -
-
- -
-
- -
-
-
diff --git a/app/templates/reviews.hbs b/app/templates/reviews.hbs deleted file mode 100644 index c24cd68..0000000 --- a/app/templates/reviews.hbs +++ /dev/null @@ -1 +0,0 @@ -{{outlet}} diff --git a/app/templates/reviews/index.hbs b/app/templates/reviews/index.hbs deleted file mode 100644 index 682ecb5..0000000 --- a/app/templates/reviews/index.hbs +++ /dev/null @@ -1,44 +0,0 @@ -

Reviews

- -{{#if filteredReviews}} -
- Average Rating:

{{averageRatingRoundedToNearestHalf}} / 10

-
- -
- {{#unless isAlreadyReviewed}} - {{link-to "Add a New Review" 'reviews.new'}} - {{/unless}} -
-
    - {{#each filteredReviews as |review|}} -
  • -
    -
    - {{#if review.user.hasAvatar}} - - {{else}} - - {{/if}} -
    - {{review.rating}} / 10 -
    -
    -
    - {{review.userFullName}} reviewed on {{display-date review.createdAt}} -
    -
    - -
    -

    {{review.post}}

    - {{#if review.canUpdate}} -

    {{link-to 'Edit My Review' 'review.edit' review}}

    - {{/if}} -
    -
  • - {{/each}} -
- -{{else}} -

There are no current reviews. {{link-to "Wanna add one?" 'reviews.new'}}

-{{/if}} diff --git a/app/templates/reviews/new.hbs b/app/templates/reviews/new.hbs deleted file mode 100644 index f74e377..0000000 --- a/app/templates/reviews/new.hbs +++ /dev/null @@ -1,12 +0,0 @@ -

New Review

-
-
- - {{view Ember.Select content=ratingChoices value=model.rating required=true prompt="Select Rating" classNames='form-control'}} -
-
- - {{textarea value=model.post required=true classNames='form-control' rows=10}} -
- -
diff --git a/tests/unit/models/course-test.js b/tests/unit/models/course-test.js index e769c95..44e8338 100644 --- a/tests/unit/models/course-test.js +++ b/tests/unit/models/course-test.js @@ -6,7 +6,7 @@ import Ember from 'ember'; moduleForModel('course', { // Specify the other units that are required for this test. - needs: ['model:scorecard', 'model:hole', 'model:review', 'model:photo', 'model:round', 'model:user', 'model:turn'] + needs: ['model:scorecard', 'model:hole', 'model:photo', 'model:round', 'model:user', 'model:turn'] }); test('isApproved correctly checks status', function(assert) { @@ -32,14 +32,6 @@ test('holes relationship', function(assert) { assert.equal(relationship.kind, 'hasMany'); }); -test('reviews relationship', function(assert) { - var model = this.store().modelFor('course'); - var relationship = Ember.get(model, 'relationshipsByName').get('reviews'); - - assert.equal(relationship.key, 'reviews'); - assert.equal(relationship.kind, 'hasMany'); -}); - test('photos relationship', function(assert) { var model = this.store().modelFor('course'); var relationship = Ember.get(model, 'relationshipsByName').get('photos'); From 6f630f98e8ac5adeabd039c6df26d30220ad85d5 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Wed, 17 Aug 2016 16:14:40 -0400 Subject: [PATCH 09/11] Updates computed properties using @each http://emberjs.com/deprecations/v1.x/#toc_using-code-each-code-as-a-leaf -node-in-a-dependent-key --- app/components/scorecards-table-cell.js | 2 +- app/controllers/course-rounds.js | 4 ++-- app/controllers/round/settings.js | 2 +- app/controllers/rounds/new.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/components/scorecards-table-cell.js b/app/components/scorecards-table-cell.js index 8b0af76..4642b92 100644 --- a/app/components/scorecards-table-cell.js +++ b/app/components/scorecards-table-cell.js @@ -15,7 +15,7 @@ var ScorecardsTableCell = Ember.Component.extend({ return this.get('scorecard').get('turns').find(function(turn) { return turn.get('holeNumber') === holeNumber; }); - }.property('scorecard.turns.@each', 'holeNumber') + }.property('scorecard.turns.[]', 'holeNumber') }); export default ScorecardsTableCell; diff --git a/app/controllers/course-rounds.js b/app/controllers/course-rounds.js index 6997225..2a431b7 100644 --- a/app/controllers/course-rounds.js +++ b/app/controllers/course-rounds.js @@ -17,7 +17,7 @@ var CourseRoundsController = Ember.ArrayController.extend({ var end = this.get('page') * this.get('perPage'); return this.get('filteredContent').slice(start, end); - }.property('filteredContent.@each', 'page', 'perPage'), + }.property('filteredContent.[]', 'page', 'perPage'), isPaginated: function() { return this.get('filteredContent').length > this.get('perPage'); @@ -48,7 +48,7 @@ var CourseRoundsController = Ember.ArrayController.extend({ } else { return this.get('completedScorecards'); } - }.property('arrangedContent.@each', 'includeIncompleteScorecards', 'completedScorecards.@each'), + }.property('arrangedContent.[]', 'includeIncompleteScorecards', 'completedScorecards.[]'), completedScorecards: function() { return this.get('arrangedContent').filter(function(scorecard) { diff --git a/app/controllers/round/settings.js b/app/controllers/round/settings.js index db5eee5..220b268 100644 --- a/app/controllers/round/settings.js +++ b/app/controllers/round/settings.js @@ -22,7 +22,7 @@ export default Ember.Controller.extend({ return friends.filter(function(friend) { return !player_ids.contains(friend.get("id")); }); - }.property('roundPlayers.@each', 'friends.@each'), + }.property('roundPlayers.[]', 'friends.[]'), actions: { addPlayer: function() { diff --git a/app/controllers/rounds/new.js b/app/controllers/rounds/new.js index d955d76..16ce85e 100644 --- a/app/controllers/rounds/new.js +++ b/app/controllers/rounds/new.js @@ -11,7 +11,7 @@ var RoundsNewController = Ember.Controller.extend({ players.forEach(function(p) { friends.removeObject(p); }); return friends; - }.property('friends.@each', 'model.players.@each'), + }.property('friends.[]', 'model.players.[]'), noPlayerSelected: function() { From 20cca9b41b6ca4049e5c00802cd0212ba877331e Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Wed, 17 Aug 2016 16:32:30 -0400 Subject: [PATCH 10/11] Prefers 'query' to 'find' with hashed params http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#toc_que ry-and-queryrecord --- app/routes/course-rounds.js | 2 +- app/routes/hole-stat-logs.js | 2 +- app/routes/joint-rounds.js | 2 +- app/routes/leaderboard.js | 2 +- bower.json | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/routes/course-rounds.js b/app/routes/course-rounds.js index afd6120..a6f6de2 100644 --- a/app/routes/course-rounds.js +++ b/app/routes/course-rounds.js @@ -2,7 +2,7 @@ import AuthenticatedRoute from './authenticated'; var CourseRoundsRoute = AuthenticatedRoute.extend({ model: function() { - return this.store.find('courseScorecard', { course_id: this.modelFor('course').id }); + return this.store.query('courseScorecard', { course_id: this.modelFor('course').id }); } }); diff --git a/app/routes/hole-stat-logs.js b/app/routes/hole-stat-logs.js index d306586..b80935f 100644 --- a/app/routes/hole-stat-logs.js +++ b/app/routes/hole-stat-logs.js @@ -2,7 +2,7 @@ import AuthenticatedRoute from './authenticated'; var HoleStatLogsRoute = AuthenticatedRoute.extend({ model: function() { - return this.store.find('holeStatLog', { course_id: this.modelFor('course').id }); + return this.store.query('holeStatLog', { course_id: this.modelFor('course').id }); } }); diff --git a/app/routes/joint-rounds.js b/app/routes/joint-rounds.js index 25c3e26..34b9a9e 100644 --- a/app/routes/joint-rounds.js +++ b/app/routes/joint-rounds.js @@ -2,7 +2,7 @@ import AuthenticatedRoute from './authenticated'; var JointRoundsRoute = AuthenticatedRoute.extend({ model: function() { - return this.store.find('jointRound', { user_id: this.modelFor('user').id }); + return this.store.query('jointRound', { user_id: this.modelFor('user').id }); } }); diff --git a/app/routes/leaderboard.js b/app/routes/leaderboard.js index 9dedc08..c94d756 100644 --- a/app/routes/leaderboard.js +++ b/app/routes/leaderboard.js @@ -2,7 +2,7 @@ import AuthenticatedRoute from './authenticated'; var LeaderboardRoute = AuthenticatedRoute.extend({ model: function() { - return this.store.find('leaderboardScorecard', { course_id: this.modelFor('course').id }); + return this.store.query('leaderboardScorecard', { course_id: this.modelFor('course').id }); } }); diff --git a/bower.json b/bower.json index 9e3c641..fc906b0 100644 --- a/bower.json +++ b/bower.json @@ -15,7 +15,6 @@ "moment": "~2.9.0", "highcharts": "~4.1.1", "ember-uploader": "~0.3.4", - "emblem": "~0.3.18", "jquery-cookie": "~1.4.1", "bootstrap-sass-official": "~3.3.3", "typeahead.js": "~0.10.5", From e454772081505dc5f44ab4ed25489d88b87f0656 Mon Sep 17 00:00:00 2001 From: Geoffrey Schorkopf Date: Thu, 18 Aug 2016 12:26:19 -0400 Subject: [PATCH 11/11] Replaces view selects with ember-xselect http://emberjs.com/deprecations/v1.x/#toc_ember-select --- app/controllers/rounds/new.js | 2 +- app/templates/courses/new.hbs | 6 +++++- app/templates/rounds/new.hbs | 7 ++++++- package.json | 1 + tests/.jshintrc | 1 + tests/test-helper.js | 2 ++ 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/controllers/rounds/new.js b/app/controllers/rounds/new.js index 16ce85e..6595a3d 100644 --- a/app/controllers/rounds/new.js +++ b/app/controllers/rounds/new.js @@ -38,7 +38,7 @@ var RoundsNewController = Ember.Controller.extend({ createRound: function() { var _this = this; - this.set('model.course', this.get('model.course.content')); + this.get('model').save().then(function(round) { _this.controllerFor('application').set('currentRound', round); _this.controllerFor('application').set('currentHole', '1'); diff --git a/app/templates/courses/new.hbs b/app/templates/courses/new.hbs index 70f0664..704f9d6 100644 --- a/app/templates/courses/new.hbs +++ b/app/templates/courses/new.hbs @@ -19,7 +19,11 @@ - {{view "select" content=stateAbbreviations value=model.state required=true classNames="form-control"}} + {{#x-select value=model.state required=true id='state' classNames='form-control'}} + {{#each stateAbbreviations as |state|}} + {{#x-option value=state}}{{state}}{{/x-option}} + {{/each}} + {{/x-select}}

Can't see the course you're looking for? Why not diff --git a/package.json b/package.json index bf346fb..f251a0a 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "ember-data": "1.13.15", "ember-disable-proxy-controllers": "^1.0.1", "ember-export-application-global": "^1.0.4", + "emberx-select": "2.2.1", "express": "^4.8.5", "glob": "^4.0.5" } diff --git a/tests/.jshintrc b/tests/.jshintrc index 2a171aa..0ab53df 100644 --- a/tests/.jshintrc +++ b/tests/.jshintrc @@ -13,6 +13,7 @@ "exists", "fillIn", "click", + "select", "keyEvent", "triggerEvent", "find", diff --git a/tests/test-helper.js b/tests/test-helper.js index e6cfb70..35461bf 100644 --- a/tests/test-helper.js +++ b/tests/test-helper.js @@ -1,4 +1,6 @@ import resolver from './helpers/resolver'; +import registerSelectHelper from './helpers/register-select-helper'; +registerSelectHelper(); import { setResolver } from 'ember-qunit';