fastlane-plugin-xcov_report 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b30a1003b20e46d80251475a2a85f089dc4591f
4
- data.tar.gz: c0ef35124cb65e6477e88832ffb89a71726d8a44
3
+ metadata.gz: b2969b2d8410da833c0c6e95afde471b8927c170
4
+ data.tar.gz: b96e05029e0464ace7ad0299eb1a8ce4612eed7f
5
5
  SHA512:
6
- metadata.gz: d595bd6cebef75f236fa8934de28464aaa43ed9bb270c1e88b640f719d4f24200e083d3515b60f831608a85ad8d5142145d51cd571af8936fea90a2ca1108179
7
- data.tar.gz: 9c894ec662dff02a5e29a78b93427079a02afa2bfdea1ded35b583f0458f0d812667a4a56ca68c537ed44a75d171c8f1ebe14fe7414af22c0797d47fe6b99407
6
+ metadata.gz: dd17ce8b20e8d2298b36b3713bb9a94f449560fd32fb7c0ee02d6dc4550c04c9622858ce9b154a09e4a85dbb6660a6e8951334b2a9b0845cbc9a413028398d9a
7
+ data.tar.gz: 466ad482630da4adf62f299df32b7bc274d493fb476d98c1c1898507109eab13f84241f1138eff6ea34ad741e6b84f648588cc0ed0150a6a44987110c289010c
@@ -10,7 +10,72 @@ module Fastlane
10
10
  data = JSON.parse(file)
11
11
  @coverage = data['coverage']
12
12
  @targets = data['targets']
13
- template = File.read(File.expand_path('coverage/page.html.erb'))
13
+ template = '
14
+ ---
15
+ layout: coverage
16
+ ---
17
+ <div class="coverage">
18
+
19
+ <div class="row">
20
+ <div class="col-md-20">
21
+ <h2>Coverage</h2>
22
+ </div>
23
+ <div class="col-md-4 text-right">
24
+ <h2 class="text-right"><%= (@coverage * 100).round(2) %>%</h2>
25
+ </div>
26
+ </div>
27
+ <% cont = 0 %>
28
+ <% @targets.each do |value| %>
29
+ <div class="row targets">
30
+ <div class="col-md-20">
31
+ <h4><%= value["name"] %></h4>
32
+ </div>
33
+ <div class="col-md-4 text-right">
34
+ <h4><%= (value["coverage"] * 100).round(2) %>%</h4>
35
+ </div>
36
+ </div>
37
+
38
+ <% value["files"].each do |file| %>
39
+ <% cont = cont + 1 %>
40
+ <ol class="list-items">
41
+ <li class="list-items-row">
42
+ <div data-toggle="collapse" aria-expanded="false" data-target="#list-item-line-<%= cont %>">
43
+ <div class="row">
44
+ <div class="col-md-2 col-md-offset-2">
45
+ <i class="glyph glyph-add"></i>
46
+ <i class="glyph glyph-remove"></i>
47
+ </div>
48
+ <div class="col-md-8">
49
+ <a><%= file["name"] %></a>
50
+ </div>
51
+ <div class="col-md-6">
52
+ <%= file["type"] %>
53
+ </div>
54
+ <div class="col-md-6 text-right">
55
+ <%= (file["coverage"] * 100).round(2) %>%
56
+ </div>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="collapse" id="list-item-line-<%= cont %>">
61
+ <% file["functions"].each do |function| %>
62
+ <div class="row functions">
63
+ <div class="col-md-18 col-md-offset-2">
64
+ <%= function["name"] %>
65
+ </div>
66
+ <div class="col-md-4 text-right">
67
+ <%= (function["coverage"] * 100).round(2) %>%
68
+ </div>
69
+ </div>
70
+ <% end %>
71
+ </div>
72
+ </li>
73
+ </ol>
74
+ <% end %>
75
+ <% end %>
76
+ </div>
77
+
78
+ '
14
79
  renderer = ERB.new(template)
15
80
  result = renderer.result()
16
81
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module XcovReport
3
- VERSION = "0.1.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-xcov_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gianfranco Manganiello