diff --git a/.ember-cli b/.ember-cli index 59bb55f..a277775 100644 --- a/.ember-cli +++ b/.ember-cli @@ -1,9 +1,4 @@ { - /** - Ember CLI sends analytics information by default. The data is completely - anonymous, but there are times when you might want to disable this behavior. - - Setting `disableAnalytics` to true will prevent any data from being sent. - */ - "disableAnalytics": true + "disableAnalytics": true, + "usePods": true } diff --git a/app/components/.gitkeep b/app/components/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/app/components/display-errors.js b/app/components/display-errors.js deleted file mode 100644 index 926b613..0000000 --- a/app/components/display-errors.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ -}); diff --git a/app/controllers/measurements/index.js b/app/controllers/measurements/index.js deleted file mode 100644 index 62d73f0..0000000 --- a/app/controllers/measurements/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import SortableController from '../sortable'; - -export default SortableController.extend({ - sortBy: 'characteristic', -}); diff --git a/app/controllers/strains/index.js b/app/controllers/strains/index.js deleted file mode 100644 index 86fd495..0000000 --- a/app/controllers/strains/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import SortableController from '../sortable'; - -export default SortableController.extend({ - sortBy: 'fullName', -}); diff --git a/app/routes/about.js b/app/pods/about/route.js similarity index 100% rename from app/routes/about.js rename to app/pods/about/route.js diff --git a/app/templates/about.hbs b/app/pods/about/template.hbs similarity index 100% rename from app/templates/about.hbs rename to app/pods/about/template.hbs diff --git a/app/adapters/application.js b/app/pods/application/adapter.js similarity index 94% rename from app/adapters/application.js rename to app/pods/application/adapter.js index 2aab3ad..2037ee8 100644 --- a/app/adapters/application.js +++ b/app/pods/application/adapter.js @@ -1,6 +1,6 @@ import DS from 'ember-data'; import Ember from 'ember'; -import config from '../config/environment'; +import config from '../../config/environment'; export default DS.RESTAdapter.extend({ namespace: 'api/' + config.genus, diff --git a/app/routes/application.js b/app/pods/application/route.js similarity index 100% rename from app/routes/application.js rename to app/pods/application/route.js diff --git a/app/templates/application.hbs b/app/pods/application/template.hbs similarity index 100% rename from app/templates/application.hbs rename to app/pods/application/template.hbs diff --git a/app/views/application.js b/app/pods/application/view.js similarity index 100% rename from app/views/application.js rename to app/pods/application/view.js diff --git a/app/controllers/characteristics/index.js b/app/pods/characteristics/controller.js similarity index 56% rename from app/controllers/characteristics/index.js rename to app/pods/characteristics/controller.js index f94b49b..fe6b361 100644 --- a/app/controllers/characteristics/index.js +++ b/app/pods/characteristics/controller.js @@ -1,4 +1,4 @@ -import SortableController from '../sortable'; +import SortableController from '../../controllers/sortable'; export default SortableController.extend({ sortBy: 'characteristicName', diff --git a/app/pods/characteristics/route.js b/app/pods/characteristics/route.js new file mode 100644 index 0000000..df69651 --- /dev/null +++ b/app/pods/characteristics/route.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; +import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; + +export default Ember.Route.extend(AuthenticatedRouteMixin, { + model: function() { + return this.store.findAll('characteristic'); + } +}); diff --git a/app/templates/characteristics/index.hbs b/app/pods/characteristics/template.hbs similarity index 100% rename from app/templates/characteristics/index.hbs rename to app/pods/characteristics/template.hbs diff --git a/app/templates/components/display-errors.hbs b/app/pods/components/display-errors/template.hbs similarity index 100% rename from app/templates/components/display-errors.hbs rename to app/pods/components/display-errors/template.hbs diff --git a/app/components/genus-name.js b/app/pods/components/genus-name/component.js similarity index 71% rename from app/components/genus-name.js rename to app/pods/components/genus-name/component.js index 61a389d..1fb4f1f 100644 --- a/app/components/genus-name.js +++ b/app/pods/components/genus-name/component.js @@ -1,5 +1,5 @@ import Ember from 'ember'; -import config from '../config/environment'; +import config from '../../../config/environment'; export default Ember.Component.extend({ tagName: 'em', diff --git a/app/templates/components/genus-name.hbs b/app/pods/components/genus-name/template.hbs similarity index 100% rename from app/templates/components/genus-name.hbs rename to app/pods/components/genus-name/template.hbs diff --git a/app/components/measurements/measurement-row.js b/app/pods/components/measurement-row/component.js similarity index 100% rename from app/components/measurements/measurement-row.js rename to app/pods/components/measurement-row/component.js diff --git a/app/templates/components/measurements/measurement-row.hbs b/app/pods/components/measurement-row/template.hbs similarity index 100% rename from app/templates/components/measurements/measurement-row.hbs rename to app/pods/components/measurement-row/template.hbs diff --git a/app/components/scientific-name.js b/app/pods/components/scientific-name/component.js similarity index 60% rename from app/components/scientific-name.js rename to app/pods/components/scientific-name/component.js index 26c2df5..40bf39c 100644 --- a/app/components/scientific-name.js +++ b/app/pods/components/scientific-name/component.js @@ -1,8 +1,6 @@ import Ember from 'ember'; -import layout from '../templates/components/scientific-name'; export default Ember.Component.extend({ - layout: layout, tagName: 'span', strain: null, // passed in }); diff --git a/app/templates/components/scientific-name.hbs b/app/pods/components/scientific-name/template.hbs similarity index 100% rename from app/templates/components/scientific-name.hbs rename to app/pods/components/scientific-name/template.hbs diff --git a/app/components/species/species-details.js b/app/pods/components/species-details/component.js similarity index 100% rename from app/components/species/species-details.js rename to app/pods/components/species-details/component.js diff --git a/app/templates/components/species/species-details.hbs b/app/pods/components/species-details/template.hbs similarity index 100% rename from app/templates/components/species/species-details.hbs rename to app/pods/components/species-details/template.hbs diff --git a/app/components/strains/strain-details.js b/app/pods/components/strain-details/component.js similarity index 100% rename from app/components/strains/strain-details.js rename to app/pods/components/strain-details/component.js diff --git a/app/templates/components/strains/strain-details.hbs b/app/pods/components/strain-details/template.hbs similarity index 100% rename from app/templates/components/strains/strain-details.hbs rename to app/pods/components/strain-details/template.hbs diff --git a/app/routes/characteristics.js b/app/pods/index/route.js similarity index 100% rename from app/routes/characteristics.js rename to app/pods/index/route.js diff --git a/app/templates/index.hbs b/app/pods/index/template.hbs similarity index 100% rename from app/templates/index.hbs rename to app/pods/index/template.hbs diff --git a/app/controllers/login.js b/app/pods/login/controller.js similarity index 100% rename from app/controllers/login.js rename to app/pods/login/controller.js diff --git a/app/routes/login.js b/app/pods/login/route.js similarity index 100% rename from app/routes/login.js rename to app/pods/login/route.js diff --git a/app/templates/login.hbs b/app/pods/login/template.hbs similarity index 100% rename from app/templates/login.hbs rename to app/pods/login/template.hbs diff --git a/app/controllers/species/index.js b/app/pods/species/index/controller.js similarity index 53% rename from app/controllers/species/index.js rename to app/pods/species/index/controller.js index b5b8af0..e6f1ac9 100644 --- a/app/controllers/species/index.js +++ b/app/pods/species/index/controller.js @@ -1,4 +1,4 @@ -import SortableController from '../sortable'; +import SortableController from '../../../controllers/sortable'; export default SortableController.extend({ sortBy: 'speciesName', diff --git a/app/pods/species/index/route.js b/app/pods/species/index/route.js new file mode 100644 index 0000000..6b02e0e --- /dev/null +++ b/app/pods/species/index/route.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; +import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; + +export default Ember.Route.extend(AuthenticatedRouteMixin, { + model: function() { + return this.store.findAll('species'); + } +}); diff --git a/app/templates/species/index.hbs b/app/pods/species/index/template.hbs similarity index 100% rename from app/templates/species/index.hbs rename to app/pods/species/index/template.hbs diff --git a/app/controllers/species/new.js b/app/pods/species/new/controller.js similarity index 100% rename from app/controllers/species/new.js rename to app/pods/species/new/controller.js diff --git a/app/routes/species/new.js b/app/pods/species/new/route.js similarity index 100% rename from app/routes/species/new.js rename to app/pods/species/new/route.js diff --git a/app/templates/species/new.hbs b/app/pods/species/new/template.hbs similarity index 73% rename from app/templates/species/new.hbs rename to app/pods/species/new/template.hbs index b070c4a..f38417f 100644 --- a/app/templates/species/new.hbs +++ b/app/pods/species/new/template.hbs @@ -1,5 +1,5 @@ {{ - species/species-details + species-details species=model isEditing=true save="save" diff --git a/app/controllers/species/show.js b/app/pods/species/show/controller.js similarity index 100% rename from app/controllers/species/show.js rename to app/pods/species/show/controller.js diff --git a/app/routes/species/show.js b/app/pods/species/show/route.js similarity index 100% rename from app/routes/species/show.js rename to app/pods/species/show/route.js diff --git a/app/templates/species/show.hbs b/app/pods/species/show/template.hbs similarity index 74% rename from app/templates/species/show.hbs rename to app/pods/species/show/template.hbs index 5f72e74..b242fc5 100644 --- a/app/templates/species/show.hbs +++ b/app/pods/species/show/template.hbs @@ -1,5 +1,5 @@ {{ - species/species-details + species-details species=model isEditing=isEditing save="save" diff --git a/app/pods/strains/index/route.js b/app/pods/strains/index/route.js new file mode 100644 index 0000000..0bcd81a --- /dev/null +++ b/app/pods/strains/index/route.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; +import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; + +export default Ember.Route.extend(AuthenticatedRouteMixin, { + model: function() { + return this.store.findAll('strain'); + } +}); diff --git a/app/templates/strains/index.hbs b/app/pods/strains/index/template.hbs similarity index 93% rename from app/templates/strains/index.hbs rename to app/pods/strains/index/template.hbs index 7b8ddf3..4e8c0ea 100644 --- a/app/templates/strains/index.hbs +++ b/app/pods/strains/index/template.hbs @@ -19,7 +19,7 @@ {{#each strain in controller}} - {{#link-to 'measurements' strain.id}} + {{#link-to 'strains.show' strain.id}} {{scientific-name strain=strain}} {{/link-to}} diff --git a/app/controllers/strains/new.js b/app/pods/strains/new/controller.js similarity index 100% rename from app/controllers/strains/new.js rename to app/pods/strains/new/controller.js diff --git a/app/routes/strains/new.js b/app/pods/strains/new/route.js similarity index 100% rename from app/routes/strains/new.js rename to app/pods/strains/new/route.js diff --git a/app/templates/strains/new.hbs b/app/pods/strains/new/template.hbs similarity index 78% rename from app/templates/strains/new.hbs rename to app/pods/strains/new/template.hbs index 6c0f31d..bd22b30 100644 --- a/app/templates/strains/new.hbs +++ b/app/pods/strains/new/template.hbs @@ -1,5 +1,5 @@ {{ - strains/strain-details + strain-details strain=strain species=species isEditing=true diff --git a/app/controllers/strains/show.js b/app/pods/strains/show/controller.js similarity index 100% rename from app/controllers/strains/show.js rename to app/pods/strains/show/controller.js diff --git a/app/routes/strains/show.js b/app/pods/strains/show/route.js similarity index 100% rename from app/routes/strains/show.js rename to app/pods/strains/show/route.js diff --git a/app/templates/strains/show.hbs b/app/pods/strains/show/template.hbs similarity index 53% rename from app/templates/strains/show.hbs rename to app/pods/strains/show/template.hbs index c3af8fb..16a7df0 100644 --- a/app/templates/strains/show.hbs +++ b/app/pods/strains/show/template.hbs @@ -1,12 +1,8 @@ {{ - strains/strain-details + strain-details strain=strain species=species isEditing=isEditing save="save" cancel="cancel" }} - -
- {{outlet}} -
diff --git a/app/adapters/user.js b/app/pods/user/adapter.js similarity index 75% rename from app/adapters/user.js rename to app/pods/user/adapter.js index 9ba7563..e4e2bd1 100644 --- a/app/adapters/user.js +++ b/app/pods/user/adapter.js @@ -1,5 +1,5 @@ import DS from 'ember-data'; -import config from '../config/environment'; +import config from '../../config/environment'; export default DS.RESTAdapter.extend({ namespace: 'api', diff --git a/app/pods/users/route.js b/app/pods/users/route.js new file mode 100644 index 0000000..2169a4f --- /dev/null +++ b/app/pods/users/route.js @@ -0,0 +1,8 @@ +import Ember from 'ember'; +import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; + +export default Ember.Route.extend(AuthenticatedRouteMixin, { + model: function() { + return this.store.findAll('user'); + } +}); diff --git a/app/templates/users/index.hbs b/app/pods/users/template.hbs similarity index 100% rename from app/templates/users/index.hbs rename to app/pods/users/template.hbs diff --git a/app/router.js b/app/router.js index f82a92c..6cff3a0 100644 --- a/app/router.js +++ b/app/router.js @@ -8,18 +8,18 @@ var Router = Ember.Router.extend({ Router.map(function() { this.route('login'); this.route('about'); - this.resource('species', function() { + this.route('characteristics'); + this.route('users'); + + this.route('species', function() { + this.route('new'); this.route('show', { path: ':species_id' }); - this.route('new'); }); - this.resource('strains', function() { + this.route('strains', function() { this.route('new'); - this.route('show', { path: ':strain_id' }, function() { - this.resource('measurements', function() {}); - }); + this.route('show', { path: ':strain_id' }); }); - this.resource('characteristics', function() {}); - this.resource('users', function() {}); + }); export default Router; diff --git a/app/routes/.gitkeep b/app/routes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/app/routes/characteristics/index.js b/app/routes/characteristics/index.js deleted file mode 100644 index 348187c..0000000 --- a/app/routes/characteristics/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.findAll('characteristic'); - } -}); diff --git a/app/routes/index.js b/app/routes/index.js deleted file mode 100644 index 5b14286..0000000 --- a/app/routes/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; -import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; - -export default Ember.Route.extend(AuthenticatedRouteMixin); diff --git a/app/routes/measurements/index.js b/app/routes/measurements/index.js deleted file mode 100644 index d1416be..0000000 --- a/app/routes/measurements/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.modelFor('strains/show').strain.get('measurements'); - } -}); diff --git a/app/routes/species.js b/app/routes/species.js deleted file mode 100644 index 5b14286..0000000 --- a/app/routes/species.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; -import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; - -export default Ember.Route.extend(AuthenticatedRouteMixin); diff --git a/app/routes/species/index.js b/app/routes/species/index.js deleted file mode 100644 index 8f05241..0000000 --- a/app/routes/species/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.findAll('species'); - } -}); diff --git a/app/routes/strains.js b/app/routes/strains.js deleted file mode 100644 index 5b14286..0000000 --- a/app/routes/strains.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; -import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; - -export default Ember.Route.extend(AuthenticatedRouteMixin); diff --git a/app/routes/strains/index.js b/app/routes/strains/index.js deleted file mode 100644 index eb8fe88..0000000 --- a/app/routes/strains/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.findAll('strain'); - } -}); diff --git a/app/routes/users.js b/app/routes/users.js deleted file mode 100644 index 5b14286..0000000 --- a/app/routes/users.js +++ /dev/null @@ -1,4 +0,0 @@ -import Ember from 'ember'; -import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; - -export default Ember.Route.extend(AuthenticatedRouteMixin); diff --git a/app/routes/users/index.js b/app/routes/users/index.js deleted file mode 100644 index b578e0b..0000000 --- a/app/routes/users/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model: function() { - return this.store.findAll('user'); - } -}); diff --git a/app/templates/components/.gitkeep b/app/templates/components/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/app/templates/measurements/index.hbs b/app/templates/measurements/index.hbs deleted file mode 100644 index 19db67f..0000000 --- a/app/templates/measurements/index.hbs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - {{#each measurement in controller}} - {{measurements/measurement-row measurement=measurement}} - {{/each}} - -
CharacteristicMeasurement TypeMeasurementNotesTest Method
diff --git a/app/templates/species.hbs b/app/templates/species.hbs deleted file mode 100644 index c24cd68..0000000 --- a/app/templates/species.hbs +++ /dev/null @@ -1 +0,0 @@ -{{outlet}} diff --git a/app/views/.gitkeep b/app/views/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/config/environment.js b/config/environment.js index b320842..4713ad1 100644 --- a/config/environment.js +++ b/config/environment.js @@ -17,6 +17,7 @@ module.exports = function(environment) { // when it is created }, genus: 'hymenobacter', + podModulePrefix: 'hymenobacterdotinfo/pods', }; if (environment === 'development') {