acceptance_test 1.7.11 → 1.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGES +4 -0
- data/lib/acceptance_test/screenshot_maker.rb +17 -12
- data/lib/acceptance_test/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGU0NGU3MjljNzhmY2QyYWZjNDIwMGI3NjkyZjEwNTI3Y2Y5YTc3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGExMDNlNTNkOWM5N2JhZTMxZGI5YjJjOTczOTExZWJjYTE4Y2UwNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjkzZWJmMDdmOTVjZDNkZDVhMDZhNTQwYTFhNmY5YmUyYWY2YmE4MzhmZTU1
|
10
|
+
NTE3N2FmZjNmYjM3MTU1ZmQ1NDk4MmNjN2VlYzEwMmYyMmIxM2FkZDI3ODg1
|
11
|
+
ZDBmZmE5NDkxYzRhYTEwNmM4YjVjYTBlMjY5MzAxNTI5ODQxNzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGI3Y2Y3ZWNlZWRiN2FkYjBlYjI1MGYyOTUyMWMyZmU1YTMxNzEzYzFjZDY1
|
14
|
+
MzZkMWJhNmMxNTI0NWJhYTI5ZjY1MzI4N2I1MjBhYzJkNWRiNmJhYzUyN2Fj
|
15
|
+
Mjk3ZTdmNjM3NjE3ZWYzYzYyNjM3MjRlNzk2NDMyYzQyMTY2Yjk=
|
data/CHANGES
CHANGED
@@ -6,25 +6,30 @@ class ScreenshotMaker
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def make page, options
|
9
|
-
|
9
|
+
name = screenshot_name(File.basename(options[:file_path]), options[:line_number])
|
10
|
+
path = File.expand_path("#{basedir}/#{name}")
|
11
|
+
|
12
|
+
page.save_screenshot(path)
|
10
13
|
end
|
11
14
|
|
12
|
-
def
|
13
|
-
|
15
|
+
def screenshot_name filename, line_number=nil
|
16
|
+
"#{filename}#{line_number ? '-'+line_number : ''}.png"
|
14
17
|
end
|
15
18
|
|
16
|
-
def
|
17
|
-
|
18
|
-
line_number = options[:line_number]
|
19
|
+
def screenshot_url options
|
20
|
+
file_path = options[:file_path]
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
+
if file_path =~ /http:/ or file_path =~ /https:/ or file_path =~ /ftp:/
|
23
|
+
name = screenshot_name(File.basename(options[:file_path]), options[:line_number])
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
+
"#{file_path}/#{name}"
|
26
|
+
else
|
27
|
+
name = screenshot_name(File.basename(options[:file_path]), options[:line_number])
|
25
28
|
|
26
|
-
|
27
|
-
|
29
|
+
path = File.expand_path("#{basedir}/#{name}")
|
30
|
+
|
31
|
+
"file:///#{path}"
|
32
|
+
end
|
28
33
|
end
|
29
34
|
|
30
35
|
end
|