Skip to content

Commit

Permalink
Merge pull request #40 from Exelord/ember-3.0
Browse files Browse the repository at this point in the history
Upgrade to ember 3.0
  • Loading branch information
Exelord committed Mar 7, 2018
2 parents 987e8c4 + 204059c commit 863519a
Show file tree
Hide file tree
Showing 22 changed files with 4,543 additions and 4,741 deletions.
44 changes: 36 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,45 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember-suave/recommended'
'plugin:ember/recommended'
],
env: {
'browser': true
browser: true
},
rules: {
},
globals: {
swal: true,
EmberENV: true,
moment: true,
autosize: true
}
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'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
})
}
]
};
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
Expand All @@ -40,6 +41,7 @@ before_install:
- npm --version

script:
- npm run lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
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) 2017
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
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,27 +311,27 @@ You can pass a query params for a request by passing an `{}` with properties, eg

# Development

## Installation
### Installation

* `git clone https://github.com/Exelord/ember-custom-actions.git`
* `cd ember-custom-actions`
* `npm install`
* `bower install`

## Running
### Linting

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* `npm run lint:js`
* `npm run lint:js -- --fix`

## Running Tests
### Running tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
* `ember test` Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `npm test` – Runs `ember try:each` to test your addon against multiple Ember versions

## Building
### Running the dummy application

* `ember build`
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

Expand Down
14 changes: 13 additions & 1 deletion addon/actions/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const promiseProxies = {
export default EmberObject.extend({
id: '',
model: null,
options: {},
instance: false,
integrated: false,

Expand All @@ -33,11 +32,21 @@ export default EmberObject.extend({
},

/**
@private
@return {DS.Store}
*/
store: readOnly('model.store'),

/**
@public
@return {Object}
*/
options: computed(function() {
return {};
}),

/**
@private
@return {String}
*/
modelName: computed('model', function() {
Expand All @@ -46,20 +55,23 @@ export default EmberObject.extend({
}).readOnly(),

/**
@private
@return {DS.Adapter}
*/
adapter: computed('modelName', 'store', function() {
return this.get('store').adapterFor(this.get('modelName'));
}).readOnly(),

/**
@private
@return {DS.Serializer}
*/
serializer: computed('modelName', 'store', function() {
return this.get('store').serializerFor(this.get('modelName'));
}).readOnly(),

/**
@private
@return {Ember.Object}
*/
config: computed('options', 'model', function() {
Expand Down
135 changes: 65 additions & 70 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,75 +1,70 @@
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
{
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
'use strict';

const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary'),
]).then((urls) => {
return {
scenarios: [
{
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-source': '~2.12.0'
}
}
},
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-beta',
bower: {
dependencies: {
'ember': 'components/ember#beta'
{
name: 'ember-lts-2.16',
npm: {
devDependencies: {
'ember-source': '~2.16.0'
}
}
},
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-canary',
bower: {
dependencies: {
'ember': 'components/ember#canary'
{
name: 'ember-lts-2.18',
npm: {
devDependencies: {
'ember-source': '~2.18.0'
}
}
},
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
{
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': urls[0]
}
}
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': urls[1]
}
}
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
]
};
});
};
1 change: 0 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(environment, appConfig) {
Expand Down
7 changes: 4 additions & 3 deletions config/release.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-env node */
'use strict';

const fs = require('fs');
const path = require('path');
const { exec } = require('child_process');
const exec = require('child_process').exec;

function generateChangelog(project, version) {
let content = `future-release=${version}\n`;
Expand Down Expand Up @@ -43,4 +44,4 @@ module.exports = {
afterPush(project, versions) {
return generateWebsite(versions.next);
}
};
};
1 change: 0 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = {
Expand Down
Loading

0 comments on commit 863519a

Please sign in to comment.