Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
Update all the things... (#58)
Browse files Browse the repository at this point in the history
* updated packages and ember-cli-deploy

(cherry picked from commit e4042d8)

* Bring back `.env.example`.

* Update ember-cli from 2.14 to 2.18 blueprint.

* Remove bower and phantom references.

* Fix linting failures after eslint config updates.

* yarn upgrade

* Loosen dependencies (all use `^` now).

* Update ember-moment and ember-cli-moment-shim to latest.

* Remove legacy zeroclipboard app.imports.

* Use `--no-sandbox` flag with Chrome on CI.

* Update tests to emberjs/rfcs#232 format.
  • Loading branch information
rwjblue authored and locks committed Jan 16, 2018
1 parent c82bd19 commit 02014d7
Show file tree
Hide file tree
Showing 47 changed files with 2,939 additions and 2,243 deletions.
37 changes: 35 additions & 2 deletions .eslintrc.js
Expand Up @@ -4,10 +4,43 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
},
overrides: [
// node files
{
files: [
'testem.js',
'ember-cli-build.js',
'config/**/*.js'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
}
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
}
}
]
};
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

14 changes: 11 additions & 3 deletions .travis.yml
Expand Up @@ -4,22 +4,30 @@ node_js:
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
yarn: true

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add bower phantomjs-prebuilt
- phantomjs --version

install:
- yarn install --non-interactive
- bower install

script:
- yarn lint:js
- yarn test

deploy:
skip_cleanup: true
provider: script
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/capitalize.js
@@ -1,8 +1,8 @@
import Ember from 'ember';
import { helper } from '@ember/component/helper';
import { capitalize as capitalizeUtil } from '@ember/string';

export function capitalize([name]/*, hash*/) {
return capitalizeUtil(name);
}

export default Ember.Helper.helper(capitalize);
export default helper(capitalize);
4 changes: 2 additions & 2 deletions app/index.html
Expand Up @@ -9,8 +9,8 @@

{{content-for "head"}}

<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/builds.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/builds.css">

{{content-for "head-footer"}}
</head>
Expand Down
13 changes: 9 additions & 4 deletions app/lib/s3-bucket.js
@@ -1,12 +1,10 @@
import $ from 'jquery';
import { on } from '@ember/object/evented';
import { A } from '@ember/array';
import EmberObject, { computed, observer } from '@ember/object';
import S3File from './s3-file';


export default EmberObject.extend({
files: [],
isLoading: false,

// Setup these as default values.
Expand Down Expand Up @@ -60,6 +58,13 @@ export default EmberObject.extend({
return this.get('files').length;
}),

init() {
this._super(...arguments);
this.files = [];

this.load();
},

filterFiles(filter, ignoreFiles){
let files = this.get('files');

Expand All @@ -72,7 +77,7 @@ export default EmberObject.extend({
});
},

load: on('init', observer('queryUrl', function() {
load: observer('queryUrl', function() {
let self = this;
this.set('isLoading', true);

Expand All @@ -82,7 +87,7 @@ export default EmberObject.extend({
return b.lastModified - a.lastModified;
}));
});
})),
}),

loadAllPages(marker, files) {
let self = this;
Expand Down
2 changes: 1 addition & 1 deletion app/mixins/projects.js
Expand Up @@ -4,7 +4,7 @@ import Mixin from '@ember/object/mixin';
import Project from '../lib/project';

export default Mixin.create({
projects: computed('channel', 'model', 'model.files', 'model.releaseSteps', function() {
projects: computed('channel', 'model', 'model.{files,releaseSteps}', function() {
let projects = Project.find(this.get('channel'));
let bucket = this.get('model');

Expand Down
9 changes: 0 additions & 9 deletions bower.json

This file was deleted.

2 changes: 1 addition & 1 deletion config/deploy.js
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */

module.exports = function(deployTarget) {
var ENV = {
Expand Down
3 changes: 2 additions & 1 deletion config/environment.js
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(environment) {
Expand Down Expand Up @@ -44,9 +43,11 @@ module.exports = function(environment) {
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}

if (environment === 'production') {
// here you can enable a production-specific feature
ENV.rootURL = '/builds';
}

Expand Down
1 change: 0 additions & 1 deletion config/targets.js
@@ -1,4 +1,3 @@
/* eslint-env node */
module.exports = {
browsers: [
'ie 9',
Expand Down
3 changes: 0 additions & 3 deletions ember-cli-build.js
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

const EmberApp = require('ember-cli/lib/broccoli/ember-app');
Expand All @@ -20,8 +19,6 @@ module.exports = function(defaults) {
// 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.
app.import('bower_components/zeroclipboard/ZeroClipboard.js');
app.import('bower_components/zeroclipboard/ZeroClipboard.swf');

return app.toTree();
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 31 additions & 28 deletions package.json
@@ -1,6 +1,7 @@
{
"name": "builds",
"version": "0.0.0",
"private": true,
"description": "Small description for builds goes here",
"license": "MIT",
"author": "",
Expand All @@ -11,44 +12,46 @@
"repository": "",
"scripts": {
"build": "ember build",
"start": "ember server",
"lint:js": "eslint ./*.js app config lib server tests",
"start": "ember serve",
"test": "ember test"
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"broccoli-asset-rev": "^2.6.0",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.14.2",
"ember-cli-app-version": "^3.0.0",
"ember-cli": "~2.18.0",
"ember-cli-app-version": "^3.1.0",
"ember-cli-babel": "^6.8.1",
"ember-cli-clipboard": "0.5.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-deploy": "1.0.1",
"ember-cli-deploy-build": "0.1.1",
"ember-cli-deploy-display-revisions": "0.2.2",
"ember-cli-deploy-gzip": "0.2.3",
"ember-cli-deploy-json-config": "0.2.0",
"ember-cli-deploy-revision-data": "^0.3.2",
"ember-cli-deploy-s3": "0.3.2",
"ember-cli-deploy-s3-index": "0.5.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-mirage": "0.1.13",
"ember-cli-moment-shim": "1.1.0",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-clipboard": "^0.8.0",
"ember-cli-dependency-checker": "^2.0.1",
"ember-cli-deploy": "^1.0.1",
"ember-cli-deploy-build": "^1.1.0",
"ember-cli-deploy-display-revisions": "^1.0.0",
"ember-cli-deploy-gzip": "^1.0.0",
"ember-cli-deploy-json-config": "^1.0.0",
"ember-cli-deploy-revision-data": "^1.0.0",
"ember-cli-deploy-s3": "^1.1.0",
"ember-cli-deploy-s3-index": "^1.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-htmlbars": "^2.0.3",
"ember-cli-htmlbars-inline-precompile": "^1.0.2",
"ember-cli-inject-live-reload": "^1.7.0",
"ember-cli-mirage": "^0.4.0",
"ember-cli-moment-shim": "^3.4.0",
"ember-cli-qunit": "^4.1.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-cli-uglify": "^2.0.0",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-moment": "6.1.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.14.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-moment": "^7.5.0",
"ember-resolver": "^4.4.0",
"ember-source": "~2.18.0",
"eslint-plugin-ember": "^5.0.0",
"loader.js": "^4.2.3"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
},
"private": true
}
}
15 changes: 0 additions & 15 deletions public/crossdomain.xml

This file was deleted.

18 changes: 14 additions & 4 deletions testem.js
@@ -1,12 +1,22 @@
/* eslint-env node */
module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'PhantomJS'
'Chrome'
],
launch_in_dev: [
'PhantomJS',
'Chrome'
]
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
'--disable-gpu',
'--headless',
'--no-sandbox',
'--remote-debugging-port=0',
'--window-size=1440,900'
]
}
}
};
5 changes: 0 additions & 5 deletions tests/.eslintrc.js

This file was deleted.

0 comments on commit 02014d7

Please sign in to comment.