Commit 779ab09b authored by Miguel Camba's avatar Miguel Camba Committed by Addy Osmani

Update to Ember 2.10 and use HashLocation (#1722)

parent 0a0af214
......@@ -35,9 +35,9 @@
"examples/binding-scala/js/*.js",
"examples/duel/www/**",
"examples/duel/src/main/webapp/js/lib/**",
"examples/ember-cli/todomvc/dist/**/*.js",
"examples/ember-cli/todomvc/testem.js",
"examples/ember-cli/assets/**/*.js",
"examples/emberjs/todomvc/dist/**/*.js",
"examples/emberjs/todomvc/testem.js",
"examples/emberjs/assets/**/*.js",
"examples/elm/build/elm.js",
"examples/elm/elm-stuff/**",
"examples/humble/js/**",
......
......@@ -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
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
# /dist
......@@ -13,5 +13,5 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
testem.log
......@@ -27,6 +27,6 @@
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"esversion": 6,
"unused": true
}
......@@ -7,12 +7,15 @@ sudo: false
cache:
directories:
- node_modules
- $HOME/.npm
- $HOME/.cache # includes bowers cache
before_install:
- npm config set spin false
- npm install -g bower
- bower --version
- npm install phantomjs-prebuilt
- node_modules/phantomjs-prebuilt/bin/phantomjs --version
install:
- npm install
......
......@@ -6,19 +6,19 @@
<title>Todomvc</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/examples/ember-cli/index.html" />
{{content-for "head"}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/todomvc.css">
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/todomvc.css">
{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}
<script src="assets/vendor.js"></script>
<script src="assets/todomvc.js"></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/todomvc.js"></script>
{{content-for "body-footer"}}
</body>
......
......@@ -2,7 +2,8 @@ import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: config.locationType
location: config.locationType,
rootURL: config.rootURL
});
Router.map(function () {
......
{
"name": "todomvc",
"dependencies": {
"ember": "~2.6.0",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
"ember": "~2.10.0",
"ember-cli-shims": "0.1.3"
}
}
......@@ -5,11 +5,15 @@ module.exports = function (environment) {
modulePrefix: 'todomvc',
environment: environment,
baseURL: null,
locationType: 'auto',
locationType: 'hash',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false
}
},
......@@ -29,7 +33,7 @@ module.exports = function (environment) {
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.rootURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
......
......@@ -6,21 +6,21 @@
<title>Todomvc</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/examples/emberjs/index.html" />
<meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3Anull%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+b72d5e59%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
<link rel="stylesheet" href="assets/vendor-7b5c98520910afa58d74e05ec86cd873.css">
<link rel="stylesheet" href="assets/todomvc-d41d8cd98f00b204e9800998ecf8427e.css">
<meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3Anull%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+47754603%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
<link rel="stylesheet" href="assets/vendor-7b5c98520910afa58d74e05ec86cd873.css" integrity="sha256-bsagGHduhay9QPLUFpddcZFq7Kmr2ScM3VKnWhdX8oM= sha512-eNsGN2aLecWPvoqNVH8oXK8o/IJ7rO5ti0zgS8lF8LiwmKUHdEIuFduwcDL1VLAt2r+3YjgDzoSNYK6c57pJzw==" >
<link rel="stylesheet" href="assets/todomvc-d41d8cd98f00b204e9800998ecf8427e.css" integrity="sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==" >
</head>
<body>
<script src="assets/vendor-22a6a947beb9d4b28a782879e18b0f65.js" integrity="sha256-M1pD1q8B9PyrHkKX/mlfsOLLHMrh/x7vvCGLRC63OyI= sha512-I4vC6+4Z29iHB4nJBCzcIjrgMtDerq7sxYLE2lM/AhjkNLp6gf2+Zpne8OtGdTLRkyvTqzPm1V7gq9w4HQxOXg==" ></script>
<script src="assets/todomvc-d191d5c1c9280b108d69413f052d3bb4.js" integrity="sha256-1wUxToLQP6yjsvm0/8e3xQnv7SbSYcj3P/OPEdThZOk= sha512-X5K7gsPRYsUSRvJcnj80SLlclDd4X/g1Qgle1L1P4Zb63eUM0mYEfQECBcjcks7iZFItSGr8EVPOVELXO35HUA==" ></script>
<script src="assets/vendor-fe6aaf6bf08a00247e9bb45b00c6c98c.js"></script>
<script src="assets/todomvc-abee913429a66e32e34b282e3460218c.js"></script>
</body>
</html>
......@@ -2,41 +2,42 @@
"name": "todomvc",
"version": "0.0.0",
"description": "Small description for todomvc goes here",
"private": true,
"license": "MIT",
"author": "Miguel Camba",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "",
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "0.7.1",
"ember-cli": "2.5.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.6",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-qunit": "^1.4.0",
"ember-cli-release": "0.2.8",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "^2.10.0",
"ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-export-application-global": "^1.0.5",
"ember-inflector": "1.9.4",
"ember-inflector": "1.9.6",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "^4.0.1"
}
"loader.js": "^4.0.10"
},
"engines": {
"node": ">= 0.12.0"
},
"private": true
}
......@@ -47,6 +47,6 @@
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"esversion": 6,
"unused": true
}
import { module } from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
const { RSVP: { Promise } } = Ember;
export default function (name, options = {}) {
module(name, {
beforeEach() {
......@@ -13,10 +16,8 @@ export default function (name, options = {}) {
},
afterEach() {
if (options.afterEach) {
options.afterEach.apply(this, arguments);
}
destroyApp(this.application);
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
}
});
}
......@@ -5,8 +5,8 @@ import config from '../../config/environment';
export default function startApp(attrs) {
let application;
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
// use defaults, but you can override
let attributes = Ember.assign({}, config.APP, attrs);
Ember.run(() => {
application = Application.create(attributes);
......
......@@ -10,9 +10,9 @@
{{content-for "head"}}
{{content-for "test-head"}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/todomvc.css">
<link rel="stylesheet" href="assets/test-support.css">
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/todomvc.css">
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
{{content-for "head-footer"}}
{{content-for "test-head-footer"}}
......@@ -21,12 +21,11 @@
{{content-for "body"}}
{{content-for "test-body"}}
<script src="testem.js" integrity=""></script>
<script src="assets/vendor.js"></script>
<script src="assets/test-support.js"></script>
<script src="assets/todomvc.js"></script>
<script src="assets/tests.js"></script>
<script src="assets/test-loader.js"></script>
<script src="/testem.js" integrity=""></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/todomvc.js"></script>
<script src="{{rootURL}}assets/tests.js"></script>
{{content-for "body-footer"}}
{{content-for "test-body-footer"}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment