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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 598042a28e4b32d5e96493d6995cf17a57941b45
4
- data.tar.gz: fe2a90457b3963e841ce8dfe3ce393718c497931
3
+ metadata.gz: c151afcc0d6c03f1b86c6511a847fe34df99fcb9
4
+ data.tar.gz: 994a9b0906c3bb53a67c75a942e72df97a9cecec
5
5
  SHA512:
6
- metadata.gz: 186f3770e7d01874d4e6e6dfdfcd322414245f59dae9d692084ad374cf4944f215ef1bfaba6d32cf23e98896f44d81c223b0da317649c917f8f21be12de88d6d
7
- data.tar.gz: d4685dc01dda84f6c46b5f7fd065d9b242e39b8d4eddbb2774f04b65352c235b67c453427bd13566e78164dfd39fc14d9787a6dae9f2dcf99a9919515499d501
6
+ metadata.gz: 6be4e5220d8f8b0abfd84e9c2bd1ef9ec797b19b38160104305db869b6f6f8ec4d27789e02eb6c0dc96dd79cc7af95e8d76b8faa3d690279356fdd8ad39a8e96
7
+ data.tar.gz: 27a74af975127375130440a535cd3022d4f4771c29c2c2a4547db6dc5e8ab06063cf7a594b72715c3f987671a6706d34cd7335382a527a8954aaaea39098a3f9
@@ -1,4 +1,11 @@
1
- 5 January 2014 - 1.0.3 -> 1.0.4
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
@@ -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
- @file_base_name = filename_prefix
19
- @file_base_name = "#{@file_base_name}_#{timestamp}" if Capybara::Screenshot.append_timestamp
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
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Screenshot
3
- VERSION = '1.0.4'
3
+ VERSION = '1.0.5'
4
4
  end
5
5
  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
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-01-05 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara