ghost_pictures 0.2.0 → 0.2.1

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: e8d0ceb13a2bce8e0cdb0a360f8c60f650535275
4
- data.tar.gz: 8eb2ef6ee14e5d80f8c161760089ba904d3cab92
3
+ metadata.gz: cd0b118ba990b7bcc9afc0415716714baafd197f
4
+ data.tar.gz: 21eda6911ca3572ddc508d5ecf2e7f9da6c27044
5
5
  SHA512:
6
- metadata.gz: 9d793096c0223e6dbaa3ad94d772c278fae841af9b5ac55fa19f832ca2ff13c7df2c617c39ecafddb3cf9a8a49ebaebfcf1302c2cc08c31bf5e068ee9fd809f8
7
- data.tar.gz: a2799ad1d6921fa5d561949833e5e6c9e542b165ef5cc95ccad5bc4bfa972f9821c481df81cab4cd3b68df4fb939b2c2ffc3ca91e99ed6e6fced07817b3b067a
6
+ metadata.gz: 806410fef77e5e9e6129671e90d0237808604497984a7ffd035007872da903265501b703884d42098f36e381fd3e7a03c0d509088229d75cdf2d7560d2410062
7
+ data.tar.gz: 85eff894bfc088f90b4eafb02cda119dd83133b7152fc1a69a1db1e1967e3f80afcd8b8855d6e15ea5adfd62aa82095874c3293b0193080e17bc6c5a41327e49
@@ -12,9 +12,9 @@ module GhostPictures
12
12
  Timeout.timeout(Capybara.default_max_wait_time) do
13
13
  loop { break if Record.select_if(method, path).size >= count }
14
14
  end
15
+ wait_for_jquery_ajax
15
16
  end
16
17
 
17
- # @see https://robots.thoughtbot.com/automatically-wait-for-ajax-with-capybara
18
18
  def wait_for_jquery_ajax
19
19
  Timeout.timeout(Capybara.default_max_wait_time) do
20
20
  loop until finished_all_ajax_requests?
@@ -24,7 +24,8 @@ module GhostPictures
24
24
  private
25
25
 
26
26
  def finished_all_ajax_requests?
27
- page.evaluate_script('jQuery.active').zero?
27
+ !Capybara.page.evaluate_script('window.hasOwnProperty("jQuery")') ||
28
+ Capybara.page.evaluate_script('jQuery.active').zero?
28
29
  end
29
30
  end
30
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GhostPictures
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghost_pictures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sinsoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-12 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: bundler