kk/chuck-command

Simple Symfony2 Bundle displaying a random Chuck Norris fact for every console command.

1.3.0 2016-01-23 18:40 UTC

This package is not auto-updated.

Last update: 2024-11-23 18:07:11 UTC


README

Build Status Scrutinizer Code Quality Latest Stable Version Code Coverage Total Downloads Monthly Downloads SensioLabsInsight

Simple and stupid Symfony2 Bundle displaying a random Chuck Norris fact after every console command.

Chuck Norris Rules

##NEW

version 1.3.0:

  • new configuration option : environments

version 1.2.0:

  • fixed ConnectException issue

version 1.1.0:

  • added support for Symfony 3

version 1.0.0:

  • Guzzle 6 implementation
  • chuck:fact console command to get a fact whenever you need one
  • timeout configuration parameter

##Installation

just run :

composer require kk/chuck-command
composer update

and register the bundle in your app/AppKernel.php :

// app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new KK\Labs\ChuckConsoleBundle\KKLabsChuckConsoleBundle(),
        );

        // ...
    }
}

##Usage As simple as using any app/console command.

Screenshot of ChuckConsoleBundle

In case of emergency, can also get a fact when you really need one :

app/console chuck:fact
#output : Fact: Chuck Norris doesn't consider it sex if the woman survives.
app/console chuck:fact Your boss
#output : Fact: Your boss doesn't consider it sex if the woman survives.

##Customization in config.yml file :

kk_labs_chuck_console:
    who:
        #your first name or anyone's first name
        first_name: "Your first name"
        #your last name or anyone's last name
        last_name: "Your last name"
    #after n seconds, don't wait for response from Chuck API
    timeout: 5
    #environments enabled (default : 'dev')
    environments: ['dev', 'prod', 'custom']

##API Credit API Credit goes to The Internet Chuck Norris Database