capybara-screenshot 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/capybara-screenshot.rb +2 -0
- data/lib/capybara-screenshot/saver.rb +6 -2
- data/lib/capybara-screenshot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c151afcc0d6c03f1b86c6511a847fe34df99fcb9
|
4
|
+
data.tar.gz: 994a9b0906c3bb53a67c75a942e72df97a9cecec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be4e5220d8f8b0abfd84e9c2bd1ef9ec797b19b38160104305db869b6f6f8ec4d27789e02eb6c0dc96dd79cc7af95e8d76b8faa3d690279356fdd8ad39a8e96
|
7
|
+
data.tar.gz: 27a74af975127375130440a535cd3022d4f4771c29c2c2a4547db6dc5e8ab06063cf7a594b72715c3f987671a6706d34cd7335382a527a8954aaaea39098a3f9
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
|
1
|
+
10 Feburary 2015 - 1.04 -> 1.0.5
|
2
|
+
-----------
|
3
|
+
|
4
|
+
* Added support for appending a random string to the filename
|
5
|
+
|
6
|
+
Thanks to [Brad Wedell](https://github.com/streetlogics)
|
7
|
+
|
8
|
+
5 January 2015 - 1.0.3 -> 1.0.4
|
2
9
|
-----------
|
3
10
|
|
4
11
|
* Added support for Poltergeist Billy
|
data/lib/capybara-screenshot.rb
CHANGED
@@ -5,6 +5,7 @@ module Capybara
|
|
5
5
|
attr_accessor :registered_drivers
|
6
6
|
attr_accessor :filename_prefix_formatters
|
7
7
|
attr_accessor :append_timestamp
|
8
|
+
attr_accessor :append_random
|
8
9
|
attr_accessor :webkit_options
|
9
10
|
attr_writer :final_session_name
|
10
11
|
attr_accessor :prune_strategy
|
@@ -14,6 +15,7 @@ module Capybara
|
|
14
15
|
self.registered_drivers = {}
|
15
16
|
self.filename_prefix_formatters = {}
|
16
17
|
self.append_timestamp = true
|
18
|
+
self.append_random = false
|
17
19
|
self.webkit_options = {}
|
18
20
|
self.prune_strategy = :keep_all
|
19
21
|
|
@@ -15,8 +15,12 @@ module Capybara
|
|
15
15
|
@capybara, @page, @html_save = capybara, page, html_save
|
16
16
|
time_now = Time.now
|
17
17
|
timestamp = "#{time_now.strftime('%Y-%m-%d-%H-%M-%S.')}#{'%03d' % (time_now.usec/1000).to_i}"
|
18
|
-
|
19
|
-
|
18
|
+
|
19
|
+
filename = [filename_prefix]
|
20
|
+
filename << timestamp if Capybara::Screenshot.append_timestamp
|
21
|
+
filename << SecureRandom.hex if Capybara::Screenshot.append_random
|
22
|
+
|
23
|
+
@file_base_name = filename.join('_')
|
20
24
|
|
21
25
|
Capybara::Screenshot.prune
|
22
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew O'Riordan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|