-
-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade ember-cli to 0.1.4 and fix related breakage. closes #18
- Loading branch information
1 parent
9365205
commit 238bb40
Showing
28 changed files
with
221 additions
and
505 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"directory": "vendor" | ||
"directory": "bower_components", | ||
"analytics": false | ||
} |
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,33 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.hbs] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.css] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.html] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,9 @@ | ||
{ | ||
/** | ||
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": false | ||
} |
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 |
---|---|---|
|
@@ -6,8 +6,7 @@ | |
|
||
# dependencies | ||
/node_modules | ||
/vendor/* | ||
!/vendor/json-api.js | ||
/bower_components | ||
|
||
# misc | ||
/.sass-cache | ||
|
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,20 @@ | ||
--- | ||
language: node_js | ||
|
||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
|
||
before_install: | ||
- "npm config set spin false" | ||
- "npm install -g npm@^2" | ||
|
||
install: | ||
- npm install -g bower | ||
- npm install | ||
- bower install | ||
|
||
script: | ||
- npm test |
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 |
---|---|---|
@@ -1,26 +1,37 @@ | ||
import Ember from 'ember'; | ||
import DS from 'ember-data'; | ||
|
||
export default DS.JsonApiAdapter.extend({ | ||
import JsonApiAdapter from 'ember-json-api/json-api-adapter'; | ||
export default JsonApiAdapter.extend({ | ||
host: '/api', | ||
|
||
xhr: [], | ||
findQuery: function(store, type, query) { | ||
var ids = null; | ||
if (query.ids) { | ||
ids = query.ids.join(','); | ||
delete query.ids; | ||
} | ||
return this.ajax(this.buildURL(type.typeKey, ids), 'GET', {data: query}); | ||
}, | ||
}); | ||
|
||
ajax: function(url, type, hash) { | ||
var adapter = this; | ||
// export default DS.JsonApiAdapter.extend({ | ||
// host: '/api', | ||
|
||
return new Ember.RSVP.Promise(function(resolve, reject) { | ||
hash = adapter.ajaxOptions(url, type, hash); | ||
// // xhr: [], | ||
|
||
hash.success = function(json) { | ||
Ember.run(null, resolve, json); | ||
}; | ||
// // ajax: function(url, type, hash) { | ||
// // var adapter = this; | ||
|
||
hash.error = function(jqXHR, textStatus, errorThrown) { | ||
Ember.run(null, reject, adapter.ajaxError(jqXHR)); | ||
}; | ||
// // return new Ember.RSVP.Promise(function(resolve, reject) { | ||
// // hash = adapter.ajaxOptions(url, type, hash); | ||
|
||
adapter.xhr.push(Ember.$.ajax(hash)); | ||
}, "DS: RestAdapter#ajax " + type + " to " + url); | ||
}, | ||
}); | ||
// // hash.success = function(json) { | ||
// // Ember.run(null, resolve, json); | ||
// // }; | ||
|
||
// // hash.error = function(jqXHR, textStatus, errorThrown) { | ||
// // Ember.run(null, reject, adapter.ajaxError(jqXHR)); | ||
// // }; | ||
|
||
// // adapter.xhr.push(Ember.$.ajax(hash)); | ||
// // }, "DS: RestAdapter#ajax " + type + " to " + url); | ||
// // }, | ||
// }); |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Handlebars.makeBoundHelper(function(number, options) { | ||
return new Handlebars.SafeString(number); | ||
return new Ember.Handlebars.SafeString(''+number); | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import Ember from 'ember'; | ||
import DS from 'ember-data'; | ||
import JsonApiSerializer from 'ember-json-api/json-api-serializer'; | ||
export default JsonApiSerializer.extend({ | ||
normalize: function(type, hash, property) { | ||
var json = {}; | ||
|
||
export default DS.JsonApiSerializer.extend({ | ||
normalize: function(type, hash, property) { | ||
var json = {}; | ||
for (var prop in hash) { | ||
json[prop.camelize()] = hash[prop]; | ||
} | ||
|
||
for (var prop in hash) { | ||
json[prop.camelize()] = hash[prop]; | ||
} | ||
|
||
return this._super(type, json, property); | ||
} | ||
}); | ||
return this._super(type, json, property); | ||
} | ||
}); |
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
Oops, something went wrong.