capybara-screenshot_config 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2c1baa6f54121510bde832f87b21d7378fed5e4
4
- data.tar.gz: ce193a56f6b87c35751dc7ae96e15ae36ca3b8e1
3
+ metadata.gz: dee833709a135b06070713b52f8a2ac2851cbcc8
4
+ data.tar.gz: b8684c3afb9afbc7d173b68fa0cc43639fcacd62
5
5
  SHA512:
6
- metadata.gz: c96d45e44d3f701585b1cbc845cb5c46bee9aee8d950a1451210b3635bde4e8e5109b8c81589d450d6be147133c4c6bb967e7405d56b11b43d94b7150f2e7897
7
- data.tar.gz: 32901efd45321a1c7243adaf6b2c926d25a54cd618bef3842398060d21e428d28b079c9b46c88d6b2f0110e92eae78acf5c420e54e81aec0bae3caa8b292aba9
6
+ metadata.gz: 662101b0b7946e759fff46ceb158a81701be06e5aef6bc7f95fcc8025d32cca9127265f4fad1c6c6c776b4344a42ea459a36cedd92f3f1c26b737ef348599363
7
+ data.tar.gz: 629f94b3b520d2c2de6314953bfe708607b1cd87b0b38e2c43455d44990c88979f4c1ad31cc3b8b6cd8091a11857794b3f574c39ffac280e59444f41ca2ecb45
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Capybara::ScreenshotConfig
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capybara/screenshot_config`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/capybara-screenshot_config.svg)](https://badge.fury.io/rb/capybara-screenshot_config)
4
+ [![Code Climate](https://codeclimate.com/github/toshimaru/capybara-screenshot_config/badges/gpa.svg)](https://codeclimate.com/github/toshimaru/capybara-screenshot_config)
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ Easier Capybara screenshot configuration gem.
6
7
 
7
8
  ## Installation
8
9
 
@@ -20,9 +21,37 @@ Or install it yourself as:
20
21
 
21
22
  $ gem install capybara-screenshot_config
22
23
 
24
+ ## Requirement
25
+ - capybara 2.x or more
26
+ - poltergeist for Capybara javascript_driver
27
+
23
28
  ## Usage
24
29
 
25
- TODO: Write usage instructions here
30
+ ### Setup poltergeist
31
+
32
+ ```ruby
33
+ require "capybara/poltergeist"
34
+ Capybara.javascript_driver = :poltergeist
35
+ ```
36
+
37
+ For more information, see [here](https://github.com/teampoltergeist/poltergeist).
38
+
39
+ ### ScreenshotConfig configuration
40
+
41
+ ```ruby
42
+ Capybara::ScreenshotConfig.configure do |config|
43
+ config.save_dir = "screenshot" # [String] screenshot save directory
44
+ config.full = true # [Boolean] full screenshot
45
+ end
46
+ ```
47
+
48
+ ### save_screenshot
49
+
50
+ ```ruby
51
+ describe 'screenshot', js: true do
52
+ it { page.save_screenshot "screenshot.png" }
53
+ end
54
+ ```
26
55
 
27
56
  ## Development
28
57
 
@@ -33,4 +62,3 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
33
62
  ## Contributing
34
63
 
35
64
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capybara-screenshot_config.
36
-
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'capybara/screenshot_config/version'
@@ -9,8 +8,8 @@ Gem::Specification.new do |spec|
9
8
  spec.authors = ["toshimaru"]
10
9
  spec.email = ["me@toshimaru.net"]
11
10
 
12
- spec.summary = %q{Capybara screenshot cofiguration}
13
- spec.description = %q{Capybara screenshot cofiguration. It works for Capybara and poltergeist.}
11
+ spec.summary = %q{Easier Capybara screenshot configuration}
12
+ spec.description = %q{Easier Capybara screenshot configuration gem.}
14
13
  spec.homepage = "https://github.com/toshimaru/capybara-screenshot_config"
15
14
 
16
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module ScreenshotConfig
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-screenshot_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - toshimaru
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-05 00:00:00.000000000 Z
11
+ date: 2016-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Capybara screenshot cofiguration. It works for Capybara and poltergeist.
83
+ description: Easier Capybara screenshot configuration gem.
84
84
  email:
85
85
  - me@toshimaru.net
86
86
  executables: []
@@ -121,5 +121,5 @@ rubyforge_project:
121
121
  rubygems_version: 2.4.5
122
122
  signing_key:
123
123
  specification_version: 4
124
- summary: Capybara screenshot cofiguration
124
+ summary: Easier Capybara screenshot configuration
125
125
  test_files: []