fastlane-plugin-imagesgoldenrun 0.1.1 → 0.1.2
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: 20a22946efb606f17f8c598722aca6e7ed15a2f2
|
4
|
+
data.tar.gz: 8672fa4c0927c28491b2ff11b33d76dae528078e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7b7b1d048cb196aca08fbfe4db8fb803d6aaf7b516171fd6227318241aabad8886d93b77211f2bd10143a24b8c0bb56f589a847f65337f6fb2c3774d8d4e4bb
|
7
|
+
data.tar.gz: 42827889bdecf9a7bd83757fbe836e7d26e67116ac000f1bb67f1611c93a5f8b6adb8fde406a5cff57b17d79605989bc757bf022c73fc73f273b19e7e82e6cb3
|
@@ -20,15 +20,24 @@ module Fastlane
|
|
20
20
|
#html report
|
21
21
|
goldenRunReport = "<html><body><htmlImages></body></html>"
|
22
22
|
htmlImages = ""
|
23
|
+
imgExtension = ".png"
|
23
24
|
|
24
25
|
goldenRunLoc = File.expand_path(File.join(Dir.pwd, params[:goldenRunLoc]))
|
25
|
-
|
26
|
+
resultsLoc = File.expand_path(File.join(Dir.pwd, params[:resultLoc]))
|
27
|
+
|
28
|
+
goldenRunImagesNames = Dir.entries(goldenRunLoc).select {|f| f.end_with?(imgExtension)}
|
29
|
+
|
26
30
|
goldenRunImagesNames.each do |imageName|
|
27
31
|
|
28
|
-
|
29
|
-
|
32
|
+
imgFullPathGolden = "#{params[:goldenRunLoc]}/#{imageName}"
|
33
|
+
|
34
|
+
#find the full name of the result file
|
35
|
+
resultImageName = Dir.entries(resultsLoc).select {|f| f.start_with? imageName.gsub(imgExtension, "") }.first
|
36
|
+
|
37
|
+
imgFullPathResult = "#{params[:resultLoc]}/#{resultImageName}"
|
38
|
+
|
30
39
|
excludeArea = params[:excludeArea].gsub(/\s+/, '').split(",").map { |e| e.to_i }
|
31
|
-
res = Imatcher.compare(
|
40
|
+
res = Imatcher.compare(imgFullPathGolden, imgFullPathResult, exclude_rect: excludeArea)
|
32
41
|
r = res.match?
|
33
42
|
unless r
|
34
43
|
#save the result image
|
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.2
|
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:
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|