Skip to content

Commit

Permalink
Merge pull request #147 from Fed03/new-version
Browse files Browse the repository at this point in the history
Updated ember-cli fixes and some minor changes
  • Loading branch information
broerse authored Oct 13, 2016
2 parents 17c734c + 10a5087 commit 7ccd2ad
Show file tree
Hide file tree
Showing 32 changed files with 263 additions and 275 deletions.
14 changes: 0 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"esversion": 6,
"unused": true
}
20 changes: 11 additions & 9 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
bower_components/
tests/
tmp/
dist/

/bower_components
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.gitignore
.jshintrc
.watchmanconfig
.travis.yml
.npmignore
**/.gitkeep
bower.json
Brocfile.js
testem.json
ember-cli-build.js
testem.js
35 changes: 14 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
language: node_js
node_js:
- "0.12"
- "4"

sudo: false

Expand All @@ -10,39 +10,32 @@ cache:
- node_modules

env:
- EMBER_TRY_SCENARIO=ember-data-2.0
- EMBER_TRY_SCENARIO=ember-data-2.1
- EMBER_TRY_SCENARIO=ember-data-2.2
- EMBER_TRY_SCENARIO=ember-data-2.3
- EMBER_TRY_SCENARIO=ember-2.0-stack
- EMBER_TRY_SCENARIO=ember-2.1-stack
- EMBER_TRY_SCENARIO=ember-2.2-stack
- EMBER_TRY_SCENARIO=ember-2.3-stack
- EMBER_TRY_SCENARIO=ember-2.4-stack
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
# After travis-ci/travis-ci#3225 is resolved, restore this and remove the
# manual download/install of PhantomJS 2.0.
# - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- mkdir 'phantomjs-2.0.0'
- cd 'phantomjs-2.0.0'
- curl -O 'https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2'
- tar xjvf 'phantomjs-2.0.0-ubuntu-12.04.tar.bz2'
- cd -
- export PATH=./phantomjs-2.0.0:$PATH

- "npm config set spin false"
- "npm install -g npm@^2"
- npm config set spin false
- npm install -g bower
- bower --version
- npm install -g phantomjs-prebuilt
- phantomjs --version

install:
- npm install -g bower
- npm install
- bower install

script:
- ember try $EMBER_TRY_SCENARIO test
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
2 changes: 1 addition & 1 deletion addon/adapters/pouch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DS from 'ember-data';

import {
extractDeleteRecord
} from 'ember-pouch/utils';
} from '../utils';

