Skip to content

Commit

Permalink
Merge pull request #112 from holandes22/master
Browse files Browse the repository at this point in the history
Updating to latest ember-cli (1.13.1) closes #107
  • Loading branch information
benkonrath committed Jul 15, 2015
2 parents 547f8ee + 05e8dcf commit a68ee08
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 39 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dist/
.npmignore
**/.gitkeep
bower.json
ember-cli-build.js
Brocfile.js
testem.json
16 changes: 0 additions & 16 deletions Brocfile.js

This file was deleted.

10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "ember-django-adapter",
"dependencies": {
"ember": "1.12.1",
"ember": "1.13.3",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.5",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-qunit": "0.3.3",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
"ember-qunit": "0.4.1",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.15",
"ember-resolver": "~0.1.18",
"jquery": "^1.11.1",
"loader.js": "ember-cli/loader.js#3.2.0",
"qunit": "~1.17.1",
"sinon": "http://sinonjs.org/releases/sinon-1.12.2.js",
"pretender": "~0.6.0"
"pretender": "^0.6.0"
}
}
2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
scenarios: [
{
name: 'ember-data-beta',
name: 'ember-data-stable',
dependencies: {
'ember-data': '1.13.5'
}
Expand Down
17 changes: 17 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
});

/*
This build file specifes 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
*/

return app.toTree();
};
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
"test": "ember try ember-data-stable"
},
"repository": "https://github.com/dustinfarris/ember-django-adapter",
"engines": {
Expand All @@ -19,15 +19,17 @@
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"ember-cli": "0.2.7",
"ember-cli-app-version": "0.3.3",
"ember-cli": "1.13.1",
"ember-cli-app-version": "0.4.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.0",
"ember-cli-htmlbars": "0.7.6",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-htmlbars": "0.7.9",
"ember-cli-htmlbars-inline-precompile": "^0.1.1",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-pretender": "0.3.2",
"ember-cli-qunit": "0.3.13",
"ember-cli-qunit": "0.3.15",
"ember-cli-release": "0.2.3",
"ember-cli-uglify": "^1.0.1",
"ember-data": "1.13.5",
"ember-disable-prototype-extensions": "^1.0.0",
Expand All @@ -37,9 +39,9 @@
"ember-try": "0.0.6"
},
"keywords": [
"ember-addon",
"adapter",
"django",
"ember-addon",
"ember-data"
],
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion tests/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@
"strict": false,
"white": false,
"eqnull": true,
"esnext": true
"esnext": true,
"unused": true
}
10 changes: 5 additions & 5 deletions tests/acceptance/crud-failure-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ module('Acceptance: CRUD Failure', {
server = new Pretender(function() {

// Permission denied error
this.get('/test-api/posts/1/', function(request) {
this.get('/test-api/posts/1/', function() {
return [401, {'Content-Type': 'application/json'}, JSON.stringify({detail: 'Authentication credentials were not provided.'})];
});

// Server error
this.get('/test-api/posts/2/', function(request) {
this.get('/test-api/posts/2/', function() {
// This is the default error page for Django when DEBUG is set to False.
return [500, {'Content-Type': 'application/json'}, JSON.stringify({detail: 'Something bad'})];
});

// Authentication Invalid error
this.post('/test-api/posts/3', function(request) {
this.post('/test-api/posts/3', function() {
return [400, {'Content-Type': 'application/json'}, JSON.stringify({name: 'error 1', non_field_errors: 'error 2'})];
});

Expand All @@ -52,15 +52,15 @@ module('Acceptance: CRUD Failure', {
});

// Update field errors
this.get('/test-api/posts/3/', function(request) {
this.get('/test-api/posts/3/', function() {
return [200, {'Content-Type': 'application/json'}, JSON.stringify({
id: 3,
post_title: 'post title 3',
body: 'post body 3',
comments: []
})];
});
this.put('/test-api/posts/3/', function(request) {
this.put('/test-api/posts/3/', function() {
return [400, {'Content-Type': 'application/json'}, JSON.stringify({
post_title: ['Ensure this value has at most 50 characters (it has 53).'],
body: ['This field is required.']
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/crud-success-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module('Acceptance: CRUD Success', {
});

// Retrieve single record
this.get('/test-api/posts/1/', function(request) {
this.get('/test-api/posts/1/', function() {
return [200, {'Content-Type': 'application/json'}, JSON.stringify(posts[0])];
});

Expand All @@ -67,7 +67,7 @@ module('Acceptance: CRUD Success', {
});

// Delete record
this.delete('/test-api/posts/1/', function(request) {
this.delete('/test-api/posts/1/', function() {
return [204];
});
});
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<h2 id="title">Welcome to Ember.js</h2>

{{outlet}}
{{outlet}}
1 change: 0 additions & 1 deletion tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Ember from 'ember';
import Application from '../../app';
import Router from '../../router';
import config from '../../config/environment';

export default function startApp(attrs) {
Expand Down

0 comments on commit a68ee08

Please sign in to comment.