fastlane-plugin-imagesgoldenrun 0.1.4 → 0.1.5
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: 891671a5c9ef8a887b0eda26b6f8d9cc9d1f4449
|
4
|
+
data.tar.gz: 7e38c74a444ed572eca85aff4711f730c925b2ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16760bd3600a1c826d43c9dcb404879e55586b473607038c50a6c61a9593872f08c2e6860ef97c3106926a41da395b31be1500c96e2c601a307758e841efad4e
|
7
|
+
data.tar.gz: 1f8ad563b1fa6750fdb1570feddfc1351816c94ac60023c7d8e7a1ac1f38eef420c2b0fb36323b1348b4af9c023edd484c686752815ca68bfd25513a16ecd88d
|
@@ -8,8 +8,9 @@ module Fastlane
|
|
8
8
|
class ImagesgoldenrunAction < Action
|
9
9
|
def self.run(params)
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
differencesRootFolder = "imagesGoldenRunReport"
|
12
|
+
differencesFolder = "differences"
|
13
|
+
differencesPath = "#{differencesRootFolder}/#{differencesFolder}"
|
13
14
|
FileUtils.mkdir_p(differencesPath)
|
14
15
|
|
15
16
|
Dir.foreach(differencesPath) do |f|
|
@@ -47,13 +48,13 @@ module Fastlane
|
|
47
48
|
res.difference_image.save(imagesGoldenRunReportFullPath)
|
48
49
|
|
49
50
|
#html report
|
50
|
-
htmlImages += "<h2>#{imageName}</h2><img src='
|
51
|
+
htmlImages += "<h2>#{imageName}</h2><img src='#{differencesFolder}/#{imageName}' style='height:50%;' onclick='window.open(this.src)'>"
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
54
55
|
#html report
|
55
56
|
goldenRunReport.gsub!("<htmlImages>", hasDifferences ? htmlImages : "<h3>No differences found<h3>")
|
56
|
-
File.open("#{
|
57
|
+
File.open("#{differencesRootFolder}/report.html", "w") { |file| file.write(goldenRunReport) }
|
57
58
|
|
58
59
|
if hasDifferences && params[:failWhenDiffs]
|
59
60
|
UI.message("Error: ".red + "Some differences found".red)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-imagesgoldenrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luís Esteves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|