simplecov-html 0.5.0 → 0.5.3

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.
data/assets/app.js CHANGED
@@ -59,7 +59,7 @@ $(document).ready(function() {
59
59
  // Make sure tabs don't get ugly focus borders when active
60
60
  $('.group_tabs a').live('focus', function() { $(this).blur(); });
61
61
 
62
- var favicon_path = $('link[rel="shortcut icon"]').attr('href')
62
+ var favicon_path = $('link[rel="shortcut icon"]').attr('href');
63
63
  $('.group_tabs a').live('click', function(){
64
64
  if (!$(this).parent().hasClass('active')) {
65
65
  $('.group_tabs a').parent().removeClass('active');
@@ -69,7 +69,7 @@ $(document).ready(function() {
69
69
  window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_');
70
70
 
71
71
  // Force favicon reload - otherwise the location change containing anchor would drop the favicon...
72
- // Works only on firefox, but still... - Anyone know a better solution to force favicon?
72
+ // Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
73
73
  $('link[rel="shortcut icon"]').remove();
74
74
  $('head').append('<link rel="shortcut icon" type="image/png" href="'+ favicon_path +'" />');
75
75
  };
Binary file
Binary file
Binary file
@@ -344,382 +344,29 @@ td.strong {
344
344
  .yellow {
345
345
  color: #da0;
346
346
  }
347
- .source_table .hit {
347
+ .source_table .covered {
348
348
  border-color: #090;
349
349
  }
350
- .source_table .miss {
350
+ .source_table .missed {
351
351
  border-color: #900;
352
352
  }
353
353
  .source_table .never {
354
354
  border-color: black;
355
355
  }
356
-
357
- /* -----------------------------------------------------------------------
358
-
359
-
360
- Blueprint CSS Framework 0.9
361
- http://blueprintcss.org
362
-
363
- * Copyright (c) 2007-Present. See LICENSE for more info.
364
- * See README for instructions on how to use Blueprint.
365
- * For credits and origins, see AUTHORS.
366
- * This is a compressed file. See the sources in the 'src' directory.
367
-
368
- ----------------------------------------------------------------------- */
369
-
370
- /* reset.css */
371
- html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
372
- article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;}
373
- body {line-height:1.5;}
374
- table {border-collapse:separate;border-spacing:0;}
375
- caption, th, td {text-align:left;font-weight:normal;}
376
- table, td, th {vertical-align:middle;}
377
- blockquote:before, blockquote:after, q:before, q:after {content:"";}
378
- blockquote, q {quotes:"" "";}
379
- a img {border:none;}
380
-
381
- /* typography.css */
382
- html {font-size:100.01%;}
383
- body {font-size:82%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
384
- h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
385
- h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
386
- h2 {font-size:2em;margin-bottom:0.75em;}
387
- h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
388
- h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
389
- h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
390
- h6 {font-size:1em;font-weight:bold;}
391
- h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
392
- p {margin:0 0 1.5em;}
393
- p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
394
- p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
395
- a:focus, a:hover {color:#000;}
396
- a {color:#009;text-decoration:underline;}
397
- blockquote {margin:1.5em;color:#666;font-style:italic;}
398
- strong {font-weight:bold;}
399
- em, dfn {font-style:italic;}
400
- dfn {font-weight:bold;}
401
- sup, sub {line-height:0;}
402
- abbr, acronym {border-bottom:1px dotted #666;}
403
- address {margin:0 0 1.5em;font-style:italic;}
404
- del {color:#666;}
405
- pre {margin:1.5em 0;white-space:pre;}
406
- pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
407
- li ul, li ol {margin:0;}
408
- ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;}
409
- ul {list-style-type:disc;}
410
- ol {list-style-type:decimal;}
411
- dl {margin:0 0 1.5em 0;}
412
- dl dt {font-weight:bold;}
413
- dd {margin-left:1.5em;}
414
- table {margin-bottom:1.4em;width:100%;}
415
- th {font-weight:bold;}
416
- thead th {background:#c3d9ff;}
417
- th, td, caption {padding:4px 10px 4px 5px;}
418
- tr.even td {background:#efefef;}
419
- tfoot {font-style:italic;}
420
- caption {background:#eee;}
421
- .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
422
- .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
423
- .hide {display:none;}
424
- .quiet {color:#666;}
425
- .loud {color:#000;}
426
- .highlight {background:#ff0;}
427
- .added {background:#060;color:#fff;}
428
- .removed {background:#900;color:#fff;}
429
- .first {margin-left:0;padding-left:0;}
430
- .last {margin-right:0;padding-right:0;}
431
- .top {margin-top:0;padding-top:0;}
432
- .bottom {margin-bottom:0;padding-bottom:0;}
433
-
434
- /* forms.css */
435
- label {font-weight:bold;}
436
- fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
437
- legend {font-weight:bold;font-size:1.2em;}
438
- input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
439
- input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
440
- input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;}
441
- input.text, input.title {width:300px;padding:5px;}
442
- input.title {font-size:1.5em;}
443
- textarea {width:390px;height:250px;padding:5px;}
444
- input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
445
- form.inline {line-height:3;}
446
- form.inline p {margin-bottom:0;}
447
- .error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
448
- .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
449
- .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
450
- .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
451
- .error a {color:#8a1f11;}
452
- .notice a {color:#514721;}
453
- .success a {color:#264409;}
454
- .box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
455
- hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
456
- hr.space {background:#fff;color:#fff;visibility:hidden;}
457
- .clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
458
- .clearfix, .container {display:block;}
459
- .clear {clear:both;}
460
-
461
- #loading {
462
- position: fixed;
463
- left: 40%;
464
- top: 50%;
356
+ .source_table .skipped {
357
+ border-color: #fc0;
465
358
  }
466
359
 
467
- a {
468
- color: #333;
469
- text-decoration: none;
470
- }
471
-
472
- a:hover {
473
- color: #000;
474
- text-decoration: underline;
475
- }
476
-
477
- body {
478
- font-family: "Lucida Grande", Helvetica, "Helvetica Neue", Arial, sans-serif;
479
- padding: 12px;
480
- background-color: #333;
481
- }
482
-
483
- h1, h2, h3, h4 {
484
- color: #1C2324;
485
- margin: 0;
486
- padding: 0;
487
- margin-bottom: 12px;
488
- }
489
-
490
- table {
491
- width: 100%;
492
- }
493
-
494
- #content {
495
- clear: left;
496
- background-color: white;
497
- border: 2px solid #ddd;
498
- border-top: 8px solid #ddd;
499
- padding: 18px;
500
- -webkit-border-bottom-left-radius: 5px;
501
- -webkit-border-bottom-right-radius: 5px;
502
- -webkit-border-top-right-radius: 5px;
503
- -moz-border-radius-bottomleft: 5px;
504
- -moz-border-radius-bottomright: 5px;
505
- -moz-border-radius-topright: 5px;
506
- border-bottom-left-radius: 5px;
507
- border-bottom-right-radius: 5px;
508
- border-top-right-radius: 5px;
509
- }
510
-
511
- .dataTables_filter, .dataTables_info {
512
- padding: 2px 6px;
513
- }
514
-
515
- abbr.timeago {
516
- text-decoration: none;
517
- border: none;
518
- font-weight: bold;
519
- }
520
-
521
- .timestamp {
522
- float: right;
523
- color: #ddd;
524
- }
525
-
526
- .group_tabs {
527
- list-style: none;
528
- float: left;
529
- margin: 0;
530
- padding: 0;
531
- }
532
- .group_tabs li {
533
- display: inline;
534
- float: left;
535
- }
536
-
537
- .group_tabs li a {
538
- font-family: Helvetica, Arial, sans-serif;
539
- display: block;
540
- float: left;
541
- text-decoration: none;
542
- padding: 4px 8px;
543
- background-color: #aaa;
544
- background: -webkit-gradient(linear, 0 0, 0 bottom, from(#DDD), to(#aaa));
545
- background: -moz-linear-gradient(#DDD, #aaa);
546
- background: linear-gradient(#DDD, #aaa);
547
- text-shadow: #e5e5e5 1px 1px 0px;
548
- border-bottom: none;
549
- color: #333;
550
- font-weight: bold;
551
- margin-right: 8px;
552
- border-top: 1px solid #efefef;
553
- -webkit-border-top-left-radius: 2px;
554
- -webkit-border-top-right-radius: 2px;
555
- -moz-border-radius-topleft: 2px;
556
- -moz-border-radius-topright: 2px;
557
- border-top-left-radius: 2px;
558
- border-top-right-radius: 2px;
559
- }
560
-
561
- .group_tabs li a:hover {
562
- background-color: #ccc;
563
- background: -webkit-gradient(linear, 0 0, 0 bottom, from(#eee), to(#aaa));
564
- background: -moz-linear-gradient(#eee, #aaa);
565
- background: linear-gradient(#eee, #aaa);
566
- }
567
-
568
- .group_tabs li a:active {
569
- padding-top: 5px;
570
- padding-bottom: 3px;
571
- }
572
-
573
- .group_tabs li.active a {
574
- color: black;
575
- text-shadow: #fff 1px 1px 0px;
576
- background-color: #ddd;
577
- background: -webkit-gradient(linear, 0 0, 0 bottom, from(#fff), to(#ddd));
578
- background: -moz-linear-gradient(#fff, #ddd);
579
- background: linear-gradient(#fff, #ddd);
580
- }
581
-
582
- .file_list {
583
- margin-bottom: 18px;
584
- }
585
-
586
- a.src_link {
587
- background: url('./magnify.png') no-repeat left 50%;
588
- padding-left: 18px;
589
- }
590
-
591
- tr, td {
592
- margin: 0;
593
- padding: 0;
594
- }
595
-
596
- th {
597
- white-space: nowrap;
598
- }
599
-
600
- th.ui-state-default {
601
- cursor: pointer;
602
- }
603
-
604
- th span.ui-icon {
605
- float: left;
606
- }
607
-
608
- td {
609
- padding: 4px 8px;
610
- }
611
-
612
- td.strong {
613
- font-weight: bold;
614
- }
615
-
616
- .source_table h3, .source_table h4 {
617
- padding: 0;
618
- margin: 0;
619
- margin-bottom: 4px;
620
- }
621
-
622
- .source_table .header {
623
- padding: 10px;
624
- }
625
-
626
- .source_table pre {
627
- margin: 0;
628
- padding: 0;
629
- white-space: normal;
630
- }
631
-
632
- .source_table pre, .source_table code {
633
- color: #000;
634
- font-family: "Monaco", "Inconsolata", "Consolas", monospace;
635
- }
636
-
637
- .source_table pre {
638
- background-color: #333;
639
- }
640
-
641
- .source_table pre ol {
642
- margin: 0px;
643
- padding: 0px;
644
- margin-left: 45px;
645
- font-size: 12px;
646
- color: white;
647
- }
648
-
649
- .source_table pre li {
650
- margin: 0px;
651
- padding: 2px 6px;
652
- border-left: 5px solid white;
653
- }
654
-
655
- .source_table pre li code {
656
- white-space: pre;
657
- white-space: pre-wrap;
658
- }
659
-
660
- .source_table pre .hits {
661
- float: right;
662
- margin-left: 10px;
663
- padding: 2px 4px;
664
-
665
- background-color: #444;
666
- background: -webkit-gradient(linear, 0 0, 0 bottom, from(#222), to(#666));
667
- background: -moz-linear-gradient(#222, #666);
668
- background: linear-gradient(#222, #666);
669
-
670
- color: white;
671
- font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
672
- font-size: 10px;
673
- font-weight: bold;
674
- text-align: center;
675
- border-radius: 6px;
676
- }
677
-
678
- #footer {
679
- color: #ddd;
680
- font-size: 12px;
681
- font-weight: bold;
682
- margin-top: 12px;
683
- text-align: right;
684
- }
685
- #footer a {
686
- color: #eee;
687
- text-decoration: underline;
688
- }
689
- #footer a:hover {
690
- color: #fff;
691
- text-decoration: none;
692
- }
693
-
694
- .green {
695
- color: #090;
696
- }
697
- .red {
698
- color: #900;
699
- }
700
- .yellow {
701
- color: #da0;
702
- }
703
- .source_table .hit {
704
- border-color: #090;
705
- }
706
- .source_table .miss {
707
- border-color: #900;
708
- }
709
- .source_table .never {
710
- border-color: black;
711
- }
712
-
713
- .source_table .hit:nth-child(odd) {
360
+ .source_table .covered:nth-child(odd) {
714
361
  background-color: #CDF2CD;
715
362
  }
716
- .source_table .hit:nth-child(even) {
363
+ .source_table .covered:nth-child(even) {
717
364
  background-color: #DBF2DB;
718
365
  }
719
- .source_table .miss:nth-child(odd) {
366
+ .source_table .missed:nth-child(odd) {
720
367
  background-color: #F7C0C0;
721
368
  }
722
- .source_table .miss:nth-child(even) {
369
+ .source_table .missed:nth-child(even) {
723
370
  background-color: #F7CFCF;
724
371
  }
725
372
  .source_table .never:nth-child(odd) {
@@ -727,4 +374,10 @@ td.strong {
727
374
  }
728
375
  .source_table .never:nth-child(even) {
729
376
  background-color: #f4f4f4;
377
+ }
378
+ .source_table .skipped:nth-child(odd) {
379
+ background-color: #FBF0C0;
380
+ }
381
+ .source_table .skipped:nth-child(even) {
382
+ background-color: #FBFfCf;
730
383
  }
@@ -5,7 +5,7 @@ require 'digest/sha1'
5
5
  require 'time'
6
6
 
7
7
  # Ensure we are using a compatible version of SimpleCov
8
- if Gem::Version.new(SimpleCov::VERSION) < Gem::Version.new("0.5")
8
+ if Gem::Version.new(SimpleCov::VERSION) < Gem::Version.new("0.5.3")
9
9
  raise RuntimeError, "The version of SimpleCov you are using is too old. Please update with 'gem install simplecov'"
10
10
  end
11
11
 
@@ -1,7 +1,7 @@
1
1
  module SimpleCov
2
2
  module Formatter
3
3
  class HTMLFormatter
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.3"
5
5
  end
6
6
  end
7
7
  end
data/views/layout.erb CHANGED
@@ -14,7 +14,7 @@
14
14
  <link href='<%= assets_path('highlight.css') %>' media='screen, projection, print' rel='stylesheet' type='text/css'>
15
15
  <link href='<%= assets_path('fancybox/jquery.fancybox-1.3.1.css') %>' media='screen, projection, print' rel='stylesheet' type='text/css'>
16
16
  <link href='<%= assets_path('smoothness/jquery-ui-1.8.4.custom.css') %>' media='screen, projection, print' rel='stylesheet' type='text/css'>
17
- <link rel="shortcut icon" type="image/png" href="<%= assets_path('favicon.png') %>" />
17
+ <link rel="shortcut icon" type="image/png" href="<%= assets_path("favicon_#{coverage_css_class(result.source_files.covered_percent)}.png") %>" />
18
18
  <link rel="icon" type="image/png" href="<%= assets_path('favicon.png') %>" />
19
19
  </head>
20
20
 
@@ -12,9 +12,9 @@
12
12
  <pre>
13
13
  <ol>
14
14
  <% source_file.lines.each_with_index do |line| %>
15
- <% classname = line.coverage ? (line.coverage > 0 ? 'hit' : 'miss') : 'never' %>
16
- <li class="<%= classname %>" data-hits="<%= line.coverage ? line.coverage : '' %>" data-linenumber="<%= line.number %>">
15
+ <li class="<%= line.status %>" data-hits="<%= line.coverage ? line.coverage : '' %>" data-linenumber="<%= line.number %>">
17
16
  <% if line.covered? %><span class="hits"><%= line.coverage %></span><% end %>
17
+ <% if line.skipped? %><span class="hits">skipped</span><% end %>
18
18
  <code class="ruby"><%= CGI.escapeHTML(line.src.chomp) %></code>
19
19
  </li>
20
20
  <% end %>
metadata CHANGED
@@ -1,39 +1,35 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: simplecov-html
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.3
4
5
  prerelease:
5
- version: 0.5.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Christoph Olszowka
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-09-09 00:00:00 +02:00
12
+ date: 2011-09-13 00:00:00.000000000 +02:00
14
13
  default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
17
16
  name: rake
18
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70216563315440 !ruby/object:Gem::Requirement
19
18
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
24
23
  type: :development
25
24
  prerelease: false
26
- version_requirements: *id001
25
+ version_requirements: *70216563315440
27
26
  description: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
28
- email:
27
+ email:
29
28
  - christoph at olszowka de
30
29
  executables: []
31
-
32
30
  extensions: []
33
-
34
31
  extra_rdoc_files: []
35
-
36
- files:
32
+ files:
37
33
  - .document
38
34
  - .gitignore
39
35
  - Gemfile
@@ -63,7 +59,9 @@ files:
63
59
  - assets/fancybox/fancybox.png
64
60
  - assets/fancybox/jquery.fancybox-1.3.1.css
65
61
  - assets/fancybox/jquery.fancybox-1.3.1.pack.js
66
- - assets/favicon.png
62
+ - assets/favicon_green.png
63
+ - assets/favicon_red.png
64
+ - assets/favicon_yellow.png
67
65
  - assets/highlight.css
68
66
  - assets/highlight.pack.js
69
67
  - assets/jquery-1.6.2.min.js
@@ -98,37 +96,28 @@ files:
98
96
  has_rdoc: true
99
97
  homepage: https://github.com/colszowka/simplecov-html
100
98
  licenses: []
101
-
102
99
  post_install_message:
103
100
  rdoc_options: []
104
-
105
- require_paths:
101
+ require_paths:
106
102
  - lib
107
- required_ruby_version: !ruby/object:Gem::Requirement
103
+ required_ruby_version: !ruby/object:Gem::Requirement
108
104
  none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- hash: 2641290894485359765
113
- segments:
114
- - 0
115
- version: "0"
116
- required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ! '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
110
  none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- hash: 2641290894485359765
122
- segments:
123
- - 0
124
- version: "0"
111
+ requirements:
112
+ - - ! '>='
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
125
115
  requirements: []
126
-
127
116
  rubyforge_project: simplecov-html
128
- rubygems_version: 1.6.1
117
+ rubygems_version: 1.6.2
129
118
  signing_key:
130
119
  specification_version: 3
131
120
  summary: Default HTML formatter for SimpleCov code coverage tool for ruby 1.9+
132
- test_files:
121
+ test_files:
133
122
  - test/helper.rb
134
123
  - test/test_simple_cov-html.rb
data/assets/favicon.png DELETED
Binary file