<commit_before># Whatsup

A extensible way of exposing information about a running web app.

It presents a JSON object with information about current ruby, rails
and anything else you want to show that can be accessed through ruby.

## Usage

Whatsup can be used with any Rack app, by including the middleware
Whatsup::StatusPage with a configuration object. See below for
framework specific instructions

### Rails

The Whatsup gem includes a Railtie which inserts the middleware in the
middleware chain and exposes the configuration object as `config.whatsup`.

The only thing needed is to put it in your gemfile and configure it by in your
application.rb putting something like

        config.whatsup.username = "admin"
        config.whatsup.password = "<PASSWORD>"

### Sinatra

* Put it in your gemfile
* Add the following to your app:

        config = Whatsup::Configuration.new
        config.username = "admin"
        config.password = "<PASSWORD>"
        use Whatsup::StatusPage, config: config

### Then

After this, you can access the status at /__status, using the username and password
specified above.


## What does it show?

The app is built up by Collectors (The standard ones are defined in Whatsup::Collectors).
A Collector is something that responds to `call` without arguments and returns a
Hash
<commit_msg>Add not about initializers in Rails<commit_after># Whatsup

A extensible way of exposing information about a running web app.

It presents a JSON object with information about current ruby, rails
and anything else you want to show that can be accessed through ruby.

## Usage

Whatsup can be used with any Rack app, by including the middleware
Whatsup::StatusPage with a configuration object. See below for
framework specific instructions

### Rails

The Whatsup gem includes a Railtie which inserts the middleware in the
middleware chain and exposes the configuration object as `config.whatsup`.

The only thing needed is to put it in your gemfile and configure it by in your
application.rb putting something like

        config.whatsup.username = "admin"
        config.whatsup.password = "<PASSWORD>"

You can also put the configuration in an initializer (`config/initializers/whatsup.rb`):

    Rails.application.config.whatsup.username = "admin"
    Rails.application.config.whatsup.password = "<PASSWORD>"

### Sinatra

* Put it in your gemfile
* Add the following to your app:

        config = Whatsup::Configuration.new
        config.username = "admin"
        config.password = "<PASSWORD>"
        use Whatsup::StatusPage, config: config

### Then

After this, you can access the status at /__status, using the username and password
specified above.


## What does it show?

The app is built up by Collectors (The standard ones are defined in Whatsup::Collectors).
A Collector is something that responds to `call` without arguments and returns a
Hash

{'fraction_non_alphanumeric': 0.05935127674258109, 'fraction_numerical': 0.0, 'mean_word_length': 3.9555555555555557, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3241541', 'n_tokens_mistral': 774, 'n_tokens_neox': 719, 'n_words': 377}