Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Update ember-pouch to the latest version 🚀 (#825)
Browse files Browse the repository at this point in the history
* chore(package): update ember-pouch to version 4.1.0

https://greenkeeper.io/

* Upgrade to ember-pouch 4.2.1

Also, move as much pouch related stuff out of bower.json
  • Loading branch information
greenkeeper[bot] authored and jkleinsc committed Nov 30, 2016
1 parent 2073a2d commit efd5484
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions app/services/database.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Ember from 'ember';
import createPouchViews from 'hospitalrun/utils/pouch-views';
import List from 'npm:pouchdb-list';
import PouchAdapterMemory from 'npm:pouchdb-adapter-memory';
import PouchAdapterUtils from 'hospitalrun/mixins/pouch-adapter-utils';

export default Ember.Service.extend(PouchAdapterUtils, {
Expand Down Expand Up @@ -127,6 +128,7 @@ export default Ember.Service.extend(PouchAdapterUtils, {
*/
loadDBFromDump(dbDump) {
return new Ember.RSVP.Promise((resolve, reject) => {
PouchDB.plugin(PouchAdapterMemory);
let db = new PouchDB('dbdump', {
adapter: 'memory'
});
Expand Down
5 changes: 1 addition & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"pikaday": "https://github.com/owenmead/Pikaday.git#~1.3.3",
"typeahead.js": "~0.11.1",
"pouchdb-load": "^1.4.0",
"pretender": "~0.10.0",
"pouchdb": "^5.4.5",
"relational-pouch": "^1.4.5",
"pouchdb-find": "^0.10.2"
"pretender": "~0.10.0"
}
}
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = function(environment) {
debug: true,
excludePaths: ['manifest.appcache'],
swIncludeFiles: [
'bower_components/pouchdb/dist/pouchdb.js'
'node_modules/ember-pouch/node_modules/pouchdb/dist/pouchdb.js'
]
};
if (environment === 'production') {
Expand Down
2 changes: 0 additions & 2 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@ module.exports = function(defaults) {
app.import('bower_components/pikaday/css/pikaday.css');
app.import('vendor/octicons/octicons/octicons.css');
app.import('bower_components/pouchdb-load/dist/pouchdb.load.js');
app.import('bower_components/pouchdb/dist/pouchdb.memory.js');

return app.toTree();
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"ember-i18n": "4.3.2",
"ember-keyboard": "2.1.9",
"ember-load-initializers": "^0.5.1",
"ember-pouch": "4.1.0",
"ember-pouch": "4.2.1",
"ember-radio-buttons": "^4.0.1",
"ember-rapid-forms": "GCorbel/ember-rapid-forms#26229804a2c430bbdf1ffb6bab8fb53af17bb3a4",
"ember-resolver": "^2.0.3",
Expand All @@ -80,6 +80,7 @@
"hospitalrun-server-routes": "0.9.9",
"loader.js": "4.0.11",
"nano": "6.2.0",
"pouchdb-adapter-memory": "^6.0.7",
"pouchdb-list": "^1.1.0",
"request": "2.79.0",
"stylelint": "7.6.0",
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/run-with-pouch-dump.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import createPouchViews from 'hospitalrun/utils/pouch-views';
import Ember from 'ember';
import PouchDB from 'pouchdb';
import PouchAdapterMemory from 'npm:pouchdb-adapter-memory';
import DatabaseService from 'hospitalrun/services/database';
import ConfigService from 'hospitalrun/services/config';

Expand Down Expand Up @@ -32,7 +33,7 @@ function destroyDatabases(dbs) {
}

function runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) {

PouchDB.plugin(PouchAdapterMemory);
let db = new PouchDB('hospitalrun-test-database', {
adapter: 'memory'
});
Expand Down

0 comments on commit efd5484

Please sign in to comment.