-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Yockey
committed
May 16, 2016
1 parent
02b6168
commit 86d92ec
Showing
19 changed files
with
136 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export function initialize(appInstance) { | ||
const container = appInstance.lookup ? appInstance : appInstance.container; | ||
const store = container.lookup('service:store'); | ||
store.findAll('trainee'); | ||
} | ||
|
||
export default { | ||
after: 'ember-data', | ||
name: 'load-gym', | ||
initialize | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Component.extend({ | ||
classNames: ['pokemon-summary'] | ||
inGym: Ember.computed.alias('pokemon.inGym'), | ||
actions: { | ||
click() { | ||
this.sendAction('click', this.get('pokemon')); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<span class="pokemon-image"> | ||
<img src={{pokemon.imageUrl}} alt={{pokemon.name}}> | ||
</span> | ||
<h3 class="pokemon-name"> | ||
{{pokemon.name}} | ||
</h3> | ||
<div class="pokemon-summary {{if inGym 'in-gym'}}" onclick={{action 'click'}}> | ||
<span class="pokemon-image"> | ||
<img src={{pokemon.imageUrl}} alt={{pokemon.name}}> | ||
</span> | ||
<h3 class="pokemon-name"> | ||
{{pokemon.name}} | ||
</h3> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{outlet}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Ember from 'ember'; | ||
import FirebaseAdapter from 'emberfire/adapters/firebase'; | ||
|
||
const { inject } = Ember; | ||
|
||
export default FirebaseAdapter.extend({ | ||
firebase: inject.service(), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import DS from 'ember-data'; | ||
|
||
export default DS.Model.extend({ | ||
pokemon: DS.belongsTo('pokemon') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Ember from 'ember'; | ||
import { initialize } from 'embermon/instance-initializers/load-gym'; | ||
import { module, test } from 'qunit'; | ||
import destroyApp from '../../helpers/destroy-app'; | ||
|
||
module('Unit | Instance Initializer | load gym', { | ||
beforeEach: function() { | ||
Ember.run(() => { | ||
this.application = Ember.Application.create(); | ||
this.appInstance = this.application.buildInstance(); | ||
}); | ||
}, | ||
afterEach: function() { | ||
Ember.run(this.appInstance, 'destroy'); | ||
destroyApp(this.application); | ||
} | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it works', function(assert) { | ||
initialize(this.appInstance); | ||
|
||
// you would normally confirm the results of the initializer here | ||
assert.ok(true); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('route:gym', 'Unit | Route | gym', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
let route = this.subject(); | ||
assert.ok(route); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('adapter:trainee', 'Unit | Adapter | trainee', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['serializer:foo'] | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let adapter = this.subject(); | ||
assert.ok(adapter); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { moduleForModel, test } from 'ember-qunit'; | ||
|
||
moduleForModel('trainee', 'Unit | Model | trainee', { | ||
// Specify the other units that are required for this test. | ||
needs: [] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
let model = this.subject(); | ||
// let store = this.store(); | ||
assert.ok(!!model); | ||
}); |