Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from ODOWDAIBM/develop
Browse files Browse the repository at this point in the history
CLI name update
  • Loading branch information
ODOWDAIBM authored Jan 30, 2017
2 parents 8c4b532 + d8d60e9 commit 9a7196a
Show file tree
Hide file tree
Showing 28 changed files with 37 additions and 57 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/composer-cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jspm_packages
**/.DS_Store

chaincode/src/*
!chaincode/src/concerto
!chaincode/src/composer
chaincode/bin
chaincode/pkg

Expand Down
11 changes: 5 additions & 6 deletions packages/composer-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Composer-CLI

Set up the Concerto command with
Set up the Composer command with

```
npm install
npm link
npm install composer-cli
```

## Overview
Contains the Concerto CLIs for administering business networks.
Contains the Fabric composer CLIs for administering business networks.

Type `concerto --help` to list the available commands.
Type `composer --help` to list the available commands.

## Usage

```bash
concerto network deploy [options]
composer network deploy [options]

Options:
--help Show help [boolean]
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let _ = require('lodash');
yargs
.commandDir('./lib/cmds')
.help()
.example('concerto identity issue\nconcerto network deploy\nconcerto participant add\nconcerto transaction submit')
.example('composer identity issue\ncomposer network deploy\ncomposer participant add\ncomposer transaction submit')
.demand(1)
.wrap(null)
.strict()
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-cli/gen/transactiontemplate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Generated by Concerto CLI
* Generated by Composer CLI
*/

'use strict';
Expand All @@ -15,7 +15,7 @@ const homedir = require('homedir');
const PROFILE_ROOT = homedir() + '/.composer-connection-profiles/';
const CONNECTION_FILE = 'connection.json';

const CREDENTIALS_ROOT = homedir() + '/.concerto-credentials';
const CREDENTIALS_ROOT = homedir() + '/.composer-credentials';
const DEFAULT_PROFILE_NAME = 'defaultProfile';

