simplecov-tailwindcss 0.1.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.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintignore +1 -0
  3. data/.eslintrc.yml +25 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  5. data/.github/ISSUE_TEMPLATE/feature-request.md +20 -0
  6. data/.github/ISSUE_TEMPLATE/question.md +10 -0
  7. data/.github/PULL_REQUEST_TEMPLATE.md +32 -0
  8. data/.github/workflows/builds.yml +37 -0
  9. data/.github/workflows/lints.yml +38 -0
  10. data/.github/workflows/tests.yml +26 -0
  11. data/.gitignore +12 -0
  12. data/.markdownlint.yml +21 -0
  13. data/.rubocop.yml +876 -0
  14. data/.ruby-version +1 -0
  15. data/.stylelintignore +1 -0
  16. data/.stylelintrc +48 -0
  17. data/CHANGELOG.md +14 -0
  18. data/CODE_OF_CONDUCT.md +74 -0
  19. data/CONTRIBUTING.md +132 -0
  20. data/Gemfile +18 -0
  21. data/LICENSE +21 -0
  22. data/README.md +111 -0
  23. data/Rakefile +12 -0
  24. data/bin/console +12 -0
  25. data/bin/publish +82 -0
  26. data/bin/setup +7 -0
  27. data/dist/app.js +9 -0
  28. data/dist/app.scss +6 -0
  29. data/dist/scripts/controllers/toggle_controller.js +14 -0
  30. data/dist/scripts/navigation.js +44 -0
  31. data/dist/scripts/table.js +103 -0
  32. data/dist/scripts/timeago.js +3 -0
  33. data/dist/styles/dialog.scss +50 -0
  34. data/dist/styles/main.scss +3 -0
  35. data/lib/simplecov-tailwindcss.rb +156 -0
  36. data/lib/simplecov-tailwindcss/version.rb +9 -0
  37. data/package.json +69 -0
  38. data/public/application.css +201867 -0
  39. data/public/application.js +662 -0
  40. data/simplecov-tailwindcss.gemspec +32 -0
  41. data/tailwind.config.js +17 -0
  42. data/test/fixtures/app/controllers/sample_controller.rb +12 -0
  43. data/test/fixtures/app/models/user.rb +12 -0
  44. data/test/fixtures/sample.rb +12 -0
  45. data/test/simplecov-tailwindcss/simplecov_tailwindcss_test.rb +40 -0
  46. data/test/test_helper.rb +18 -0
  47. data/views/dialog.erb +88 -0
  48. data/views/group_page.erb +133 -0
  49. data/views/main.erb +187 -0
  50. data/views/stat_card.erb +12 -0
  51. data/views/table_column_head.erb +13 -0
  52. data/webpack.config.js +82 -0
  53. data/yarn.lock +7537 -0
  54. metadata +122 -0
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "simplecov-tailwindcss/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "simplecov-tailwindcss"
9
+ spec.version = SimpleCov::Formatter::TailwindFormatter::VERSION
10
+ spec.authors = ["Christopher Pezza"]
11
+ spec.email = ["chiefpansancolt@gmail.com"]
12
+ spec.summary = "HTML Tailwind Design View for Simplecov formatter"
13
+ spec.description = "HTML Tailwind Design View of Simplecov as a formatter"\
14
+ "that is clean, easy to read."
15
+ spec.homepage = "https://chiefpansancolt.live/docs/simplecov_tailwind/"
16
+ spec.license = "MIT"
17
+
18
+ spec.required_ruby_version = ">= 2.3.0"
19
+
20
+ spec.metadata["homepage_uri"] = spec.homepage
21
+ spec.metadata["source_code_uri"] = "https://github.com/chiefpansancolt/simplecov-tailwindcss"
22
+ spec.metadata["changelog_uri"] = "https://github.com/chiefpansancolt/simplecov-tailwindcss/blob/master/CHANGELOG.md"
23
+ spec.metadata["bug_tracker_uri"] = "https://github.com/chiefpansancolt/simplecov-tailwindcss/issues"
24
+
25
+ spec.files = `git ls-files`.split("\n")
26
+ spec.bindir = "bin"
27
+ spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
+ spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_dependency "simplecov", ">= 0.16.0"
32
+ end
@@ -0,0 +1,17 @@
1
+ const defaultTheme = require('tailwindcss/defaultTheme');
2
+
3
+ module.exports = {
4
+ purge: false,
5
+ theme: {
6
+ extend: {
7
+ fontFamily: {
8
+ sans: ['Inter var', ...defaultTheme.fontFamily.sans],
9
+ },
10
+ },
11
+ },
12
+ variants: {},
13
+ plugins: [
14
+ require('@tailwindcss/ui'),
15
+ require('@tailwindcss/typography'),
16
+ ],
17
+ };
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Foo class
4
+ class Foo
5
+ def initialize
6
+ @foo = "baz"
7
+ end
8
+
9
+ def bar
10
+ @foo
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Foo class
4
+ class Foo
5
+ def initialize
6
+ @foo = "baz"
7
+ end
8
+
9
+ def bar
10
+ @foo
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Foo class
4
+ class Foo
5
+ def initialize
6
+ @foo = "baz"
7
+ end
8
+
9
+ def bar
10
+ @foo
11
+ end
12
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+ require "simplecov"
5
+ require "simplecov-tailwindcss"
6
+ require "simplecov-tailwindcss/version"
7
+
8
+ class SimplecovTailwindcssTest < Minitest::Test
9
+ def test_defined
10
+ assert defined?(SimpleCov::Formatter::TailwindFormatter)
11
+ assert defined?(SimpleCov::Formatter::TailwindFormatter::VERSION)
12
+ end
13
+
14
+ def test_version
15
+ version = SimpleCov::Formatter::TailwindFormatter::VERSION
16
+
17
+ assert(!version.nil?)
18
+ end
19
+
20
+ def test_execution # rubocop:disable Metrics/MethodLength
21
+ @original_result = {
22
+ source_fixture("sample.rb") => [nil, 1, 1, 1, nil, nil, 1, 1, nil, nil],
23
+ source_fixture("app/models/user.rb") => [
24
+ nil, 1, 1, 1, nil, nil, 1, 0, nil, nil
25
+ ],
26
+ source_fixture("app/controllers/sample_controller.rb") => [
27
+ nil, 1, 1, 1, nil, nil, 0, 0, nil, nil
28
+ ]
29
+ }
30
+
31
+ @result = SimpleCov::Result.new(@original_result)
32
+ SimpleCov::Formatter::TailwindFormatter.new.format(@result)
33
+
34
+ assert(File.exist?("/#{SimpleCov.coverage_path}/index.html"))
35
+ end
36
+
37
+ def source_fixture(filename)
38
+ File.expand_path(File.join(File.dirname(__FILE__), "fixtures", filename))
39
+ end
40
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "simplecov"
4
+
5
+ SimpleCov.start do
6
+ enable_coverage :branch
7
+ add_filter "/test/"
8
+ add_group "Library", "/lib"
9
+ end
10
+
11
+ SimpleCov.formatters = [
12
+ SimpleCov::Formatter::TailwindFormatter
13
+ ]
14
+
15
+ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
16
+ require "minitest/autorun"
17
+ require "minitest/pride"
18
+ require "mocha/minitest"
@@ -0,0 +1,88 @@
1
+ <div class="fixed z-10 inset-0 overflow-y-auto hidden" data-toggle-name="<%= id(file) %>">
2
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
3
+ <div class="fixed inset-0 transition-opacity">
4
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
5
+ </div>
6
+
7
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen"></span>&#8203;
8
+
9
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle" role="dialog" aria-modal="true" aria-labelledby="modal-headline">
10
+ <div class="hidden sm:block absolute top-0 right-0 pt-4 pr-4">
11
+ <button type="button" class="text-gray-400 hover:text-gray-500 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150" aria-label="Close" data-action="click->toggle#toggle touch->toggle#toggle" data-toggle-target="<%= id(file) %>">
12
+ <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
13
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
14
+ </svg>
15
+ </button>
16
+ </div>
17
+ <div class="bg-white">
18
+ <div class="sm:flex sm:items-start">
19
+ <div class="mt-3 w-full">
20
+ <h3 class=" pt-4 pl-6 text-lg leading-6 font-medium text-gray-900" id="modal-headline">
21
+ <%= shortened_filename file %>
22
+ (<span class="<%= coverage_class(file.covered_percent) %>">
23
+ <%= file.covered_percent.round(2).to_s %>%
24
+ </span>)
25
+ <% if branchable_result? %>
26
+ | Branches
27
+ (<span class="<%= coverage_class(file.covered_percent) %>">
28
+ <%= file.branches_coverage_percent.round(2).to_s %>%
29
+ </span>)
30
+ <% end %>
31
+ </h3>
32
+ <div class="mt-4 dialog-body">
33
+ <pre class="bg-gray-800 text-white whitespace-normal w-full text-xs">
34
+ <ol class="list-decimal ml-12 p-0">
35
+ <% file.lines.each do |line| %>
36
+ <li class="bg-white border-l-4 border-gray-700 py-2 pl-2 pr-4 <%= line.status %>" data-hits="<%= line.coverage ? line.coverage : '' %>"
37
+ data-linenumber="<%= line.number %>">
38
+ <% if line.covered? %>
39
+ <span class="inline-flex items-center ml-1 px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-gray-800 text-white float-right"><%= line.coverage %></span>
40
+ <% end %>
41
+ <% if line.skipped? %>
42
+ <span class="inline-flex items-center ml-1 px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-gray-800 text-white float-right">skipped</span>
43
+ <% end %>
44
+
45
+ <% if branchable_result? %>
46
+ <% file.branches_for_line(line.number).each do |branch_type, hit_count| %>
47
+ <span class="inline-flex items-center ml-1 px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 bg-gray-800 text-white float-right" title="<%= branch_type%> branch hit <%= hit_count %> times">
48
+ <%= branch_type %>: <%= hit_count %>
49
+ </span>
50
+ <% end %>
51
+ <% end %>
52
+ <code class="text-cool-gray-900 whitespace-pre whitespace-pre-wrap"><%= CGI.escapeHTML(line.src.chomp) %></code>
53
+ </li>
54
+ <% end %>
55
+ </ol>
56
+ </pre>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div class="bg-gray-50 px-4 py-3 text-xs">
62
+ <b><%= file.lines_of_code %></b>
63
+ Relevant Lines |
64
+ <span class="text-green-500"><b>
65
+ <%= format_number(file.covered_lines.count) %>
66
+ </b></span>
67
+ Lines Covered |
68
+ <span class="text-red-500"><b>
69
+ <%= format_number(file.missed_lines.count) %>
70
+ </b></span>
71
+ Lines Missed
72
+ <% if branchable_result? %>
73
+ |
74
+ <b><%= file.total_branches.count %></b>
75
+ Total Branches |
76
+ <span class="text-green-500"><b>
77
+ <%= format_number(file.covered_branches.count) %>
78
+ </b></span>
79
+ Branches Covered |
80
+ <span class="text-red-500"><b>
81
+ <%= format_number(file.missed_branches.count) %>
82
+ </b></span>
83
+ Branches Missed
84
+ <% end %>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ </div>
@@ -0,0 +1,133 @@
1
+ <div class="tab-groups pt-2 pb-6 md:py-6 <%= hide_show(title_id) %>" name="<%= title_id %>">
2
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
3
+ <h1 class="text-2xl font-semibold text-gray-900">
4
+ <%= title %>
5
+ </h1>
6
+ </div>
7
+
8
+ <div class="max-w-7xl mx-auto px-6 pt-4 grid grid-cols-2 gap-5 lg:grid-cols-6 md:grid-cols-3">
9
+ <%= generate_stat_card('# of Files', format_number(files.length), 'text-gray-900') %>
10
+ <%= generate_stat_card('Relevent Lines', format_number(files.lines_of_code), 'text-gray-900') %>
11
+ <%= generate_stat_card('Lines Covered', format_number(files.covered_lines), 'text-green-500') %>
12
+ <%= generate_stat_card('Lines Missed', format_number(files.missed_lines), 'text-red-500') %>
13
+ <%= generate_stat_card('Covered', files.covered_percent.round(2).to_s + '%', coverage_class(files.covered_percent)) %>
14
+ <%= generate_stat_card('Hits/Line', files.covered_strength.round(2), strength_class(files.covered_strength)) %>
15
+ <% if branchable_result? %>
16
+ <%= generate_stat_card('Total Branches', format_number(files.total_branches), 'text-gray-900') %>
17
+ <%= generate_stat_card('Branches Covered', format_number(files.covered_branches), 'text-green-500') %>
18
+ <%= generate_stat_card('Branches Missed', format_number(files.missed_branches), 'text-red-500') %>
19
+ <%= generate_stat_card('Branches', files.branch_covered_percent.round(2).to_s + '%', coverage_class(files.branch_covered_percent)) %>
20
+ <% end %>
21
+ </div>
22
+
23
+ <div class="max-w-7xl mx-auto px-6 pt-4">
24
+ <div class="bg-white overflow-hidden shadow rounded-lg">
25
+ <div class="flex flex-col">
26
+ <div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
27
+ <div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
28
+ <div class="overflow-hidden rounded-lg">
29
+ <table class="min-w-full divide-y divide-gray-200" id="<%= title_id %>-table">
30
+ <thead>
31
+ <tr>
32
+ <th class="px-2 py-3 bg-gray-50 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
33
+ <%= generate_table_column_head('File Name') %>
34
+ </th>
35
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
36
+ <%= generate_table_column_head('% Covered') %>
37
+ </th>
38
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
39
+ <%= generate_table_column_head('Lines') %>
40
+ </th>
41
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
42
+ <%= generate_table_column_head('Relevant Files') %>
43
+ </th>
44
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
45
+ <%= generate_table_column_head('Lines Covered') %>
46
+ </th>
47
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
48
+ <%= generate_table_column_head('Lines Missed') %>
49
+ </th>
50
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
51
+ <%= generate_table_column_head('Avg Hits/Line') %>
52
+ </th>
53
+ <% if branchable_result? %>
54
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
55
+ <%= generate_table_column_head('Branch % Covered') %>
56
+ </th>
57
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
58
+ <%= generate_table_column_head('Branches') %>
59
+ </th>
60
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
61
+ <%= generate_table_column_head('Covered Branches') %>
62
+ </th>
63
+ <th class="px-2 py-3 bg-gray-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider clickable">
64
+ <%= generate_table_column_head('Missed Branches') %>
65
+ </th>
66
+ <% end %>
67
+ </tr>
68
+ </thead>
69
+ <tbody>
70
+ <tr class="bg-white <%= files.length == 0 ? '' : 'hidden' %>" id="<%= title_id %>-hiderow">
71
+ <th class="px-6 py-4 text-center" colspan="<%= branchable_result? ? '11' : '7' %>">
72
+ No Results Found Please Search Again!
73
+ </th>
74
+ </tr>
75
+ <% files.each.with_index do |source_file, index| %>
76
+ <tr class="row clickable <%= index.odd? ? 'bg-gray-50' : 'bg-white' %>" data-action="click->toggle#toggle touch->toggle#toggle" data-toggle-target="<%= id(source_file) %>">
77
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-medium text-gray-900"
78
+ title="<%= shortened_filename(source_file) %>" data-sort-val="<%= shortened_filename(source_file) %>">
79
+ <%= shortened_filename(source_file) %>
80
+ </td>
81
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 <%= coverage_class(source_file.covered_percent) %>"
82
+ data-sort-val="<%= source_file.covered_percent.round(2).to_s %>">
83
+ <%= sprintf("%.2f", source_file.covered_percent.round(2)) %>%
84
+ </td>
85
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
86
+ data-sort-val="<%= source_file.lines.count %>">
87
+ <%= format_number(source_file.lines.count) %>
88
+ </td>
89
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
90
+ data-sort-val="<%= source_file.covered_lines.count + source_file.missed_lines.count %>">
91
+ <%= format_number(source_file.covered_lines.count + source_file.missed_lines.count) %>
92
+ </td>
93
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
94
+ data-sort-val="<%= source_file.covered_lines.count %>">
95
+ <%= format_number(source_file.covered_lines.count) %>
96
+ </td>
97
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
98
+ data-sort-val="<%= source_file.missed_lines.count %>">
99
+ <%= format_number(source_file.missed_lines.count) %>
100
+ </td>
101
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
102
+ data-sort-val="<%= source_file.covered_strength %>">
103
+ <%= format_number(source_file.covered_strength.round(2)) %>
104
+ </td>
105
+ <% if branchable_result? %>
106
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 <%= coverage_class(source_file.branches_coverage_percent) %>"
107
+ data-sort-val="<%= source_file.branches_coverage_percent.round(2).to_s %>">
108
+ <%= sprintf("%.2f", source_file.branches_coverage_percent.round(2)) %>%
109
+ </td>
110
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
111
+ data-sort-val="<%= source_file.total_branches.count %>">
112
+ <%= format_number(source_file.total_branches.count) %>
113
+ </td>
114
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
115
+ data-sort-val="<%= source_file.covered_branches.count %>">
116
+ <%= format_number(source_file.covered_branches.count) %>
117
+ </td>
118
+ <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500"
119
+ data-sort-val="<%= source_file.missed_branches.count %>">
120
+ <%= format_number(source_file.missed_branches.count) %>
121
+ </td>
122
+ <% end %>
123
+ </tr>
124
+ <% end %>
125
+ </tbody>
126
+ </table>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
@@ -0,0 +1,187 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>Code Coverage for <%= SimpleCov.project_name %></title>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <link href="<%= assets_path('application.css') %>" media="screen, projection, print" rel="stylesheet" type="text/css"/>
8
+ </head>
9
+
10
+ <body data-controller="toggle">
11
+ <div class="h-screen flex overflow-hidden bg-gray-200">
12
+ <div class="hidden" data-toggle-name="mobile-menu">
13
+ <div class="fixed inset-0 flex z-40">
14
+ <div class="fixed inset-0">
15
+ <div class="absolute inset-0 bg-gray-600 opacity-75"></div>
16
+ </div>
17
+ <div class="relative flex-1 flex flex-col max-w-xs w-full bg-gray-800">
18
+ <div class="absolute top-0 right-0 -mr-14 p-1">
19
+ <button data-action="click->toggle#toggle touch->toggle#toggle" data-toggle-target="mobile-menu" class="flex items-center justify-center h-12 w-12 rounded-full focus:outline-none focus:bg-gray-600" aria-label="Close sidebar">
20
+ <svg class="h-6 w-6 text-white" stroke="currentColor" fill="none" viewBox="0 0 24 24">
21
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
22
+ </svg>
23
+ </button>
24
+ </div>
25
+ <div class="flex-1 h-0 pb-4 overflow-y-auto">
26
+ <div class="h-16 py-3 px-4 bg-gray-900">
27
+ <div class="flex flex-shrink-0 items-center text-gray-100 font-bold text-lg">
28
+ <%= SimpleCov.project_name.split('-').map(&:capitalize).join(' ') %>
29
+ </div>
30
+ <div class="flex flex-shrink-0 items-center text-gray-500 text-xs">
31
+ Code Coverage
32
+ </div>
33
+ </div>
34
+ <div class="flex-1 flex flex-col overflow-y-auto">
35
+ <nav class="mt-5 px-2 space-y-1 mobile-nav">
36
+ <a href="#" class="group flex items-center px-2 py-2 text-sm leading-5 font-medium text-white rounded-md bg-gray-900 focus:outline-none focus:bg-gray-700 transition ease-in-out duration-150" name="AllFiles" onclick="navigate(this.name)">
37
+ <svg class="mr-3 h-6 w-6 text-gray-300 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
38
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
39
+ </svg>
40
+ All Files
41
+ (<span class="<%= coverage_class(result.source_files.covered_percent) %>">
42
+ <%= result.source_files.covered_percent.round(2) %>%
43
+ </span>)
44
+ </a>
45
+ <% result.groups.each do |name, files| %>
46
+ <a href="#" class="group flex items-center px-2 py-2 text-sm leading-5 font-medium text-gray-300 rounded-md hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition ease-in-out duration-150" name="<%= remove_spaces(name) %>" onclick="navigate(this.name)">
47
+ <svg class="mr-3 h-6 w-6 text-gray-400 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
48
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
49
+ </svg>
50
+ <%= name %>
51
+ (<span class="<%= coverage_class(files.covered_percent) %>">
52
+ <%= files.covered_percent.round(2)%>%
53
+ </span>)
54
+ </a>
55
+ <% end %>
56
+ </nav>
57
+ </div>
58
+ </div>
59
+ <div class="flex-shrink-0 flex bg-gray-700 p-4">
60
+ <div class="flex-shrink-0 group block">
61
+ <div class="flex items-center">
62
+ <div class="ml-3">
63
+ <p class="text-sm leading-5 text-white">
64
+ Generated
65
+ <abbr class="timeago" datetime="<%= result.created_at %>">
66
+ <%= result.created_at %>
67
+ </abbr>
68
+ </p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ <div class="flex-shrink-0 w-14"></div>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="hidden md:flex md:flex-shrink-0">
79
+ <div class="flex flex-col w-64">
80
+ <div class="flex flex-col h-0 flex-1 bg-gray-800">
81
+ <div class="flex-1 flex flex-col pb-4 overflow-y-auto">
82
+ <div class="h-16 py-3 px-4 bg-gray-900">
83
+ <div class="flex flex-shrink-0 items-center text-gray-100 font-bold text-lg">
84
+ <%= SimpleCov.project_name.split('-').map(&:capitalize).join(' ') %>
85
+ </div>
86
+ <div class="flex flex-shrink-0 items-center text-gray-500 text-xs">
87
+ Code Coverage
88
+ </div>
89
+ </div>
90
+ <div class="flex-1 flex flex-col overflow-y-auto">
91
+ <nav class="mt-5 flex-1 px-2 bg-gray-800 space-y-1 desktop-nav">
92
+ <a href="#" class="group flex items-center px-2 py-2 text-sm leading-5 font-medium text-white rounded-md bg-gray-900 focus:outline-none focus:bg-gray-700 transition ease-in-out duration-150" name="AllFiles" onclick="navigate(this.name)">
93
+ <svg class="mr-3 h-6 w-6 text-gray-300 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
94
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
95
+ </svg>
96
+ All Files
97
+ (<span class="<%= coverage_class(result.source_files.covered_percent) %>">
98
+ <%= result.source_files.covered_percent.round(2) %>%
99
+ </span>)
100
+ </a>
101
+ <% result.groups.each do |name, files| %>
102
+ <a href="#" class="group flex items-center px-2 py-2 text-sm leading-5 font-medium text-gray-300 rounded-md hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700 transition ease-in-out duration-150" name="<%= remove_spaces(name) %>" onclick="navigate(this.name)">
103
+ <svg class="mr-3 h-6 w-6 text-gray-400 group-hover:text-gray-300 group-focus:text-gray-300 transition ease-in-out duration-150" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
104
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
105
+ </svg>
106
+ <%= name %>
107
+ (<span class="<%= coverage_class(files.covered_percent) %>">
108
+ <%= files.covered_percent.round(2)%>%
109
+ </span>)
110
+ </a>
111
+ <% end %>
112
+ </nav>
113
+ </div>
114
+ </div>
115
+ <div class="flex-shrink-0 flex bg-gray-700 p-4">
116
+ <div class="flex-shrink-0 w-full group block">
117
+ <div class="flex items-center">
118
+ <div class="ml-3">
119
+ <p class="text-sm leading-5 text-white">
120
+ Generated
121
+ <abbr class="timeago" datetime="<%= result.created_at %>">
122
+ <%= result.created_at %>
123
+ </abbr>
124
+ </p>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ <div class="flex flex-col w-0 flex-1 overflow-hidden">
133
+ <div class="relative z-10 flex-shrink-0 flex h-16 bg-white shadow">
134
+ <button data-action="click->toggle#toggle touch->toggle#toggle" data-toggle-target="mobile-menu" class="px-4 border-r border-gray-200 text-gray-500 focus:outline-none focus:bg-gray-100 focus:text-gray-600 md:hidden" aria-label="Open sidebar">
135
+ <svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
136
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7" />
137
+ </svg>
138
+ </button>
139
+ <div class="flex-1 px-4 flex justify-between">
140
+ <div class="flex-1 flex">
141
+ <form class="w-full flex md:ml-0" action="#" method="GET">
142
+ <label for="search_field" class="sr-only">Search</label>
143
+ <div class="relative w-full text-gray-400 focus-within:text-gray-600">
144
+ <div class="absolute inset-y-0 left-0 flex items-center pointer-events-none">
145
+ <svg class="h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
146
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z" />
147
+ </svg>
148
+ </div>
149
+ <input id="search_field" class="block w-full h-full pl-8 pr-3 py-2 rounded-md text-gray-900 placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 sm:text-sm" placeholder="Search" type="search" onkeyup="searchTable(this.value.toUpperCase())" onsearch="searchTable(this.value.toUpperCase())"/>
150
+ </div>
151
+ </form>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ <main class="flex-1 relative z-0 overflow-y-auto focus:outline-none" tabindex="0">
156
+ <%= generate_group_page("All Files", result.source_files) %>
157
+
158
+ <% result.groups.each do |name, files| %>
159
+ <%= generate_group_page(name, files) %>
160
+ <% end %>
161
+ </main>
162
+ <footer class="bg-gray-800">
163
+ <div class="max-w-screen-xl mx-auto py-4 px-4 sm:px-6 md:flex md:items-center md:justify-between lg:px-8">
164
+ <div class="flex justify-center space-x-6"></div>
165
+ <div class="mt-0">
166
+ <p class="text-center text-base leading-6 text-gray-400">
167
+ Generated by
168
+ <a href="https://github.com/colszowka/simplecov" class="no-underline hover:underline text-blue-500" target="_blank">Simplecov</a>
169
+ v<%= SimpleCov::VERSION %>
170
+ and
171
+ <a href="https://github.com/chiefpansancolt/simplecov-tailwindcss" class="no-underline hover:underline text-blue-500" target="_blank">Simplecov Tailwind</a>
172
+ v<%= SimpleCov::Formatter::TailwindFormatter::VERSION %>
173
+ using <%= result.command_name %>
174
+ </p>
175
+ </div>
176
+ </div>
177
+ </footer>
178
+ </div>
179
+ </div>
180
+
181
+ <% result.source_files.each do |source_file| %>
182
+ <%= generate_dialog(source_file) %>
183
+ <% end %>
184
+
185
+ <script src="<%= assets_path('application.js') %>" type="text/javascript"></script>
186
+ </body>
187
+ </html>