Skip to content

Commit

Permalink
Merge pull request #8 from martinic/embercli34
Browse files Browse the repository at this point in the history
Upgrade to ember 3.4
  • Loading branch information
hhff authored Mar 19, 2019
2 parents 72f34fd + 454069c commit 796a737
Show file tree
Hide file tree
Showing 45 changed files with 11,381 additions and 649 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

14 changes: 0 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
51 changes: 51 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
},
overrides: [
// node files
{
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
};
22 changes: 14 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# 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
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

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

This file was deleted.

40 changes: 27 additions & 13 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
bower_components/
tests/
tmp/
dist/
# compiled output
/dist/
/tmp/

.bowerrc
.editorconfig
.ember-cli
.travis.yml
.npmignore
**/.gitkeep
bower.json
Brocfile.js
testem.json
# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.eslintignore
/.eslintrc.js
/.gitignore
/.watchmanconfig
/.travis.yml
/bower.json
/config/ember-try.js
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
};
54 changes: 37 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
---
language: node_js
node_js:
- "0.12"
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- node_modules
- $HOME/.npm

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
global:
# See https://git.io/vdao3 for details.
- JOBS=1

matrix:
fast_finish: true
jobs:
fail_fast: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"
include:
# runs linting and tests with current locked deps

- stage: "Tests"
name: "Tests"
script:
- npm run lint:hbs
- npm run lint:js
- npm test

install:
- npm install -g bower
- npm install
- bower install
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: "Additional Tests"
env: EMBER_TRY_SCENARIO=ember-lts-2.16
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery

before_install:
- npm config set spin false
- npm install -g npm@4
- npm --version

script:
- ember try $EMBER_TRY_SCENARIO test
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2018

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
14 changes: 14 additions & 0 deletions MODULE_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Module Report
### Unknown Global

**Global**: `Ember.Logger`

**Location**: `addon\components\ember-chimp.js` at line 8

```js
inject: { service },
computed,
Logger,
Component
} = Ember;
```
16 changes: 8 additions & 8 deletions addon/components/ember-chimp.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { equal } from '@ember/object/computed';
import { get } from '@ember/object';
import { inject as service } from '@ember/service';
import Component from '@ember/component';
import Ember from 'ember';
import defaultResponses from 'ember-chimp/lib/default-responses';

const {
get,
inject: { service },
computed,
Logger,
Component
Logger
} = Ember;

/**
Expand All @@ -22,7 +22,7 @@ const {
function endsWith(string, suffix) {
return string.indexOf(suffix, string.length - suffix.length) !== -1;
}

/**
The EmberChimp component provides a simple, flexible
email list signup form, specifically for integrating
Expand All @@ -45,7 +45,7 @@ export default Component.extend({
loadingText: 'Loading...',
didSubmitAction: null,
responses: defaultResponses,
isLoading: computed.equal('chimpState', 'loading'),
isLoading: equal('chimpState', 'loading'),
ajax: service(),

actions: {
Expand Down Expand Up @@ -86,7 +86,7 @@ export default Component.extend({
.then(response => this.handleResponse(response))
.catch(() => this._triggerInvalid());

if (this.get('didSubmitAction')) { this.sendAction('didSubmitAction', request); }
if (this.didSubmitAction) { this.didSubmitAction(request); }
},

/**
Expand Down
2 changes: 1 addition & 1 deletion app/components/ember-chimp.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from 'ember-chimp/components/ember-chimp';
export { default } from 'ember-chimp/components/ember-chimp';
18 changes: 0 additions & 18 deletions bower.json

This file was deleted.

Loading

0 comments on commit 796a737

Please sign in to comment.