require('chai').should();
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.command = 'archive <subcommand>';
exports.desc = 'Concerto archive command';
exports.desc = 'Composer archive command';
exports.builder = function (yargs) {
// apply commands in subdirectories
return yargs.commandDir('archive');
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.command = 'generator <subcommand>';
exports.desc = 'Generate parts of an application';
exports.desc = 'Composer generator command';
exports.builder = function (yargs) {
// apply commands in subdirectories
return yargs
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/generator/testsCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Test = require ('./lib/tests.js');
module.exports.command = 'tests [options]';
module.exports.describe = 'Generate unit tests';
module.exports.builder = {
projectDir: {alias: 'd', required: true, describe: 'The directory of your your concerto project', type: 'string' },
projectDir: {alias: 'd', required: true, describe: 'The directory of your your composer project', type: 'string' },
networkArchiveLocation: {alias: 'a', required: true, describe: 'The location of the network archive zip file', type: 'string' },
testDirName: {alias: 't', required: false, describe: 'The name of the projects test directory', type: 'string' },
enrollId: { alias: 'i', required: true, describe: 'The enrollment ID of the user', type: 'string' },
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/identity.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.command = 'identity <subcommand>';
exports.desc = 'Concerto identity command';
exports.desc = 'Composer identity command';
exports.builder = function (yargs) {
// apply commands in subdirectories
return yargs.commandDir('identity');
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.command = 'network <subcommand>';
exports.desc = 'Concerto network command';
exports.desc = 'Composer network command';
exports.builder = function (yargs) {
// apply commands in subdirectories
return yargs.commandDir('network');
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/network/lib/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const homedir = require('homedir');
const PROFILE_ROOT = homedir() + '/.composer-connection-profiles/';
const CONNECTION_FILE = 'connection.json';

const CREDENTIALS_ROOT = homedir() + '/.concerto-credentials';
const CREDENTIALS_ROOT = homedir() + '/.composer-credentials';
const DEFAULT_PROFILE_NAME = 'defaultProfile';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/participant.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.command = 'participant <subcommand>';
exports.desc = 'Concerto participant command';
exports.desc = 'Composer participant command';
exports.builder = function (yargs) {
// apply commands in subdirectories
return yargs.commandDir('participant');
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/lib/cmds/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.command = 'transaction <subcommand>';
exports.desc = 'Concerto transaction command';
exports.desc = 'Composer transaction command';
exports.builder = function (yargs) {
// apply commands in subdirectories
return yargs.commandDir('transaction');
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.11",
"description": "Fabric Composer command line interfaces (CLIs)",
"bin": {
"concerto": "cli.js"
"composer": "cli.js"
},
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/scripts/api-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Exit on first error, print all commands.
set -v

# Grab the Concerto directory.
# Grab the composer directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

# Check for the system tests.
Expand Down
21 changes: 1 addition & 20 deletions packages/composer-cli/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Exit on first error, print all commands.
set -ev

# Grab the Concerto directory.
# Grab the Composer directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

# Check that this is the right node.js version.
Expand Down Expand Up @@ -43,22 +43,3 @@ if [ -n "${TRAVIS_TAG}" ]; then
echo "Skipping downstream push; build is tagged"
exit 0
fi

# Push empty commits to downstream projects to trigger builds.
# TODO: remove this 'exit 0' when we need to trigger downstream builds.
exit 0
REPO=`git config remote.origin.url`
for PROJ in Concerto-System-Tests; do
cd ${DIR}
THISREPO=$(echo ${REPO} | sed "s|/[^/]*$||")/${PROJ}.git
for i in {1..5}; do
rm -rf temp
git clone -b ${TRAVIS_BRANCH} ${THISREPO} temp
cd temp
git config user.email "noreply@fabric-composer.org"
git config user.name "Fabric Composer"
git config push.default simple
git commit -m "Automated commit to trigger downstream build" --allow-empty
git push && break
done
done
2 changes: 1 addition & 1 deletion packages/composer-cli/scripts/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Exit on first error, print all commands.
set -ev

# Grab the Concerto-CLI directory.
# Grab the Composer-CLI directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

# Install the node.js dependencies.
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-cli/scripts/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Exit on first error, print all commands.
set -ev

# Grab the Concerto directory.
# Grab the Composer directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

# Run the node.js unit tests.
Expand All @@ -17,6 +17,6 @@ eval "$(gimme 1.7)"

# Run the Go unit tests.
export GOPATH=${DIR}/chaincode
cd ${GOPATH}/src/concerto
cd ${GOPATH}/src/composer
go vet $(go list ./... | grep -v /vendor/)
go test -v $(go list ./... | grep -v /vendor/)
4 changes: 2 additions & 2 deletions packages/composer-cli/test/archive/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ let testBusinessNetworkId = 'net.biz.TestNetwork-0.0.1';
let testBusinessNetworkDescription = 'Test network description';

//const DEFAULT_PROFILE_NAME = 'defaultProfile';
// const CREDENTIALS_ROOT = homedir() + '/.concerto-credentials';
// const CREDENTIALS_ROOT = homedir() + '/.composer-credentials';

let mockBusinessNetworkDefinition;
// const DEFAULT_PROFILE_NAME = 'defaultProfile';

let mockAdminConnection;

describe('concerto archive create unit tests', function () {
describe('composer archive create unit tests', function () {

let sandbox;

Expand Down
4 changes: 2 additions & 2 deletions packages/composer-cli/test/archive/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ let testBusinessNetworkId = 'net.biz.TestNetwork-0.0.1';
let testBusinessNetworkDescription = 'Test network description';

//const DEFAULT_PROFILE_NAME = 'defaultProfile';
// const CREDENTIALS_ROOT = homedir() + '/.concerto-credentials';
// const CREDENTIALS_ROOT = homedir() + '/.composer-credentials';

let mockBusinessNetworkDefinition;
// const DEFAULT_PROFILE_NAME = 'defaultProfile';

let mockAdminConnection;

describe('concerto archive list unit tests', function () {
describe('composer archive list unit tests', function () {

let sandbox;

Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/test/generator/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ENROLL_SECRET = 'SuccessKidWin';

const TEMPLATES_DIR = path.join(__dirname, './../../gen');

describe('concerto generator tests CLI unit tests', () => {
describe('composer generator tests CLI unit tests', () => {

let sandbox;
let mockBusinessNetworkConnection;
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/test/identity/issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DEFAULT_PROFILE_NAME = 'defaultProfile';
const ENROLL_ID = 'SuccessKid';
const ENROLL_SECRET = 'SuccessKidWin';

describe('concerto identity issue CLI unit tests', () => {
describe('composer identity issue CLI unit tests', () => {

let sandbox;
let mockBusinessNetworkConnection;
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/test/identity/revoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DEFAULT_PROFILE_NAME = 'defaultProfile';
const ENROLL_ID = 'SuccessKid';
const ENROLL_SECRET = 'SuccessKidWin';

describe('concerto identity revoke CLI unit tests', () => {
describe('composer identity revoke CLI unit tests', () => {

let sandbox;
let mockBusinessNetworkConnection;
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-cli/test/network/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ let testBusinessNetworkId = 'net.biz.TestNetwork-0.0.1';
let testBusinessNetworkDescription = 'Test network description';

//const DEFAULT_PROFILE_NAME = 'defaultProfile';
const CREDENTIALS_ROOT = homedir() + '/.concerto-credentials';
const CREDENTIALS_ROOT = homedir() + '/.composer-credentials';

let mockBusinessNetworkDefinition;
const DEFAULT_PROFILE_NAME = 'defaultProfile';

let mockAdminConnection;

describe('concerto deploy network CLI unit tests', function () {
describe('composer deploy network CLI unit tests', function () {

let sandbox;

Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/test/network/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DEFAULT_PROFILE_NAME = 'defaultProfile';
const ENROLL_ID = 'SuccessKid';
const ENROLL_SECRET = 'SuccessKidWin';

describe('concerto network ping CLI unit tests', () => {
describe('composer network ping CLI unit tests', () => {

let sandbox;
let mockBusinessNetworkConnection;
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/test/network/undeploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ chai.use(require('chai-as-promised'));

let mockAdminConnection;

describe('concerto undeploy network CLI unit tests', function () {
describe('composer undeploy network CLI unit tests', function () {

let sandbox;

Expand Down
2 changes: 1 addition & 1 deletion packages/composer-cli/test/participant/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DEFAULT_PROFILE_NAME = 'defaultProfile';
const ENROLL_ID = 'SuccessKid';
const ENROLL_SECRET = 'SuccessKidWin';

describe('concerto participant add CLI unit tests', () => {
describe('composer participant add CLI unit tests', () => {

let sandbox;
let mockBusinessNetworkConnection;
Expand Down
4 changes: 2 additions & 2 deletions packages/composer-cli/test/transaction/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ const ENROLL_ID = 'SuccessKid';
const ENROLL_SECRET = 'SuccessKidWin';

//const DEFAULT_PROFILE_NAME = 'defaultProfile';
// const CREDENTIALS_ROOT = homedir() + '/.concerto-credentials';
// const CREDENTIALS_ROOT = homedir() + '/.composer-credentials';


describe('concerto transaction submit CLI unit tests', () => {
describe('composer transaction submit CLI unit tests', () => {
let sandbox;
let mockBusinessNetworkConnection;
let mockBusinessNetwork;
Expand Down

0 comments on commit 9a7196a

Please sign in to comment.