const {
run: {
Expand Down
5 changes: 3 additions & 2 deletions addon/serializers/pouch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
get,
} = Ember;
const keys = Object.keys || Ember.keys;
const assign = Object.assign || Ember.assign;

export default DS.RESTSerializer.extend({
_shouldSerializeHasMany: function() {
Expand Down Expand Up @@ -41,9 +42,9 @@ export default DS.RESTSerializer.extend({
// of the document.
// This will conflict with any 'attachments' attr in the model. Suggest that
// #toRawDoc in relational-pouch should allow _attachments to be specified
json.attachments = Object.assign({}, json.attachments || {}, json[payloadKey]); // jshint ignore:line
json.attachments = assign({}, json.attachments || {}, json[payloadKey]); // jshint ignore:line
json[payloadKey] = keys(json[payloadKey]).reduce((attr, fileName) => {
attr[fileName] = Object.assign({}, json[payloadKey][fileName]); // jshint ignore:line
attr[fileName] = assign({}, json[payloadKey][fileName]); // jshint ignore:line
delete attr[fileName].data;
delete attr[fileName].content_type;
return attr;
Expand Down
6 changes: 0 additions & 6 deletions blueprints/.jshintrc

This file was deleted.

5 changes: 2 additions & 3 deletions blueprints/ember-pouch/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

/*jshint node:true*/
module.exports = {
normalizeEntityName: function() {},
description: 'Install ember-pouch deps via Bower',

afterInstall: function() {
return this.addBowerPackagesToProject([
Expand Down
38 changes: 4 additions & 34 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
{
"name": "ember-pouch",
"version": "2.0.0",
"description": "PouchDB adapter for Ember Data",
"homepage": "https://github.com/nolanlawson/ember-pouch",
"authors": [
"Nolan Lawson <[email protected]>"
],
"main": "dist/globals/main.js",
"keywords": [
"PouchDB",
"Ember",
"Data",
"adapter"
],
"license": "Apache 2",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"ember": "~1.13.0 || 2.x",
"ember-cli-shims": "0.1.0",
"ember-cli-test-loader": "0.2.1",
"ember-data": "~1.13.0 || 2.x",
"ember-load-initializers": "0.1.7",
"ember-qunit": "0.4.16",
"ember-qunit-notifications": "0.1.0",
"ember-resolver": "~0.1.20",
"jquery": "1.11.3",
"loader.js": "ember-cli/loader.js#3.4.0",
"qunit": "~1.20.0",
"ember": "~2.8.0",
"ember-cli-shims": "0.1.1",
"pouchdb": "^5.4.5",
"relational-pouch": "^1.4.4",
"phantomjs-polyfill-object-assign": "chuckplantain/phantomjs-polyfill-object-assign",
"pouchdb-find": "^0.10.2"
"pouchdb-find": "^0.10.3",
"phantomjs-polyfill-object-assign": "chuckplantain/phantomjs-polyfill-object-assign"
}
}
131 changes: 89 additions & 42 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,76 +1,123 @@
/*jshint node:true*/
module.exports = {
scenarios: [
{
name: 'ember-data-2.0',
dependencies: {
'ember': '2.0.2',
'ember-data': '2.0.1',
'ember-cli-shims': '0.0.6'
name: 'ember-2.0-stack',
npm: {
devDependencies: {
'ember-data': '2.0.1'
}
},
resolutions: {
'ember': '2.0.2'
bower: {
dependencies: {
'ember': '2.0.3',
'ember-data': '2.0.1',
'ember-cli-shims': '0.0.6'
}
}
},
{
name: 'ember-data-2.1',
dependencies: {
'ember': '2.1.1',
'ember-data': '2.1.0',
'ember-cli-shims': '0.0.6'
name: 'ember-2.1-stack',
npm: {
devDependencies: {
'ember-data': '2.1.0'
}
},
resolutions: {
'ember': '2.1.1'
bower: {
dependencies: {
'ember': '2.1.2',
'ember-data': '2.1.0',
'ember-cli-shims': '0.0.6'
}
}
},
{
name: 'ember-data-2.2',
dependencies: {
'ember': '2.2.0',
'ember-data': '2.2.1',
'ember-cli-shims': '0.0.6'
name: 'ember-2.2-stack',
npm: {
devDependencies: {
'ember-data': '2.2.1'
}
},
resolutions: {
'ember': '2.2.0'
bower: {
dependencies: {
'ember': '2.2.2',
'ember-data': '2.2.1',
'ember-cli-shims': '0.0.6'
}
}
},
{
name: 'ember-data-2.3',
dependencies: {
'ember': '2.2.1',
'ember-data': '2.3.0',
name: 'ember-2.3-stack',
npm: {
devDependencies: {
'ember-data': '2.3.3'
}
},
resolutions: {
'ember': '2.2.1'
bower: {
dependencies: {
'ember': '2.3.2'
}
}
},
{
name: 'ember-2.4-stack',
npm: {
devDependencies: {
'ember-data': '2.4.3'
}
},
bower: {
dependencies: {
'ember': '2.4.6'
}
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release',
'ember-data': 'components/ember-data#release'
npm: {
devDependencies: {
'ember-data': 'components/ember-data#release'
}
},
resolutions: {
'ember': 'release'
bower: {
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
}
},
{
name: 'ember-beta',
dependencies: {
'ember': 'components/ember#beta',
'ember-data': 'components/ember-data#beta'
npm: {
devDependencies: {
'ember-data': 'components/ember-data#beta'
}
},
resolutions: {
'ember': 'beta'
bower: {
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary',
'ember-data': 'components/ember-data#canary'
npm: {
devDependencies: {
'ember-data': 'components/ember-data#canary'
}
},
resolutions: {
'ember': 'canary'
bower: {
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
}
}
]
Expand Down
5 changes: 2 additions & 3 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ module.exports = function(defaults) {
});

/*
This build file specifes the options for the dummy test app of this
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/

app.import('bower_components/phantomjs-polyfill-object-assign/object-assign-polyfill.js', {
type: 'test'
});

return app.toTree();
};
Loading

0 comments on commit 7ccd2ad

Please sign in to comment.