dekiru 0.1.6 → 0.1.7

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
  SHA256:
3
- metadata.gz: 645b46b3968939b35e0d81f7af7cb370c9a1120b489081df02cac5de31d9eb22
4
- data.tar.gz: 87e792def5e10912c14cdd25f002eeb6a4c6db2de08c9d95a0663c2944656a19
3
+ metadata.gz: 52638cf1b48eda2cccf9bc53435a8c361e17a43a3145457eba5fbfdd68b5f9ac
4
+ data.tar.gz: 5ced1fe987c0999fdff91eeef663cd664c3bdafd58a466dd40dd21c6e8b64bda
5
5
  SHA512:
6
- metadata.gz: acd32ab352485b4be6c5fd8ea0277bf06338cfe6cdaade9930fdd81b344ba9a9177b691c1cc55f7b08b443d84530267b805a20347679ec0cc47d367324f3ce2a
7
- data.tar.gz: b342ebd2a82fafdf44b5776407f502412c8fb541cee51d7c889f7dede805bb5ea4c70f90ea6f0c4826a5710c613b432f6fdb7df2f8925e0cfef7a57139580a2d
6
+ metadata.gz: 2dc00bbe336a2381355d72b5da39a398a36640af30a425696c9f145773b1c7c0fe3844d985d533af8f2336dc2e0591cc1cb2f6980fddbacfa587e1b50c759d94
7
+ data.tar.gz: 0f81e7e83a43ac4a335b89e42a5c08cf5f3573792a4afd958aa5744fe3ef3b59546ba82195c36e60f2ec420f52b5bc7dd484c41747e908dc81ff7274f7402027
@@ -2,14 +2,14 @@ module Dekiru
2
2
  module Capybara
3
3
  module Matchers
4
4
  class JsNoErrorMatcher
5
- def matches?(page)
6
- errors = page.driver.browser.manage.logs.get(:browser)
7
- errors.find_all { |error| error.level == 'WARNING' }.each do |error|
5
+ def matches?(page_or_logs)
6
+ logs = page_or_logs.respond_to?(:driver) ? page.driver.browser.manage.logs.get(:browser) : page_or_logs
7
+ logs.find_all { |log| log.level == 'WARNING' }.each do |log|
8
8
  STDERR.puts 'WARN: javascript warning'
9
- STDERR.puts error.message
9
+ STDERR.puts log.message
10
10
  end
11
11
 
12
- @severe_errors = errors.find_all { |error| error.level == 'SEVERE' }
12
+ @severe_errors = logs.find_all { |log| log.level == 'SEVERE' }
13
13
  @severe_errors.empty?
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Dekiru
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dekiru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akihiro Matsumura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-16 00:00:00.000000000 Z
11
+ date: 2020-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http_accept_language