fastlane-plugin-imagesgoldenrun 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d1227196a57d2b1d93d4279624c2b56f28f3391
|
4
|
+
data.tar.gz: 3adca88ccaec7e3a11f2c87b17d16a7eaf221aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8f4bf426bbe0009bb6346fc9b8fec998ad303d10b457378f207fdeec1299436fc1e4937f64d6167b8ff8d514f87ecd87967f5c28b2095da5bf4fcaf002fba21
|
7
|
+
data.tar.gz: 070a2f5190f49f2908631514691f3b30e297668a72fc27be7e8d0b0e74d556998238cec1dd4a9d1ad857a8b41a0e0fdf475b8bc3fce21982bca7a56ea25a7dc8
|
@@ -18,9 +18,10 @@ module Fastlane
|
|
18
18
|
end
|
19
19
|
|
20
20
|
#html report
|
21
|
-
goldenRunReport = "<html><body><htmlImages></body></html>"
|
21
|
+
goldenRunReport = "<html><body><h2>Images Gonden Run results<h2><p><htmlImages></body></html>"
|
22
22
|
htmlImages = ""
|
23
23
|
imgExtension = ".png"
|
24
|
+
hasDifferences = false
|
24
25
|
|
25
26
|
goldenRunLoc = File.expand_path(File.join(Dir.pwd, params[:goldenRunLoc]))
|
26
27
|
resultsLoc = File.expand_path(File.join(Dir.pwd, params[:resultLoc]))
|
@@ -40,6 +41,7 @@ module Fastlane
|
|
40
41
|
res = Imatcher.compare(imgFullPathGolden, imgFullPathResult, exclude_rect: excludeArea)
|
41
42
|
r = res.match?
|
42
43
|
unless r
|
44
|
+
hasDifferences = true
|
43
45
|
#save the result image
|
44
46
|
imagesGoldenRunReportFullPath = "#{differencesPath}/#{imageName}"
|
45
47
|
res.difference_image.save(imagesGoldenRunReportFullPath)
|
@@ -50,8 +52,13 @@ module Fastlane
|
|
50
52
|
end
|
51
53
|
|
52
54
|
#html report
|
53
|
-
goldenRunReport.gsub!("<htmlImages>", htmlImages)
|
55
|
+
goldenRunReport.gsub!("<htmlImages>", hasDifferences ? htmlImages : "<h3>No differences found<h3>")
|
54
56
|
File.open("#{differencesFolder}/report.html", "w") { |file| file.write(goldenRunReport) }
|
57
|
+
|
58
|
+
if hasDifferences
|
59
|
+
UI.message("Error: ".red + "Some differences found".red)
|
60
|
+
raise Exception
|
61
|
+
end
|
55
62
|
end
|
56
63
|
|
57
64
|
def self.description
|