fastlane-plugin-imagesgoldenrun 0.1.6 → 0.1.7

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
  SHA256:
3
- metadata.gz: e78db5222dfb424d3ed6a9916664a9c03f4dfc1abf3eb60162e80c1982abcd16
4
- data.tar.gz: e5737cf57de2d69f657463bd06d9050fbc2e7f0b22a3e97c3a6a6bb02661befb
3
+ metadata.gz: 69dfda3b91f18091802a509503830d4f28fb8d8f3d4bfe88c511b88837a16f40
4
+ data.tar.gz: 2e7d09b5e6442c8ddf45858569e725dad25fadae583e1463167a026244d28b35
5
5
  SHA512:
6
- metadata.gz: bff2c50ae34f1dda65061db9ccd5f529a91e845195ca8342c96df6a1a04200a920b474f741ee11ce4b8b797408b89e59917250abed3262d4f64493786d08adb6
7
- data.tar.gz: 2afd7f5f69ca6684cbaf78888ce8c64daa86e3e1a858d8f439e7562e1d8940fe763a5b7b3ae3844383acb8ffc0ee34ba48fd9d703c8189ed23bb59761378863b
6
+ metadata.gz: b5f4ae5c9cebaa14edebc0a49172d052822e94546281c47c3eb5b63c62ad05b0fc07123fac4097e00bb11c4069cab7b17677b15d30767bfd57dbf7a1494b8a94
7
+ data.tar.gz: 150d702a37ec865e4559229327df3d33b70d6e73f965f68da53030d107a420665ce7dacdb1df42811e6e52a9e6b90aa62004258664c05e9778a4e3a8682c0a37
@@ -8,9 +8,13 @@ module Fastlane
8
8
  class ImagesgoldenrunAction < Action
9
9
  def self.run(params)
10
10
 
11
+ UI.message("Starting...".green)
12
+
11
13
  differencesRootFolder = "imagesGoldenRunReport"
12
14
  differencesFolder = "differences"
13
15
  differencesPath = "#{differencesRootFolder}/#{differencesFolder}"
16
+ UI.message("differencesPath: #{differencesPath}".green)
17
+
14
18
  FileUtils.mkdir_p(differencesPath)
15
19
 
16
20
  Dir.foreach(differencesPath) do |f|
@@ -27,8 +31,10 @@ module Fastlane
27
31
  goldenRunImagesNames = Dir.entries(params[:goldenRunLoc]).select {|f| f.end_with?(imgExtension)}
28
32
 
29
33
  goldenRunImagesNames.each do |imageName|
34
+ UI.message("Comparing #{imageName}".green)
30
35
 
31
36
  imgFullPathGolden = "#{params[:goldenRunLoc]}/#{imageName}"
37
+ UI.message(" full path: #{imgFullPathGolden}".green)
32
38
 
33
39
  #find the full name of the result file
34
40
  resultImageName = Dir.entries(params[:resultLoc]).select {|f| f.start_with? imageName.gsub(imgExtension, "") }.first
@@ -40,15 +46,19 @@ module Fastlane
40
46
  r = res.match?
41
47
  unless r
42
48
  hasDifferences = true
49
+ UI.message(" Has differences".green)
43
50
  #save the result image
44
51
  imagesGoldenRunReportFullPath = "#{differencesPath}/#{imageName}"
45
52
  res.difference_image.save(imagesGoldenRunReportFullPath)
46
53
 
47
54
  #html report
48
55
  htmlImages += "<h2>#{imageName}</h2><img src='#{differencesFolder}/#{imageName}' style='height:50%;' onclick='window.open(this.src)'>"
56
+ else
57
+ UI.message(" No differences".green)
49
58
  end
50
59
  end
51
60
 
61
+ UI.message("Creating report".green)
52
62
  #html report
53
63
  goldenRunReport.gsub!("<htmlImages>", hasDifferences ? htmlImages : "<h3>No differences found<h3>")
54
64
  File.open("#{differencesRootFolder}/report.html", "w") { |file| file.write(goldenRunReport) }
@@ -57,6 +67,7 @@ module Fastlane
57
67
  UI.message("Error: ".red + "Some differences found".red)
58
68
  raise Exception
59
69
  end
70
+ UI.message("Done".green)
60
71
  end
61
72
 
62
73
  def self.description
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Imagesgoldenrun
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
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.6
4
+ version: 0.1.7
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-05-28 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry