https://github.com/gongo/gnawrnip
Gnawrnip is a TurnipFormatter Add-on that provides put a screen shot to report use Capybara
https://github.com/gongo/gnawrnip
Last synced: about 1 year ago
JSON representation
Gnawrnip is a TurnipFormatter Add-on that provides put a screen shot to report use Capybara
- Host: GitHub
- URL: https://github.com/gongo/gnawrnip
- Owner: gongo
- License: mit
- Created: 2013-05-01T14:39:23.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T03:26:21.000Z (over 2 years ago)
- Last Synced: 2024-10-02T02:51:39.009Z (over 1 year ago)
- Language: Ruby
- Homepage: http://gongo.hatenablog.com/entry/2013/05/02/002220
- Size: 98.6 KB
- Stars: 13
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Gnawrnip
Gnawrnip is a [TurnipFormatter](https://github.com/gongo/turnip_formatter) Add-on that provides put a screenshot (like animation gif) to report use [Capybara](https://github.com/jnicklas/capybara)
[](https://travis-ci.org/gongo/gnawrnip)
[](https://coveralls.io/r/gongo/gnawrnip)
[](https://codeclimate.com/github/gongo/gnawrnip)
[](https://gemnasium.com/gongo/gnawrnip)
## IMPORTANT!
This project is currently in development (frequent releases).
So it have potential for massive refactorings (that could be API breaking).
## Requirements
* Ruby
* `2.2.0` or higher
* RubyGems
* capybara `~> 2.1.0`
* turnip_formatter
## Installation
Add this line to your application's Gemfile:
gem 'gnawrnip'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gnawrnip
## Setup
In your test setup file add:
require 'gnawrnip'
Gnawrnip.ready!
## Customization
You can do to customize a screenshot.
```ruby
Gnawrnip.configure do |c|
c.make_animation = true
c.max_frame_size = 1024 # pixel
end
```
* `make_animation` (Boolean) Whether to make animation GIF. (Default: true)
* `max_frame_size` (Integer) Maximum size that use to resize of image.
* If given, it resize the image to fit to this value.
* Ignored if this value is greater than original width and height.
* Example:
```
original: 640x480
this value: 300
result : 300x225
original: 480x640
this value: 400
result : 300x400
```
As example, see [example/spec/spec_helper.rb](https://github.com/gongo/gnawrnip/tree/master/example/spec/spec_helper.rb) .
## Example
see https://github.com/gongo/gnawrnip/tree/master/example
## License
MIT License. see LICENSE.txt