Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move blueprint files into explicit directories #103

Merged

Conversation

backspace
Copy link
Collaborator

I just started a new ember-pouch application and used the pouch-model and pouch-adapter blueprints. They use the __path__ directory name:

The __path__ token is substituted with the blueprint name at install time. For example, when the user invokes ember generate controller foo then __path__ becomes controller. When the --pod flag is used, for example ember generate controller foo --pod then __path__ becomes foo (or <podModulePrefix>/foo if the podModulePrefix is defined). This token is primarily for pod support, and is only necessary if the blueprint can be used in pod structure. If the blueprint does not require pod support, simply use the blueprint name instead of the __path__ token.

So when I ran ember g pouch-adapter application, it generated the adapter at /app/pouch-adapters/application. Likewise ember g pouch-model destination created /app/pouch-models/destination.js. Then Ember Data couldn’t find them!

I’m not sure whether this is the full solution because I know the __path__ thing is involved in pods. But without pods, the way it’s generating files is broken!

Using __path__ meant the adapter file was generated at
/app/pouch-adapters/__name__.js, for instance. Ember
Data was not finding it, nor the models stored within
pouch-models.
@mattmarcum
Copy link
Contributor

Yeah, sorry originally when I made the blueprints they were named model/adapter and everything worked...but a name change was requested and I forgot to change the paths...good catch

@rsutphin
Copy link
Collaborator

Agreed that we should take this as a solution for now — if someone's using pods and can assist getting them to work there also that would be great.

rsutphin added a commit that referenced this pull request Dec 20, 2015
Move blueprint files into explicit directories
@rsutphin rsutphin merged commit a1b2e13 into pouchdb-community:master Dec 20, 2015
rsutphin added a commit that referenced this pull request Dec 20, 2015
simonexmachina added a commit to jtribe/ember-pouch that referenced this pull request Aug 17, 2016
* upstream/master: (32 commits)
  fixing readme reference to config key, concerning adapter blueprint.
  3.2.1
  Fix(Addon): Call super in init
  3.2.0
  Add relationship documentation
  Update README.md
  update readme
  update readme
  3.1.1
  (pouchdb-community#16) - Add override so serialiser saves hasMany
  Pouch adapter now calls a hook method when encountering a change for a record that is not yet loaded.
  update readme
  3.1.0
  Fix version check for Ember Data 3.2.x
  Update changelog for pouchdb-community#103
  Tests for existing change watcher behavior
  Factor out integration test setup into module helper
  Move blueprint files into explicit directories
  Changelog for pouchdb-community#101 and pouchdb-community#102.
  created blueprint for pouch-adapter
  ...
simonexmachina added a commit to jtribe/ember-pouch that referenced this pull request Aug 17, 2016
* upstream/master: (32 commits)
  fixing readme reference to config key, concerning adapter blueprint.
  3.2.1
  Fix(Addon): Call super in init
  3.2.0
  Add relationship documentation
  Update README.md
  update readme
  update readme
  3.1.1
  (pouchdb-community#16) - Add override so serialiser saves hasMany
  Pouch adapter now calls a hook method when encountering a change for a record that is not yet loaded.
  update readme
  3.1.0
  Fix version check for Ember Data 3.2.x
  Update changelog for pouchdb-community#103
  Tests for existing change watcher behavior
  Factor out integration test setup into module helper
  Move blueprint files into explicit directories
  Changelog for pouchdb-community#101 and pouchdb-community#102.
  created blueprint for pouch-adapter
  ...
simonexmachina added a commit to jtribe/ember-pouch that referenced this pull request Aug 17, 2016
* upstream/master: (32 commits)
  fixing readme reference to config key, concerning adapter blueprint.
  3.2.1
  Fix(Addon): Call super in init
  3.2.0
  Add relationship documentation
  Update README.md
  update readme
  update readme
  3.1.1
  (pouchdb-community#16) - Add override so serialiser saves hasMany
  Pouch adapter now calls a hook method when encountering a change for a record that is not yet loaded.
  update readme
  3.1.0
  Fix version check for Ember Data 3.2.x
  Update changelog for pouchdb-community#103
  Tests for existing change watcher behavior
  Factor out integration test setup into module helper
  Move blueprint files into explicit directories
  Changelog for pouchdb-community#101 and pouchdb-community#102.
  created blueprint for pouch-adapter
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants