Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upgrade ember 2.5 [NOT GONNA BE MERGABLE ANY TIME SOON] #255

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 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,12 +10,11 @@ cache:
- node_modules

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"
- npm config set spin false
- npm install -g bower
- npm install phantomjs-prebuilt

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

Expand Down
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp"]
"ignore_dirs": ["tmp", "dist"]
}
1 change: 1 addition & 0 deletions Brocfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var templateTree = new HtmlbarsCompiler('app/templates', {
});

var app = new EmberApp({
'hinting': false,
dotEnv: {
clientAllowedKeys: [
'GA',
Expand Down
8 changes: 4 additions & 4 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

var App;
let App;

App = Ember.Application.extend({
LOG_TRANSITIONS: true, // basic logging of successful transitions
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver,
Resolver
});

loadInitializers(App, config.modulePrefix);
Expand Down
2 changes: 1 addition & 1 deletion app/initializers/data-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
export default {
name: 'data-attributes',
initialize: function() {
Ember.View.reopen({
Ember.Component.reopen({
init: function() {
this._super();
var self = this;
Expand Down
3 changes: 3 additions & 0 deletions app/resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Resolver from 'ember-resolver';

export default Resolver;
6 changes: 4 additions & 2 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Ember from 'ember';
import config from './config/environment';
import googlePageview from './mixins/google-pageview';

var Router = Ember.Router.extend(googlePageview,{
const Router = Ember.Router.extend(googlePageview,{
location: config.locationType
});

export default Router.map(function() {
Router.map(function() {
this.route('search');
this.route('downloads');
this.route('colombia');
Expand Down Expand Up @@ -37,3 +37,5 @@ export default Router.map(function() {
});
this.route('rankings');
});

export default Router;
6 changes: 3 additions & 3 deletions app/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export default Ember.Route.extend({
},
model() {
let hash = {
locations: this.store.find('location'),
products: this.store.find('product', { level: '4digit' }),
industries: this.store.find('industry', { level: 'division' })
locations: this.store.findAll('location'),
products: this.store.findAll('product', { level: '4digit' }),
industries: this.store.findAll('industry', { level: 'division' })
};

return RSVP.hash(hash).then((hash) => {
Expand Down
8 changes: 4 additions & 4 deletions app/templates/components/graphbuilder-table.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{#if hasHeader}}
{{view "header-table-container"}}
{{header-table-container}}
{{/if}}

{{view "body-table-container"}}
{{body-table-container}}

{{view "scroll-container"}}
{{view "column-sortable-indicator"}}
{{scroll-container}}
{{column-sortable-indicator}}
2 changes: 1 addition & 1 deletion app/templates/components/search-result.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="results__text">
{{#if isLocation }}
<ul>
{{#each crumb in locationBreadcrumbs}}
{{#each locationBreadcrumbs as |crumb|}}
<li class="results__breadcrumb">
{{crumb.name_es}}
</li>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/select-dropdown.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="index__dropdown__wrap">
<fieldset>
<select name={{type}}>
{{#each item in collection }}
{{#each collection as |item|}}
<option value={{item.id}} selected={{is-equal selected item.id}} >
{{#if addCode}}
{{item.name}}, {{item.code}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/stream-header.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header class="stream__header stream__header--builder">
{{#if isLocation}}
<ul>
{{#each crumb in breadcrumbs}}
{{#each breadcrumbs as |crumb|}}
{{#link-to 'location.show' crumb.id tagName='li' class='breadcrumb'}}
{{crumb.name_es}}
{{/link-to}}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/visualization-legend.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="buildermod__legend">
{{#each key in legend}}
{{#each legend as |key|}}
<div class="buildermod__legend__item">
{{visualization-legend-key key=key }}
</div>
{{else}}
{{/each}}
</div>
</div>
2 changes: 1 addition & 1 deletion app/templates/partials/-buildermod-drawer-change-graph.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="change-visualization__container">
{{#each graph in otherPossibleGraphs}}
{{#each otherPossibleGraphs as |graph|}}
{{#if graph.available}}
{{component 'graphbuilder-change-graph'
toggleVisualization='toggleVisualization'
Expand Down
6 changes: 3 additions & 3 deletions app/templates/search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{#if locationResults.length}}
<h3 class="section__head results__subhead">{{t 'search.results_locations'}}</h3>
<ul class="results__list">
{{#each result in locationResults}}
{{#each locationResults as |result|}}
{{search-result
result=result
tagName="li"
Expand All @@ -40,7 +40,7 @@
{{#if productResults.length}}
<h3 class="section__head results__subhead">{{t 'search.results_products'}}</h3>
<ul class="results__list">
{{#each result in productResults}}
{{#each productResults as |result|}}
{{search-result
result=result
tagName="li"
Expand All @@ -52,7 +52,7 @@
{{#if industryResults.length}}
<h3 class="section__head results__subhead">{{t 'search.results_industries'}}</h3>
<ul class="results__list">
{{#each result in industryResults}}
{{#each industryResults as |result|}}
{{search-result
result=result
tagName="li"
Expand Down
11 changes: 3 additions & 8 deletions app/templates/sortable-cell.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{{#if view.isModel }}
{{#link-to view.profileRoute view.id
tagName='span'
class="ember-table-content"
}}
{{{view.cellContent}}}
{{/link-to}}
{{#if isModel }}
{{{cellContent}}}
{{else}}
<span class="ember-table-content-custom">
{{{view.cellContent}}}
{{{cellContent}}}
</span>
{{/if}}

6 changes: 3 additions & 3 deletions app/templates/sortable-header-cell.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="ember-table-content-container" {{action 'sortByColumn' view.content}}>
<span {{bind-attr class=":ember-table-content view.content.isAscending:table__header--is--ascending view.content.isDescending:table__header--is--descending"}}>
{{t view.content.headerCellName}}
<div class="ember-table-content-container" {{action 'sortByColumn' content}}>
<span {{bind-attr class=":ember-table-content content.isAscending:table__header--is--ascending content.isDescending:table__header--is--descending"}}>
{{t content.headerCellName}}
</span>
</div>

16 changes: 6 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"name": "atlas-colombia",
"dependencies": {
"ember": "1.12.0",
"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.0.0-beta.18",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-qunit": "0.3.3",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.15",
"ember": "~2.5.0",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-load-initializers": "0.5.1",
"ember-qunit": "0.4.20",
"jquery": "1.11.3",
"loader.js": "ember-cli/loader.js#3.2.0",
"qunit": "~1.17.1",
Expand All @@ -31,7 +28,6 @@
"vis-toolkit": "https://github.com/cid-harvard/vis-toolkit.git#master"
},
"resolutions": {
"d3": "~3.5.5",
"qunit": "~1.17.1"
"d3": "~3.5.5"
}
}
24 changes: 24 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');

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

// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.

return app.toTree();
};
48 changes: 27 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
Expand All @@ -19,28 +19,34 @@
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"ember-cli": "1.13.1",
"ember-cli-app-version": "0.3.3",
"ember-cli-autoprefixer": "^0.3.0",
"ember-cli-babel": "^5.0.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.0",
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "2.1.0",
"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",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.5.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "2.0.3",
"ember-table": "Addepar/ember-table#cyril/ember-2.0",
"ivy-tabs": "2.0.0",
"ember-i18n": "4.2.0",
"ember-cli-font-awesome": "1.5.0",
"ember-cli-dotenv": "git://github.com/QuinnLee/ember-cli-dotenv.git",
"ember-cli-font-awesome": "1.2.0",
"ember-cli-github-pages": "0.0.4",
"ember-cli-content-security-policy": "0.5.0",
"ember-cli-autoprefixer": "^0.6.0",
"ember-cli-google-analytics": "^1.3.2",
"ember-cli-htmlbars": "0.7.6",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-numeral": "^0.1.2",
"ember-cli-qunit": "0.3.13",
"ember-cli-sass": "4.0.0-beta.6",
"ember-cli-uglify": "^1.0.1",
"ember-data": "1.0.0-beta.18",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.2",
"ember-i18n": "4.1.1",
"ember-table": "0.9.2",
"ivy-tabs": "1.2.0"
"ember-cli-sass": "5.3.1",
"loader.js": "^4.0.1"
}
}
4 changes: 2 additions & 2 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
http://www.robotstxt.org
# http://www.robotstxt.org
User-agent: *
Disallow: /
Disallow:
13 changes: 13 additions & 0 deletions testem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*jshint node:true*/
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
]
};
5 changes: 3 additions & 2 deletions tests/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"node": false,
"browser": false,
"boss": true,
"curly": true,
"curly": false,
"debug": false,
"devel": false,
Expand All @@ -47,7 +47,8 @@
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"esnext": true,
"unused": true
"sub": true,
"strict": false,
"white": false,
Expand Down
5 changes: 5 additions & 0 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Ember from 'ember';

export default function destroyApp(application) {
Ember.run(application, 'destroy');
}
Loading