Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: {
}
};
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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
Expand All @@ -13,5 +13,5 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
testem.log
32 changes: 0 additions & 32 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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ The following properties are expected to be present on the deployment `context`

## Running Tests

- `npm test`
* yarn test

## 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]: http://ember-cli-deploy.com/ "Plugin Documentation"
[2]: 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-revision-data-<version>.tgz`
3. `ember release`
4. `npm publish`

### Create a github release

Expand Down
8 changes: 0 additions & 8 deletions bin/prepare-release

This file was deleted.

5 changes: 0 additions & 5 deletions bower.json

This file was deleted.

21 changes: 0 additions & 21 deletions ember-cli-build.js

This file was deleted.

3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* jshint node: true */
'use strict';

var RSVP = require('rsvp');
Expand All @@ -24,7 +23,7 @@ module.exports = {
return context.distFiles;
},

scm: function(context) {
scm: function(/* context */) {
return require('./lib/scm-data-generators')['git'];
}

Expand Down
1 change: 0 additions & 1 deletion lib/data-generators/file-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = CoreObject.extend({
var filePattern = this._plugin.readConfig('filePattern');
var distDir = this._plugin.readConfig('distDir');
var distFiles = this._plugin.readConfig('distFiles');
var fingerprint;

var filePaths = distFiles.filter(minimatch.filter(filePattern, { matchBase: true }));

Expand Down
2 changes: 1 addition & 1 deletion lib/scm-data-generators/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = CoreObject.extend({

generate: function() {
var _this = this;
return new RSVP.Promise(function(resolve, reject) {
return new RSVP.Promise(function(resolve/*, reject */) {
simpleGit(_this.path).log(function(err, log) {
var info = log.latest;
resolve({
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "node tests/runner.js"
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/*"
},
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data",
"engines": {
Expand All @@ -19,12 +17,13 @@
"license": "MIT",
"devDependencies": {
"chai": "^3.5.0",
"chai-as-promised": "^5.3.0",
"ember-cli": "2.7.0",
"chai-as-promised": "^6.0.0",
"ember-cli": "^2.12.0",
"ember-cli-release": "1.0.0-beta.2",
"eslint": "^3.18.0",
"github": "^2.5.1",
"glob": "^7.0.5",
"mocha": "^3.0.2",
"glob": "^7.1.1",
"mocha": "^3.2.0",
"multiline": "^1.0.2"
},
"keywords": [
Expand All @@ -37,7 +36,7 @@
"ember-cli-deploy-plugin": "^0.2.6",
"git-repo-info": "^1.3.0",
"minimatch": "^3.0.3",
"rsvp": "^3.2.1",
"rsvp": "^3.5.0",
"simple-git": "^1.57.0"
}
}
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.

6 changes: 3 additions & 3 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,15 +15,14 @@ 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) {
process.on('exit', function() {
process.exit(failures);
});
});

2 changes: 1 addition & 1 deletion tests/unit/index-nodetest.js → tests/unit/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('the index', function() {
"revision-data": {
type: 'file-hash',
filePattern: 'index.html',
scm: function(context) {
scm: function(/* context */) {
return require('../../lib/scm-data-generators')['git'];
},
distDir: function(context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ describe('the version-commit data generator', function() {

return assert.isFulfilled(subject.generate())
.then(function(data) {
var path = gitRepoInfo._findRepo();
assert.equal(data.revisionKey, '3.2.1');
});
});
Expand Down
Loading