capybara-screenshot 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/CHANGELOG.md +5 -0
- data/README.md +2 -0
- data/lib/capybara-screenshot/saver.rb +2 -1
- data/lib/capybara-screenshot/version.rb +1 -1
- metadata +5 -4
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
capybara-screenshot gem
|
2
2
|
=======================
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/mattheworiordan/capybara-screenshot.png)](https://travis-ci.org/mattheworiordan/capybara-screenshot)
|
5
|
+
|
4
6
|
Using this gem, whenever a [Capybara](https://github.com/jnicklas/capybara) test in [Cucumber](http://cukes.info/), [Rspec](https://www.relishapp.com/rspec) or Minitest fails, the HTML for the failed page and a screenshot (when using [capybara-webkit](https://github.com/thoughtbot/capybara-webkit), [Selenium](http://seleniumhq.org/) or [poltergeist](https://github.com/jonleighton/poltergeist)) is saved into $APPLICATION_ROOT/tmp/capybara.
|
5
7
|
|
6
8
|
This is a huge help when trying to diagnose a problem in your failing steps as you can view the source code and potentially how the page looked at the time of the failure.
|
@@ -5,7 +5,8 @@ module Capybara
|
|
5
5
|
|
6
6
|
def initialize(capybara, page, html_save=true, filename_prefix='screenshot')
|
7
7
|
@capybara, @page, @html_save = capybara, page, html_save
|
8
|
-
|
8
|
+
time_now = Time.now
|
9
|
+
@file_base_name = "#{filename_prefix}_#{time_now.strftime('%Y-%m-%d-%H-%M-%S.')}#{'%03d' % (time_now.usec/1000).to_i}"
|
9
10
|
end
|
10
11
|
|
11
12
|
def save
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- .gitignore
|
77
77
|
- .rspec
|
78
|
+
- .travis.yml
|
78
79
|
- CHANGELOG.md
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE
|
@@ -106,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
107
|
version: '0'
|
107
108
|
segments:
|
108
109
|
- 0
|
109
|
-
hash:
|
110
|
+
hash: 412364068371505471
|
110
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
112
|
none: false
|
112
113
|
requirements:
|
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
116
|
version: '0'
|
116
117
|
segments:
|
117
118
|
- 0
|
118
|
-
hash:
|
119
|
+
hash: 412364068371505471
|
119
120
|
requirements: []
|
120
121
|
rubyforge_project: capybara-screenshot
|
121
122
|
rubygems_version: 1.8.24
|