ghost_pictures 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ghost_pictures/api.rb +3 -2
- data/lib/ghost_pictures/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: cd0b118ba990b7bcc9afc0415716714baafd197f
|
|
4
|
+
data.tar.gz: 21eda6911ca3572ddc508d5ecf2e7f9da6c27044
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 806410fef77e5e9e6129671e90d0237808604497984a7ffd035007872da903265501b703884d42098f36e381fd3e7a03c0d509088229d75cdf2d7560d2410062
|
|
7
|
+
data.tar.gz: 85eff894bfc088f90b4eafb02cda119dd83133b7152fc1a69a1db1e1967e3f80afcd8b8855d6e15ea5adfd62aa82095874c3293b0193080e17bc6c5a41327e49
|
data/lib/ghost_pictures/api.rb
CHANGED
|
@@ -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
|
|
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
|
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.
|
|
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-
|
|
11
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|