alias ci/ci:list
use friendly v5 style, sans default flags
This commit is contained in:
Родитель
689b13a938
Коммит
67ce280e5c
|
@ -9,9 +9,8 @@ function* run (context, heroku) {
|
|||
return yield RenderTestRuns.render(coupling.pipeline, { heroku, watch: context.flags.watch })
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
const cmd = {
|
||||
topic: 'ci',
|
||||
command: 'list',
|
||||
default: true,
|
||||
needsApp: true,
|
||||
needsAuth: true,
|
||||
|
@ -28,3 +27,8 @@ module.exports = {
|
|||
],
|
||||
run: cli.command(co.wrap(run))
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
cmd,
|
||||
Object.assign({ command: 'list' }, cmd)
|
||||
]
|
5
index.js
5
index.js
|
@ -1,5 +1,6 @@
|
|||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const flatten = require('lodash.flatten')
|
||||
|
||||
exports.topic = {
|
||||
name: 'ci',
|
||||
|
@ -8,6 +9,6 @@ exports.topic = {
|
|||
|
||||
const commands = path.join(__dirname, 'commands/ci')
|
||||
|
||||
exports.commands = fs.readdirSync(commands).map((file) => {
|
||||
exports.commands = flatten(fs.readdirSync(commands).map((file) => {
|
||||
return require(path.join(commands, file))
|
||||
})
|
||||
}))
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
"got": "^6.6.3",
|
||||
"heroku-cli-util": "^6.0.15",
|
||||
"heroku-run": "^3.4.3",
|
||||
"lodash.flatten": "^4.4.0",
|
||||
"shell-escape": "^0.2.0",
|
||||
"socket.io-client": "^1.5.1",
|
||||
"temp": "^0.8.3"
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
const nock = require('nock')
|
||||
const expect = require('chai').expect
|
||||
const cli = require('heroku-cli-util')
|
||||
const cmd = require('../../../commands/ci/list')
|
||||
const cmd = require('../../../commands/ci')[0]
|
||||
const stdMocks = require('std-mocks')
|
||||
|
||||
describe('heroku ci:list', function () {
|
||||
describe('heroku ci', function () {
|
||||
let app, coupling, runs
|
||||
|
||||
beforeEach(function () {
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче