Skip to content

Commit

Permalink
added option to not create default client in console command installer
Browse files Browse the repository at this point in the history
  • Loading branch information
takeit committed Mar 19, 2015
1 parent c5547a3 commit 59e37d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ before_script:
- cd newscoop/
- composer self-update
- composer install --prefer-dist
- "./application/console newscoop:install --fix --database_name newscoop --database_user root"
- "./application/console newscoop:install --fix --database_name newscoop --database_user root --no-client"
- sudo php upgrade.php
- "./application/console oauth:create-client testclient newscoop.dev newscoop.dev --test"
- "./application/console user:create test@example.org testpassword testuser 'Test Name' 'Test Surname' true 1 1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected function configure()
->addOption('database_password', null, InputOption::VALUE_REQUIRED, 'Database password')
->addOption('database_server_port', null, InputOption::VALUE_OPTIONAL, 'Database server port', '3306')
->addOption('database_override', null, InputOption::VALUE_NONE, 'Override existing database')
->addOption('no-client', null, InputOption::VALUE_NONE, 'Don not create OAuth default client')
->addArgument('site_title', InputArgument::OPTIONAL, 'Publication name', 'Newscoop publication')
->addArgument('user_email', InputArgument::OPTIONAL, 'Admin email', 'admin@newscoop.dev')
->addArgument('user_password', InputArgument::OPTIONAL, 'Admin user password', 'password');
Expand Down Expand Up @@ -157,8 +158,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
'recheck_user_password' => $input->getArgument('user_password'),
), $connection);
$output->writeln('<info>Config have been saved successfully.<info>');
$finishService->createDefaultOauthClient($input->getArgument('alias'));
$output->writeln('<info>Default OAuth client has been created successfully.<info>');
if (!$input->getOption('no-client')) {
$finishService->createDefaultOauthClient($input->getArgument('alias'));
$output->writeln('<info>Default OAuth client has been created successfully.<info>');
}

$output->writeln('<info>Newscoop is installed.<info>');
}
}

0 comments on commit 59e37d1

Please sign in to comment.