Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'profiles:add' to 'profiles:create' #70

Merged
merged 1 commit into from
Oct 15, 2019
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
4 changes: 2 additions & 2 deletions src/base-commands/twilio-client-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class TwilioClientCommand extends BaseCommand {
const reportUnconfigured = (verb, message = '') => {
const profileParam = this.flags.profile ? ' -p ' + this.flags.profile : '';
throw new TwilioCliError(
`To ${verb} the profile, run: ` + chalk.whiteBright('twilio profiles:add' + profileParam) + message
`To ${verb} the profile, run: ` + chalk.whiteBright('twilio profiles:create' + profileParam) + message
);
};

if (!this.currentProfile) {
this.logger.error('No profile configured.');
reportUnconfigured('add', '\n\n' + HELP_ENVIRONMENT_VARIABLES);
reportUnconfigured('create', '\n\n' + HELP_ENVIRONMENT_VARIABLES);
}

this.logger.debug('Using profile: ' + this.currentProfile.id);
Expand Down
6 changes: 3 additions & 3 deletions test/base-commands/twilio-client-command.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ describe('base-commands', () => {
.exit(1)
.it('should fail for a non-existent active profile', ctx => {
expect(ctx.stderr).to.contain('No profile configured');
expect(ctx.stderr).to.contain('To add the profile, run: twilio profiles:add');
expect(ctx.stderr).to.contain('To create the profile, run: twilio profiles:create');
expect(ctx.stderr).to.contain('TWILIO_ACCOUNT_SID');
});

setUpTest(['-p', 'alt', '-l', 'debug'])
.exit(1)
.it('should fail for a non-existent profile', ctx => {
expect(ctx.stderr).to.contain('No profile configured');
expect(ctx.stderr).to.contain('To add the profile, run: twilio profiles:add -p alt');
expect(ctx.stderr).to.contain('To create the profile, run: twilio profiles:create -p alt');
expect(ctx.stderr).to.contain('TWILIO_ACCOUNT_SID');
});

Expand All @@ -106,7 +106,7 @@ describe('base-commands', () => {
.it('should handle a secure storage error', ctx => {
expect(ctx.stderr).to.contain('Could not get credentials for profile "twilio-cli-unit-testing"');
expect(ctx.stderr).to.contain(
'To reconfigure the profile, run: twilio profiles:add -p twilio-cli-unit-testing'
'To reconfigure the profile, run: twilio profiles:create -p twilio-cli-unit-testing'
);
});

Expand Down