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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2JlOTlhOTg3Mzc5OTk1YjI1Zjc5Njk0NDE5YzZjNGQwNzlmMTg3NQ==
4
+ OGU0NGU3MjljNzhmY2QyYWZjNDIwMGI3NjkyZjEwNTI3Y2Y5YTc3YQ==
5
5
  data.tar.gz: !binary |-
6
- MjcxZjZlZjU4OGQ1MjBmNjY3MmMzNTZlNjc2NzdiMDliMDc3NDRmNA==
6
+ MGExMDNlNTNkOWM5N2JhZTMxZGI5YjJjOTczOTExZWJjYTE4Y2UwNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWE1NDE1NTY3M2ZjNjgxMDVhMzBiZDdmMDAxNjgxYzNkYmI0NjkxNGQ0YTIz
10
- N2JjODIzNDIyMWVmZDBlMjJkZTQyY2E3ZGZiYTY2NTZjNjE4ZjFhMjdhZTFi
11
- OGJjOGYwZmE5YWRjZDFlNDQ5MjQyMmIyNmM0MjZmNzRmYTEwYjE=
9
+ ZjkzZWJmMDdmOTVjZDNkZDVhMDZhNTQwYTFhNmY5YmUyYWY2YmE4MzhmZTU1
10
+ NTE3N2FmZjNmYjM3MTU1ZmQ1NDk4MmNjN2VlYzEwMmYyMmIxM2FkZDI3ODg1
11
+ ZDBmZmE5NDkxYzRhYTEwNmM4YjVjYTBlMjY5MzAxNTI5ODQxNzI=
12
12
  data.tar.gz: !binary |-
13
- MTA4YWMxYmNjMDczYzU0OGMyOTdjYTBlOGY0ZTkzNWY4YTMwN2RmNDc4Y2Vh
14
- YzJlYzFlZjExMjUzYzk4MDI4MDI5MzIyMDYxYzIzNGI2ZjgwYTc2NjU4MzAw
15
- ZjlhOWFhNjQ5Nzg1MjFkOWIwZDc5YTc4OTAxZmY5ZWM1ZDc5MDg=
13
+ NGI3Y2Y3ZWNlZWRiN2FkYjBlYjI1MGYyOTUyMWMyZmU1YTMxNzEzYzFjZDY1
14
+ MzZkMWJhNmMxNTI0NWJhYTI5ZjY1MzI4N2I1MjBhYzJkNWRiNmJhYzUyN2Fj
15
+ Mjk3ZTdmNjM3NjE3ZWYzYzYyNjM3MjRlNzk2NDMyYzQyMTY2Yjk=
data/CHANGES CHANGED
@@ -187,4 +187,8 @@
187
187
 
188
188
  == Version 1.7.11
189
189
 
190
+ * Bug fix
191
+
192
+ == Version 1.7.12
193
+
190
194
  * Bug fix
@@ -6,25 +6,30 @@ class ScreenshotMaker
6
6
  end
7
7
 
8
8
  def make page, options
9
- page.save_screenshot(screenshot_path(options))
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 screenshot_path options
13
- File.expand_path("#{basedir}/#{screenshot_name(options)}")
15
+ def screenshot_name filename, line_number=nil
16
+ "#{filename}#{line_number ? '-'+line_number : ''}.png"
14
17
  end
15
18
 
16
- def screenshot_name options
17
- filename = File.basename(options[:file_path])
18
- line_number = options[:line_number]
19
+ def screenshot_url options
20
+ file_path = options[:file_path]
19
21
 
20
- name = filename
21
- name += "-#{line_number}" if line_number
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
- "#{name}.png"
24
- end
25
+ "#{file_path}/#{name}"
26
+ else
27
+ name = screenshot_name(File.basename(options[:file_path]), options[:line_number])
25
28
 
26
- def screenshot_url options
27
- "file:///#{screenshot_path(options)}"
29
+ path = File.expand_path("#{basedir}/#{name}")
30
+
31
+ "file:///#{path}"
32
+ end
28
33
  end
29
34
 
30
35
  end
@@ -1,3 +1,3 @@
1
1
  class AcceptanceTest
2
- VERSION = "1.7.11"
2
+ VERSION = "1.7.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acceptance_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.11
4
+ version: 1.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Shvets