coco 0.7.1 → 0.8

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: f4847ff78acaa2ce2a70782c03f6342cfede232c
4
- data.tar.gz: 863abb4beb5bd5a2907188569665376ddbd4f75c
3
+ metadata.gz: 3e417f05d79b2e611dceda9c526600d5a327e440
4
+ data.tar.gz: a78c5a379014dd5e2b6aee98eda621f9377dbf18
5
5
  SHA512:
6
- metadata.gz: d5c4948cef5ed25267d818689f0ee6192775f5222fde27fcd0386e1035f672bcbb7ac60393536fbeb6d0f397b35b076a0a0b1de8a27866cc221b25004b276135
7
- data.tar.gz: b041d09237e6177502d9336230a55369848be9387ba50a00dbf92e99575679926f937df2fdd320d39306611966dd26de1b6b8e415848179564298402c1888819
6
+ metadata.gz: df9305b624eb92c01202cafece504f88db6823e1748e7b279330c0600ea2bd7290bdaf165472c426415f4c235d492e46ce04403a8169ba98d0326270599c0537
7
+ data.tar.gz: 7ebd0be73e14fb5bc5be32fca2478e031aa888b2e5355436010fc48025b105ad81c18f813dc92b57204c7ec7793f969ca8a201f656a63d3f6fb46313fdc76e29
@@ -1,3 +1,13 @@
1
+ v0.8 (2013-12-21)
2
+ =================================================
3
+
4
+ * Html report
5
+ - Improve appearance of index page.
6
+ - Emphasize filenames in index page.
7
+ - No longer needs css files fro Yahoo.
8
+ * Bugfix: Html files now have a doctype.
9
+
10
+
1
11
  v0.7.1 (2013-07-05)
2
12
  =================================================
