<commit_before># capybara-inline-screenshot

Extends [capybara-screenshot](https://github.com/mattheworiordan/capybara-screenshot) with inline image output.

In [iTerm2 (nightly)](http://iterm2.com/):

![Screenshot of iTerm2](screenshots/iterm.png)

In [Buildkite](https://buildkite.com/):

![Screenshot of Buildkite](screenshots/buildkite.png)

## Usage

Add it to your Gemfile (after `capybara-screenshot`):

```ruby
gem 'capybara-inline-screenshot'
```

And replace your call to:

```ruby
require 'capybara-screenshot/rspec'
```

with:

```ruby
require 'capybara-inline-screenshot/rspec'
```

## Escape code strategies

If `CI` environment variable is not present it will output screenshots in base64 encoded [iTerm2 image format](http://iterm2.com/images.html), and if `CI` is present it will output in the [Terminal artifact:// format](http://buildkite.github.io/terminal/inline-images/).

## License

See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).<commit_msg>Clarify CI env mode<commit_after># capybara-inline-screenshot

Extends [capybara-screenshot](https://github.com/mattheworiordan/capybara-screenshot) with inline image output.

In [iTerm2 (nightly)](http://iterm2.com/):

![Screenshot of iTerm2](screenshots/iterm.png)

In [Buildkite](https://buildkite.com/):

![Screenshot of Buildkite](screenshots/buildkite.png)

## Usage

Add it to your Gemfile (after `capybara-screenshot`):

```ruby
gem 'capybara-inline-screenshot'
```

And replace your call to:

```ruby
require 'capybara-screenshot/rspec'
```

with:

```ruby
require 'capybara-inline-screenshot/rspec'
```

## Fallback

Thanks the wonder of ANSI escape codes if your terminal client doesn't understand what this gem outputs it'll simply ignore it (it'll be like you're just using the standard capybara-screenshot). But if it does support it: INLINE IMAGES!

## CI-mode

If the `CI` environment variable is present it will output screenshots in the [Terminal artifact:// format](http://buildkite.github.io/terminal/inline-images/) with the expectation that the images are uploaded as build artifacts and inlined by your CI system.

If the `CI` environment variable is not present it will output screenshots in the base64 encoded [iTerm2 image format](http://iterm2.com/images.html) for viewing in a local terminal.

## License

See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
{'fraction_non_alphanumeric': 0.12182952182952184, 'fraction_numerical': 0.0058212058212058215, 'mean_word_length': 5.217054263565892, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '693921', 'n_tokens_mistral': 824, 'n_tokens_neox': 773, 'n_words': 239}