closer 0.5.4 → 0.5.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: 35cef9166bf15b1780e96939351d4850864ecb85
4
- data.tar.gz: a85f690669457cbd250c401b60904879d774e3ed
3
+ metadata.gz: 439029d320f2147fe56417564038605a412282a5
4
+ data.tar.gz: 2d1bed9cfeeaacae1c8b755f6bc4319723899149
5
5
  SHA512:
6
- metadata.gz: 356711966ec1b38283ad292febe7bafa65faf96641fc7ab5f6d76fc2d2186b81d40daabdee9947660c818f174ccef505efb692248f8b034bc6ac4f3f3b8df6e7
7
- data.tar.gz: 19db102779c2ee7851f7918e1650c5d5de71ceef44d3386843614b893c5983a98ff13b51eee062e8dce5bc42e094a9a5b5d0c9fa280439de4f5a8d8c629ef579
6
+ metadata.gz: 3c6a64c42e18642e1d788e04dc3c7fc6faa9f18a297b9266e5778e5267fa54ef6584d8444141d998aa2e5a0828f399ce3161a3fb53588ff47192683d2b0fe35a
7
+ data.tar.gz: c78f299acf404cd485fe0023a4c42a28dae237c3dd9e59705a00dc6daeec5486fb34893d52bd83f99eefcf0673378bb7eca806946a2fede1fd37c33133f8ce8a
data/HISTORY.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Master
2
2
 
3
+ # Version 0.5.5
4
+ Release Date: 2017-10-20
5
+
6
+ ### Fixed
7
+ * fixed error when passing string argument to with_capture.
8
+
3
9
  # Version 0.5.4
4
10
  Release Date: 2017-10-09
5
11
 
@@ -15,8 +15,7 @@ module Closer
15
15
  @@_images = []
16
16
 
17
17
  def capture(options = {})
18
- options ||= {}
19
- options = {:title => options} if options.is_a?(String)
18
+ options = normalize_options(options)
20
19
  return if ENV['FORMAT'] == 'junit' and not options.fetch(:force, false)
21
20
 
22
21
  url = Rack::Utils.unescape(current_url)
@@ -43,6 +42,7 @@ module Closer
43
42
  end
44
43
 
45
44
  def with_capture(options = {})
45
+ options = normalize_options(options)
46
46
  begin
47
47
  yield
48
48
  rescue Exception => e
@@ -69,6 +69,11 @@ module Closer
69
69
  end
70
70
  end
71
71
 
72
+ def normalize_options(options)
73
+ options ||= {}
74
+ options = {:title => options} if options.is_a?(String)
75
+ options
76
+ end
72
77
  end
73
78
  end
74
79
  end
@@ -1,4 +1,4 @@
1
- require 'closer/drivers/file_detector'
1
+ require_relative 'drivers/file_detector'
2
2
 
3
3
  Capybara.default_driver = (ENV['DRIVER'] || 'firefox').to_sym
4
4
 
@@ -27,6 +27,10 @@ when :chrome
27
27
  end
28
28
  when :poltergeist
29
29
  require 'capybara/poltergeist'
30
+
31
+ Capybara.register_driver :poltergeist do |app|
32
+ Capybara::Poltergeist::Driver.new(app, timeout: 60)
33
+ end
30
34
  when :firefox
31
35
  if ENV['CI'] == 'travis'
32
36
  caps = Selenium::WebDriver::Remote::Capabilities.firefox(
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.5.4'
2
+ VERSION = '0.5.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-08 00:00:00.000000000 Z
11
+ date: 2017-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -116,7 +116,6 @@ files:
116
116
  - closer.gemspec
117
117
  - lib/closer.rb
118
118
  - lib/closer/config.rb
119
- - lib/closer/drivers/file_detector.rb
120
119
  - lib/closer/formatter/closer.css
121
120
  - lib/closer/formatter/closer.js
122
121
  - lib/closer/formatter/closer_html.rb
@@ -127,6 +126,7 @@ files:
127
126
  - lib/closer/helpers.rb
128
127
  - lib/closer/helpers/capture.rb
129
128
  - lib/closer/helpers/driver.rb
129
+ - lib/closer/helpers/drivers/file_detector.rb
130
130
  - lib/closer/helpers/minitest.rb
131
131
  - lib/closer/tasks.rb
132
132
  - lib/closer/version.rb