Skip to content

Commit

Permalink
Merge branch 'Dhaulagiri-br-updates'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemelia committed Mar 3, 2018
2 parents 93e6bfa + 4e72490 commit a258398
Show file tree
Hide file tree
Showing 21 changed files with 870 additions and 1,021 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
3 changes: 0 additions & 3 deletions .jscsrc

This file was deleted.

5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@
bower.json
ember-cli-build.js
testem.js

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
29 changes: 14 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
---
language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "4"

sudo: false
dist: trusty
sudo: required

addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
chrome: stable

cache:
yarn: true

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

matrix:
fast_finish: true

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add bower

install:
- yarn install --no-lockfile --ignore-engines
- bower install
- yarn install --no-lockfile --ignore-engines --non-interactive

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- ember try:each --skip-cleanup
- node_modules/.bin/ember try:each --skip-cleanup
3 changes: 2 additions & 1 deletion addon/components/basic-dialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import { oneWay } from '@ember/object/computed';
import { isEmpty } from '@ember/utils';
import { inject as service } from '@ember/service';
import layout from '../templates/components/basic-dialog';
Expand All @@ -13,7 +14,7 @@ export default Component.extend({
wrapperClassNames: null,

modalService: service('modal-dialog'),
destinationElementId: computed.oneWay('modalService.destinationElementId'),
destinationElementId: oneWay('modalService.destinationElementId'),

variantWrapperClass: 'emd-static',
containerClassNamesString: computed('containerClassNames.[]', 'targetAttachmentClass', 'attachmentClass', 'containerClass', function() {
Expand Down
9 changes: 5 additions & 4 deletions addon/components/modal-dialog.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { oneWay, readOnly } from '@ember/object/computed';
import Component from '@ember/component';
import { dasherize } from '@ember/string';
import { computed } from '@ember/object';
Expand All @@ -13,7 +14,7 @@ export default Component.extend({
tagName: '',
layout,
modalService: service('modal-dialog'),
destinationElementId: computed.oneWay('modalService.destinationElementId'),
destinationElementId: oneWay('modalService.destinationElementId'),
modalDialogComponentName: computed('renderInPlace', 'tetherTarget', 'animatable', 'hasLiquidWormhole', 'hasLiquidTether', function(){
let tetherTarget = this.get('tetherTarget');
let hasLiquidTether = this.get('hasLiquidTether');
Expand All @@ -33,8 +34,8 @@ export default Component.extend({
return 'ember-modal-dialog/-basic-dialog';
}),
animatable: null,
hasLiquidWormhole: computed.readOnly('modalService.hasLiquidWormhole'),
hasLiquidTether: computed.readOnly('modalService.hasLiquidTether'),
hasLiquidWormhole: readOnly('modalService.hasLiquidWormhole'),
hasLiquidTether: readOnly('modalService.hasLiquidTether'),

didReceiveAttrs() {
this._super(...arguments);
Expand Down Expand Up @@ -71,7 +72,7 @@ export default Component.extend({
clickOutsideToClose: false,
renderInPlace: false,
tetherTarget: null,
stack: computed.oneWay('elementId'), // pass a `stack` string to set a "stack" to be passed to liquid-wormhole / liquid-tether
stack: oneWay('elementId'), // pass a `stack` string to set a "stack" to be passed to liquid-wormhole / liquid-tether
value: 0, // pass a `value` to set a "value" to be passed to liquid-wormhole / liquid-tether

targetAttachment: 'middle center',
Expand Down
5 changes: 0 additions & 5 deletions bower.json

This file was deleted.

2 changes: 2 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-env node */
module.exports = {
useYarn: true,
useVersionCompatibility: true
};
4 changes: 3 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
let app = new EmberAddon(defaults, {
snippetSearchPaths: ['tests/dummy/app']
});

Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"repository": "https://github.com/yapplabs/ember-modal-dialog",
"scripts": {
"build": "ember build",
"start": "ember server",
"start": "ember serve",
"deploy": "ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -",
"test": "ember try:each"
},
Expand All @@ -27,37 +27,37 @@
},
"devDependencies": {
"broccoli-asset-rev": "^2.6.0",
"ember-cli": "^2.13.1",
"ember-cli": "~2.17.0",
"ember-cli-build-notifications": "^0.2.0",
"ember-cli-dependency-checker": "^2.1.0",
"ember-cli-eslint": "^3.1.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-github-pages": "^0.1.3",
"ember-cli-htmlbars-inline-precompile": "^0.4.4",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.7.0",
"ember-cli-lorem-ipsum": "0.0.2",
"ember-cli-qunit": "^4.3.2",
"ember-cli-release": "^1.0.0-beta.2",
"ember-cli-sass": "^6.2.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-cli-sass": "^7.1.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-uglify": "^2.0.0",
"ember-code-snippet": "^1.10.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-native-dom-helpers": "^0.4.0",
"ember-resolver": "^4.1.0",
"ember-source": "~2.13.0",
"ember-source": "~2.17.0",
"ember-tether": "^1.0.0-beta.0",
"ember-truth-helpers": "^1.3.0",
"ember-truth-helpers": "^2.0.0",
"eslint-plugin-ember": "^4.3.0",
"liquid-fire": "^0.27.3",
"liquid-tether": "^2.0.4",
"liquid-wormhole": "^2.0.5",
"loader.js": "^4.4.0"
},
"engines": {
"node": ">= 4"
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
25 changes: 18 additions & 7 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
/* eslint-env node */
module.exports = {
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"Chrome"
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'Chrome'
],
"launch_in_dev": [
"Chrome"
]
launch_in_dev: [
'Chrome'
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
'--disable-gpu',
'--headless',
'--remote-debugging-port=0',
'--window-size=1440,900'
]
}
}
};
4 changes: 1 addition & 3 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let App;

App = Application.extend({
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

{{content-for "head"}}

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

{{content-for "head-footer"}}
</head>
Expand Down
17 changes: 11 additions & 6 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
/* eslint-env node */
'use strict';

module.exports = function(environment) {
var ENV = {
let ENV = {
modulePrefix: 'dummy',
environment: environment,
environment,
rootURL: '/',
locationType: 'auto',
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
}
},

Expand All @@ -24,10 +29,6 @@ module.exports = function(environment) {
}
};

if (environment === 'production') {
ENV.rootURL = '/ember-modal-dialog'; // for gh-pages live demo
}

if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
Expand All @@ -47,5 +48,9 @@ module.exports = function(environment) {
ENV.APP.rootElement = '#ember-testing';
}

if (environment === 'production') {
ENV.rootURL = '/ember-modal-dialog'; // for gh-pages live demo
}

return ENV;
};
1 change: 0 additions & 1 deletion tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-env node */

module.exports = {
browsers: [
'ie 9',
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Promise } from 'rsvp';
import { module } from 'qunit';
import { resolve } from 'rsvp';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

Expand All @@ -15,7 +15,7 @@ export default function(name, options = {}) {

afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
return resolve(afterEach).then(() => destroyApp(this.application));
}
});
}
11 changes: 0 additions & 11 deletions tests/helpers/resolver.js

This file was deleted.

13 changes: 5 additions & 8 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import { run } from '@ember/runloop';
import { merge } from '@ember/polyfills';
import Application from '../../app';
import config from '../../config/environment';
import { merge } from '@ember/polyfills';
import { run } from '@ember/runloop';
import registerAssertHelpers from './modal-asserts';

export default function startApp(attrs) {
let application;

let attributes = merge({}, config.APP);
attributes = merge(attributes, attrs); // use defaults, but you can override;

run(function() {
application = Application.create(attributes);
return run(() => {
let application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
registerAssertHelpers();
return application;
});

return application;
}
9 changes: 5 additions & 4 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import resolver from './helpers/resolver';
import { setResolver } from '@ember/test-helpers';
import { start } from 'ember-cli-qunit';
import Application from '../app';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create({ autoboot: false }));

setResolver(resolver);
start();
Loading

0 comments on commit a258398

Please sign in to comment.