Skip to content

Commit

Permalink
Merge pull request #71 from ember-cli-deploy/chore/update-ember-cli
Browse files Browse the repository at this point in the history
Upgrade ember-cli & embrace being a node-only ember-cli addon
  • Loading branch information
lukemelia authored Mar 25, 2017
2 parents 036d46e + 2dd4b17 commit b06ea06
Show file tree
Hide file tree
Showing 27 changed files with 5,293 additions and 232 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

9 changes: 0 additions & 9 deletions .ember-cli

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
node: true
},
rules: {
}
};
33 changes: 0 additions & 33 deletions .jshintrc

This file was deleted.

15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
---
language: node_js
node_js:
- "0.12"
- "6"

sudo: false

cache:
directories:
- node_modules
yarn: true

before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- npm install -g bower
- npm install
- bower install
- yarn install --no-lockfile

script:
- npm test
- yarn test
21 changes: 0 additions & 21 deletions Brocfile.js

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,13 @@ The following properties are used if present on the deployment `context` object:

## Running Tests

- `npm test`
* yarn test

[1]: https://github.com/lukemelia/ember-cli-deploy-lightning-pack "ember-cli-deploy-lightning-pack"
## Why `ember build` and `ember test` don't work

Since this is a node-only ember-cli addon, this package does not include many files and dependencies which are part of ember-cli's typical `ember build` and `ember test` processes.

[1]: https://github.com/ember-cli-deploy/ember-cli-deploy-lightning-pack "ember-cli-deploy-lightning-pack"
[2]: http://ember-cli.github.io/ember-cli-deploy/plugins "Plugin Documentation"
[3]: https://www.npmjs.com/package/redis "Redis Client"
[4]: https://github.com/ember-cli-deploy/ember-cli-deploy-build "ember-cli-deploy-build"
Expand Down
13 changes: 3 additions & 10 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@ The following steps should navigate you through the release process to ensure as

## Steps

### Commit the changelog and publish to NPM
### Commit the changelog, bump version, and publish to NPM

1. run `./bin/changelog` and add output to `CHANGELOG.md`
2. edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes etc.)
3. bump package.json version
4. `./bin/prepare-release`
5. `git checkout master`
6. `git add` the modified `package.json` and `CHANGELOG.md`
7. `git commit -m "Release vx.y.z"`
8. `git push upstream master`
9. `git tag "vx.y.z"`
10. `git push upstream vx.y.z`
11. `npm publish ./ember-cli-deploy-redis-<version>.tgz`
3. `ember release`
4. `npm publish`

### Create a github release

Expand Down
Empty file removed addon/.gitkeep
Empty file.
Empty file removed app/.gitkeep
Empty file.
8 changes: 0 additions & 8 deletions bin/prepare-release

This file was deleted.

16 changes: 0 additions & 16 deletions bower.json

This file was deleted.

10 changes: 0 additions & 10 deletions circle.yml

This file was deleted.

5 changes: 0 additions & 5 deletions config/environment.js

This file was deleted.

20 changes: 0 additions & 20 deletions config/release.js

This file was deleted.

3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ module.exports = {
this.log('config ok', { verbose: true });
},

upload: function(context) {
upload: function(/* context */) {
var redisDeployClient = this.readConfig('redisDeployClient');
var revisionKey = this.readConfig('revisionKey');
var distDir = this.readConfig('distDir');
var filePattern = this.readConfig('filePattern');
var keyPrefix = this.readConfig('keyPrefix');
var maxRecentUploads = this.readConfig('maxRecentUploads');
var filePath = path.join(distDir, filePattern);

this.log('Uploading `' + filePath + '`', { verbose: true });
Expand Down
4 changes: 2 additions & 2 deletions lib/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module.exports = CoreObject.extend({
this._client = redisLib.createClient(redisOptions);

this._maxRecentUploads = options.maxRecentUploads;
this._allowOverwrite = options.allowOverwrite;
this._activationSuffix = options.activationSuffix || 'current';
this._allowOverwrite = options.allowOverwrite;
this._activationSuffix = options.activationSuffix || 'current';
},

upload: function(/*keyPrefix, revisionKey, value*/) {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "tests"
},
"scripts": {
"test": "node tests/runner.js"
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/**/*.js"
},
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-redis",
"engines": {
Expand All @@ -16,22 +16,22 @@
"author": "Aaron Chambers and the ember-cli-deploy team",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.0.2",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"ember-cli": "2.9.1",
"ember-cli-release": "0.2.6",
"ember-cli": "^2.12.0",
"ember-cli-release": "1.0.0-beta.2",
"eslint": "^3.18.0",
"github": "^6.1.0",
"glob": "^7.1.1",
"mocha": "^3.1.2",
"mocha": "^3.2.0",
"multiline": "^1.0.2"
},
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"dependencies": {
"chalk": "^1.0.0",
"chalk": "^1.1.3",
"core-object": "^2.0.6",
"ember-cli-deploy-plugin": "^0.2.9",
"redis": "^2.6.3",
Expand Down
11 changes: 0 additions & 11 deletions testem.json

This file was deleted.

10 changes: 10 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
globals: {
"describe": true,
"beforeEach": true,
"it": true
},
env: {
mocha: true
}
};
51 changes: 0 additions & 51 deletions tests/.jshintrc

This file was deleted.

3 changes: 1 addition & 2 deletions tests/helpers/fake-redis-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* jshint node: true */
var Promise = require('ember-cli/lib/ext/promise');
var CoreObject = require('core-object');

Expand All @@ -8,7 +7,7 @@ module.exports = CoreObject.extend({
this.recentRevisions = [];
this.options = options;
},
get: function(key) {
get: function(/* key */) {
return Promise.resolve('some-other-value');
},
set: function() { },
Expand Down
5 changes: 3 additions & 2 deletions tests/runner.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*eslint-env node*/
'use strict';

var glob = require('glob');
Expand All @@ -14,10 +15,10 @@ function addFiles(mocha, files) {
glob.sync(root + files).forEach(mocha.addFile.bind(mocha));
}

addFiles(mocha, '/**/*-nodetest.js');
addFiles(mocha, '/**/*-test.js');

if (arg === 'all') {
addFiles(mocha, '/**/*-nodetest-slow.js');
addFiles(mocha, '/**/*-test-slow.js');
}

mocha.run(function(failures) {
Expand Down
Loading

0 comments on commit b06ea06

Please sign in to comment.