3
13
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coco (0.7.1)
4
+ coco (0.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -66,10 +66,6 @@ By default, threshold is set to 100 and directories is set to 'lib'.
66
66
 
67
67
  To change the default coco configuration, put a `.coco.yml` file at the root of your project.
68
68
 
69
- _Earlier versions of coco used to use `.coco` instead of `.coco.yml`, as of
70
- version 0.7, using `.coco` is deprecated. Reason is `.yml` extension allow
71
- for syntax highlighting._
72
-
73
69
 
74
70
  ###Sample config for a Rails project
75
71
 
data/TODO CHANGED
@@ -1,10 +1,9 @@
1
- release
2
-
3
- site
1
+ en gras: def, class, module
4
2
 
5
3
  exclure spec et test par défaut
6
4
 
7
5
  le wiki dit que seul le dossier lib est inspecté par défaut, je pense
8
6
  que c'est en fait toute l'application.
9
7
 
10
- Virer les css de yahoo
8
+ option verbose
9
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.8
@@ -5,10 +5,9 @@ require 'erb'
5
5
  module Coco
6
6
 
7
7
  # I format the index.html
8
- # @todo document
9
8
  class HtmlIndexFormatter < Formatter
10
9
 
11
- def initialize raw_coverages, uncovered
10
+ def initialize(raw_coverages, uncovered)
12
11
  super(raw_coverages, uncovered)
13
12
  @context = nil
14
13
  @template = Template.open File.join($COCO_PATH,'template/index.erb')
@@ -17,7 +16,8 @@ module Coco
17
16
  end
18
17
 
19
18
  def format
20
- @context = IndexContext.new Helpers.index_title, @lines, @uncovered
19
+ @context = IndexContext.new(Helpers.index_title, @lines,
20
+ @uncovered.map{|e| emphasize(e)})
21
21
  @template.result(@context.get_binding)
22
22
  end
23
23
 
@@ -27,11 +27,17 @@ module Coco
27
27
  @raw_coverages.each do |filename, coverage|
28
28
  filename = File.expand_path(filename)
29
29
  percentage = CoverageStat.coverage_percent(coverage)
30
- @lines << [percentage, filename, Helpers.rb2html(filename)]
30
+ on_disk_filename = Helpers.rb2html(filename)
31
+ @lines << [percentage, emphasize(filename), on_disk_filename]
31
32
  end
32
33
  @lines.sort!
33
34
  end
34
35
 
36
+ def emphasize(filename)
37
+ base = File.basename filename
38
+ filename.sub(base, "<b>#{base}</b>")
39
+ end
40
+
35
41
  end
36
42
 
37
43
  end
@@ -1,17 +1,32 @@
1
1
  @charset "UTF-8";
2
- @import url("reset-min.css");
3
- @import url("base-min.css");
4
- @import url("font-min.css")
2
+
3
+ table.source {
4
+ border-collapse:collapse;
5
+ border-spacing: 0;
6
+ }
7
+
8
+ table.index tr {
9
+ height: 1.8em;
10
+ }
11
+
12
+ table.index td {
13
+ padding-left: 0.5em;
14
+ }
5
15
 
6
16
  html {
7
17
  background-color: #fff;
8
18
  color: #222;
9
19
  }
10
20
 
21
+ body {
22
+ margin: 0;
23
+ }
24
+
11
25
  h2 {
12
26
  padding: 10px;
13
27
  background-color: #7658F8;
14
28
  color: #fff;
29
+ font-size: 1.1em;
15
30
  }
16
31
 
17
32
  a {
@@ -19,6 +34,10 @@ a {
19
34
  text-decoration: none;
20
35
  }
21
36
 
37
+ p {
38
+ margin: 1em;
39
+ }
40
+
22
41
  p.menu a {
23
42
  font-weight: bold;
24
43
  }
@@ -1,3 +1,4 @@
1
+ <!DOCTYPE html>
1
2
  <html>
2
3
  <head>
3
4
  <meta charset='utf-8'>
@@ -1,3 +1,4 @@
1
+ <!DOCTYPE html>
1
2
  <html>
2
3
  <head>
3
4
  <meta charset='utf-8'>
@@ -15,7 +16,7 @@
15
16
  <p class="date">
16
17
  <%= "#{Time.now}" %>
17
18
  </p>
18
- <table>
19
+ <table class="index">
19
20
 
20
21
  <% @uncovered.each do |filename| %>
21
22
  <%= "<tr><td class=\"black\">0%</td><td>#{filename}</td></tr>\n" %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: '0.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xavier Nayrac
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-05 00:00:00.000000000 Z
11
+ date: 2013-12-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  "Code coverage tool for ruby 1.9.2 to 2.0.
@@ -44,11 +44,7 @@ files:
44
44
  - lib/coco/writer/html_directory.rb
45
45
  - lib/coco/writer/html_files_writer.rb
46
46
  - lib/coco/writer/html_index_writer.rb
47
- - template/css/LICENCE
48
- - template/css/base-min.css
49
47
  - template/css/coco.css
50
- - template/css/fonts-min.css
51
- - template/css/reset-min.css
52
48
  - template/file.erb
53
49
  - template/img/coconut16.png
54
50
  - template/img/licenses
@@ -81,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
77
  version: '0'
82
78
  requirements: []
83
79
  rubyforge_project:
84
- rubygems_version: 2.0.3
80
+ rubygems_version: 2.1.11
85
81
  signing_key:
86
82
  specification_version: 4
87
83
  summary: Code coverage tool for ruby 1.9.2 to 2.0
88
84
  test_files: []
89
- has_rdoc:
@@ -1,5 +0,0 @@
1
- base-min.css, fonts-min.css and reset-min.css: BSD licence.
2
- Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
- Code licensed under the BSD License:
4
- http://developer.yahoo.com/yui/license.html
5
- version: 2.8.2r1
@@ -1 +0,0 @@
1
- body{margin:10px;}h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong,dt{font-weight:bold;}optgroup{font-weight:normal;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;}em{font-style:italic;}del{text-decoration:line-through;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style:decimal outside;}ul li{list-style:disc outside;}dl dd{margin-left:1em;}th,td{border:1px solid #000;padding:.5em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}sup{vertical-align:super;}sub{vertical-align:sub;}p,fieldset,table,pre{margin-bottom:1em;}button,input[type="checkbox"],input[type="radio"],input[type="reset"],input[type="submit"]{padding:1px;}
@@ -1 +0,0 @@
1
- body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
@@ -1 +0,0 @@
1
- html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}