File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,28 +15,28 @@ This is the CLI tool to train on certifications.
1515## Using Composer
1616```
1717$ composer create-project certificationy/certificationy-cli
18- $ php certificationy.php
18+ $ bin/ certificationy
1919```
2020
2121## More run options
2222
2323### Select the number of questions
2424```
25- $ php certificationy.php start --number=10
25+ $ bin/ certificationy start --number=10
2626```
2727
2828The default value is 20.
2929
3030### List categories
3131```
32- $ php certificationy.php start --list [-l]
32+ $ bin/ certificationy start --list [-l]
3333```
3434
3535Will list all the categories available
3636
3737### Only questions from certain categories
3838```
39- $ php certificationy.php start "Automated tests" "Bundles"
39+ $ bin/ certificationy start "Automated tests" "Bundles"
4040```
4141
4242Will only get the questions from the categories "Automated tests" and "Bundles"
@@ -45,14 +45,14 @@ Use the category list from [List categories](#list-categories)
4545
4646### Show if a question has multiple choices
4747```
48- $ php certificationy.php start --show-multiple-choice
48+ $ bin/ certificationy start --show-multiple-choice
4949```
5050
5151![ Multiple choices] ( https://cloud.githubusercontent.com/assets/795661/3308225/721b5324-f679-11e3-8d9d-62ba32cd8e32.png " Multiple choices ")
5252
5353### And all combined
5454```
55- $ php certificationy.php start --number=5 --show-multiple-choice "Automated tests" "Bundles"
55+ $ bin/ certificationy start --number=5 --show-multiple-choice "Automated tests" "Bundles"
5656```
5757
5858* 5 questions
Original file line number Diff line number Diff line change 1111 * file that was distributed with this source code.
1212 */
1313
14- require __DIR__ . '/vendor/autoload.php ' ;
14+ $ autoloadFiles = array (__DIR__ .'/../vendor/autoload.php ' ,
15+ __DIR__ .'/../../../autoload.php ' );
16+
17+ foreach ($ autoloadFiles as $ autoloadFile ) {
18+ if (file_exists ($ autoloadFile )) {
19+ require_once $ autoloadFile ;
20+ }
21+ }
1522
1623use Certificationy \Cli \Command \StartCommand ;
1724use KevinGH \Amend \Command ;
2431
2532$ application = new Application (APPLICATION_NAME , VERSION );
2633
27- $ config = Yaml::parse (file_get_contents (' config.yml ' ));
34+ $ config = Yaml::parse (file_get_contents (__DIR__ . ' /../ config.yml ' ));
2835$ updateCommand = new Command ('self-update ' );
2936$ updateCommand ->setManifestUri ($ config ['manifest_uri ' ]);
3037$ application ->add ($ updateCommand );
Original file line number Diff line number Diff line change 4242 "branch-alias" : {
4343 "dev-master" : " 1.0.x-dev"
4444 }
45- }
45+ },
46+ "bin" : [
47+ " bin/certificationy"
48+ ]
4649}
You can’t perform that action at this time.
0 commit comments