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: bd5fc30c800629a03a096327f7384232f87c7911
4
- data.tar.gz: 5b179fe77ea1103e075bb2afa7b0d58736f63d89
3
+ metadata.gz: 20a22946efb606f17f8c598722aca6e7ed15a2f2
4
+ data.tar.gz: 8672fa4c0927c28491b2ff11b33d76dae528078e
5
5
  SHA512:
6
- metadata.gz: f815b77262b156e4956273f1adec13fbe823eef25aca1c42d6dc3b92c64259314506ff1902b51f644d2574f22de42a7f9d8d45a2a321712cbc6ec4de19c193d7
7
- data.tar.gz: b4674678169b8476457de0a85bb5b165440678404af2fecfa3bcef0f27682782c969d67c0dd9e3a6830cec465e808d918069962cee6012b5fa9581a7d522a5a0
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
- goldenRunImagesNames = Dir.entries(goldenRunLoc).select {|f| f.end_with? ".png"}
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
- imgFullPathG = "#{params[:goldenRunLoc]}/#{imageName}"
29
- imgFullPathR = "#{params[:resultLoc]}/#{imageName}"
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(imgFullPathG, imgFullPathR, exclude_rect: excludeArea)
40
+ res = Imatcher.compare(imgFullPathGolden, imgFullPathResult, exclude_rect: excludeArea)
32
41
  r = res.match?
33
42
  unless r
34
43
  #save the result image
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Imagesgoldenrun
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2019-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry