<commit_before># RunscopeStatuspage

Do you use [RunScope](https://runscope.com) to test your API, and [StatusPage](https://statuspage.io) to show it all off to your customers? Don't want to write bindings for both APIs? If yes, RunscopeStatuspage is perfect for you.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'runscope_statuspage'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install runscope_statuspage

## Usage

In a nutshell, each call will grab metrics from RunScope then send them over to StatusPage, once per call. There is no scheduling done by this gem, it is left as an exercise for the reader. Ideally, you will want to use something such as [Sidekiq](https://github.com/mperham/sidekiq) or [Resque](https://github.com/resque/resque) to fire these jobs off every few minutes/hours. Keep in mind that StatusPage will rate-limit requests to its API, one request per minute. 

### Poll for incidents

*from general to specific:*

- *report_everything:* Report all radars of all buckets.
  ```ruby
  opts = {:status => "page status (either 'investigating|identified|monitoring|resolved')",
   :twitter_update => 'do you want to post status to twitter (bool)',
   :fail_on => 'number of failures to induce statuspage update (int, default 0)'}
   ```
- *report_buckets:* Report all radars of buckets in list.
  ```ruby
  opts = {:bucket_names => 'list of names of buckets containing radars',
   :status => "page status (either 'investigating|identified|monitoring|resolved')",
   :twitter_update => 'do you want to post status to twitter (bool)',
   :fail_on => 'number of failures to induce statuspage update (int, default 0)'}
   ```
- *report_bucket:* Report all radars in bucket.
  ```ruby
  opts = {:bucket_name => 'name of bucket containing radars',
   :status => "page status (either 'investigating|identified|monitoring|resolved')",
   :twitter_update => 'do you want to post status to twitter (bool)',
   :fail_on => 'number of failures to induce statuspage update (int, default 0)'}
   ```
- *report_radars:* Report radars in list for given bucket.<commit_msg>fix conflict Merge branch 'master' of https://github.com/mach-kernel/runscope_statuspage<commit_after># RunscopeStatuspage

Do you use [RunScope](https://runscope.com) to test your API, and [StatusPage](https://statuspage.io) to show it all off to your customers? Don't want to write bindings for both APIs? If yes, RunscopeStatuspage is perfect for you.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'runscope_statuspage'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install runscope_statuspage

## Usage

In a nutshell, each call will grab metrics from RunScope then send them over to StatusPage, once per call. There is no scheduling done by this gem, it is left as an exercise for the reader. Ideally, you will want to use something such as [Sidekiq](https://github.com/mperham/sidekiq) or [Resque](https://github.com/resque/resque) to fire these jobs off every few minutes/hours. Keep in mind that StatusPage will rate-limit requests to its API, one request per minute. 


### Poll for incidents

*from general to specific:*

- *report_everything:* Report all radars of all buckets.
  ```ruby
  opts = {:status => "page status (either 'investigating|identified|monitoring|resolved')",
   :twitter_update => 'do you want to post status to twitter (bool)',
   :fail_on => 'number of failures to induce statuspage update (int, default 0)'}
   ```
- *report_buckets:* Report all radars of buckets in list.
  ```ruby
  opts = {:bucket_names => 'list of names of buckets containing radars',
   :status => "page status (either 'investigating|identified|monitoring|resolved')",
   :twitter_update => 'do you want to post status to twitter (bool)',
   :fail_on => 'number of failures to induce statuspage update (int, default 0)'}
   ```
- *report_bucket:* Report all radars in bucket.
  ```ruby
  opts = {:bucket_name => 'name of bucket containing radars',
   :status => "page status (either 'investigating|identified|monitoring|resolved')",
   :twitter_update => 'do you want to post status to twitter (bool)',
   :fail_on => 'number of failures to induce statuspage update (int, default 0)'}
   ```
- *report_radars:* Report radars in list for given bucket.
{'fraction_non_alphanumeric': 0.10624139513538321, 'fraction_numerical': 0.0013767783386874712, 'mean_word_length': 4.517721518987342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 9, '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': '1805834', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1209, 'n_words': 533}