simplecov-badge 2.0.0 → 2.0.1

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: 63cbd31bade8e277a79de7ad257d991c45e70a0e
4
- data.tar.gz: 84d6f952d41b24981183d12780f4844c2e703e25
3
+ metadata.gz: 7b59e25437e2ce53cdde02b7c0db9b374eb91ce6
4
+ data.tar.gz: 7c35bbaad3c62c7154a0bde566fc241df5926afa
5
5
  SHA512:
6
- metadata.gz: 63466a277761c6316e75c1b7ab7a7cb69c91c7d236b233a50ba9ddaaeaf8c9464baf87c32057af5339198ec685675286c4b5566b795dd403f1ec6f3ed0b82866
7
- data.tar.gz: f6434a9dc4d48d036ab6a89405590666d81408b16287d21da8124578e11bf9d80b8249afa45ab09b39a9f93f06508d3ed2b0b71195bd697426ff80245dd8b7a5
6
+ metadata.gz: 7df8923f8ad5348448c8842833b6bc13aabefd81a14ce02c932e726ab458b8d642bcca01faeaf3c3115a47466ad862e268bf619c464d509fe75c6177987b8332
7
+ data.tar.gz: fc000c274830993751c7227e0b8506b73d1f77e44aa9d37b36e5746658aee65ab5ce2568a9624459d0898b84ccbaaa58942988f4f42d6e29db61cdd10dfd1d8f
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Badge formatter for SimpleCov
2
2
  [ ![Codeship Status for matthew342/simplecov-badge](https://www.codeship.io/projects/c46ee0e0-9da1-0130-7a9e-0e0ae47480c0/status?branch=master)](https://www.codeship.io/projects/3367)
3
- [ ![Code Coverage for matthew342/simplecov-badge](http://matthew342.github.io/simplecov-badge/coverage/coverage-badge.png)](http://matthew342.github.io/simplecov-badge/coverage/index.html)
3
+ [ ![Code Coverage for matthew342/simplecov-badge](https://raw.github.com/matthew342/simplecov-badge/gh-pages/coverage/coverage-badge.png)](http://matthew342.github.io/simplecov-badge/coverage/index.html)
4
4
 
5
- Generates coverage badges from SimpleCov using ImageMagick. Great for small private repos that don't want to pay for a [hosted service](https://coveralls.io/).
5
+ Generates coverage badges from SimpleCov using ImageMagick. Great for small private repos that don't want to pay for a [hosted service](https://coveralls.io/). Add the badge to your readme, linked to your coverage report for improved test coverage visibility.
6
6
 
7
7
  ***Note: To learn more about SimpleCov, check out the main repo at https://github.com/colszowka/simplecov***
8
8
 
@@ -16,6 +16,8 @@ The left side of the badge shows and is color-coded for the percentage of lines
16
16
  ![Code Coverage for matthew342/simplecov-badge](http://matthew342.github.io/simplecov-badge/coverage-badge-example.png)
17
17
 
18
18
  ## Installation
19
+ Install [ImageMagick](http://www.imagemagick.org/), then:
20
+
19
21
  # In your gemfile
20
22
  gem 'simplecov-badge', :require => false
21
23
 
@@ -70,7 +72,7 @@ Set these in your SimpleCov.start block - see Usage section.
70
72
  <td>Description</td>
71
73
  <td>Default</td>
72
74
  </tr>
73
- <tr><td>strength_indicator_title</td><td>Title for right portion of badge, which can be colored according to coverage strength (i.e. >1 hits/line = green, == 1 hits/line = yellow, <1 hits/line = red)</td><td> 'TEST COVERAGE'</td></tr>
75
+ <tr><td>badge_title</td><td>Center section of badge</td><td> 'TEST COVERAGE'</td></tr>
74
76
  <tr><td>generate_groups </td><td>Whether to generate sub-badges for each group under the main badge</td><td>true</td></tr>
75
77
  <tr><td>timestamp </td><td>Stick a timestamp on the bottom of the badge</td><td> false</td></tr>
76
78
  <tr><td>green </td><td>The specific color to be used for 'green'</td><td> '#4fb151'</td></tr>
@@ -80,16 +82,16 @@ Set these in your SimpleCov.start block - see Usage section.
80
82
  <tr><td>number_font_size </td><td>Size of font to use for the coverage percentage (for the main badge)</td><td> 20</td></tr>
81
83
  <tr><td>name_font </td><td>The font to use for the name portion of the badge (of the main badge)</td><td> 'Helvetica'</td></tr>
82
84
  <tr><td>name_font_size </td><td>Size of font to use for the name portion (of the main badge)</td><td> 17</td></tr>
83
- <tr><td>badge_height </td><td>Height of the badge</td><td> 25</td></tr>
84
- <tr><td>use_strength_color </td><td>Whether to color-code the name portion of the badge according to the coverage strength (NOT the covered percentage)</td><td> true</td></tr>
85
- <tr><td>strength_foreground </td><td>Whether to color the foreground instead of the background when coloring the name portion of the badge according to the coverage strength</td><td> false</td></tr>
85
+ <tr><td>badge_height </td><td>Height of the badge</td><td> 27</td></tr>
86
+ <tr><td>strength_foreground </td><td>Whether to color the foreground instead of the background when coloring the strength portion of the badge</td><td> false</td></tr>
87
+ <tr><td>color_code_title</td><td>Whether to color the middle section of the badge. If true, will be colored according to the lowest color of the coverage and strength sections </td><td>true</td></tr>
86
88
  <tr><td>group_number_font </td><td>Same as above, but for group sub-badges</td><td> 'Helvetica-Narrow-Bold'</td></tr>
87
- <tr><td>group_number_font_size </td><td>Same as above, but for group sub-badges</td><td> 20</td></tr>
89
+ <tr><td>group_number_font_size </td><td>Same as above, but for group sub-badges</td><td> 18</td></tr>
88
90
  <tr><td>group_name_font </td><td>Same as above, but for group sub-badges</td><td> 'Helvetica-Bold'</td></tr>
89
- <tr><td>group_name_font_size </td><td>Same as above, but for group sub-badges</td><td> 17</td></tr>
90
- <tr><td>group_badge_height </td><td>Same as above, but for group sub-badges</td><td> 25</td></tr>
91
- <tr><td>use_strength_color_for_group_name </td><td>Same as above, but for group sub-badges</td><td> true</td></tr>
92
- <tr><td>group_strength_foreground </td><td>Same as above, but for group sub-badges</td><td> true</td></tr>
91
+ <tr><td>group_name_font_size </td><td>Same as above, but for group sub-badges</td><td> 15</td></tr>
92
+ <tr><td>group_badge_height </td><td>Same as above, but for group sub-badges</td><td> 22</td></tr>
93
+ <tr><td>group_strength_foreground </td><td>Same as above, but for group sub-badges</td><td>false</td></tr>
94
+ <tr><td>group_color_code_title</td><td>Same as above, but for group sub-badges</td><td> true</td></tr>
93
95
  </table>
94
96
 
95
97
  #### Note on Patches/Pull Requests
@@ -11,9 +11,9 @@ class SimpleCov::Formatter::BadgeFormatter
11
11
  :yellow => '#ded443', :red => '#a23e3f', :number_font => 'Helvetica-Narrow-Bold',
12
12
  :number_font_size => 20, :name_font => 'Helvetica', :name_font_size => 17,
13
13
  :badge_height => 27, :strength_foreground => false,
14
- :group_number_font => 'Helvetica-Narrow-Bold', :group_number_font_size => 20,
15
- :group_name_font => 'Helvetica-Bold', :group_name_font_size => 17,
16
- :group_badge_height => 27, :group_strength_foreground => true, :color_code_title => true,
14
+ :group_number_font => 'Helvetica-Narrow-Bold', :group_number_font_size => 18,
15
+ :group_name_font => 'Helvetica-Bold', :group_name_font_size => 15,
16
+ :group_badge_height => 22, :group_strength_foreground => false, :color_code_title => true,
17
17
  :group_color_code_title => true}
18
18
 
19
19
  # set up class variables and getters/setters
@@ -71,7 +71,7 @@ class SimpleCov::Formatter::BadgeFormatter
71
71
  command[1] = """
72
72
  convert #{output_path}/tmp.png \\( -size 260x#{get_config('badge_height', group)} xc:\"#{title_background(cov, strength, get_config('strength_foreground', group), get_config('color_code_title', group))}\" \
73
73
  -pointsize #{get_config('name_font_size', group)} -fill \"#{title_foreground(cov, strength, get_config('strength_foreground', group), get_config('color_code_title', group))}\" -font \"#{get_config('name_font', group)}\" \
74
- -draw \"kerning 1 text 4,19 '#{group ? group.upcase : @@badge_title}'\" \
74
+ -draw \"kerning 1 text #{group ? 2 : 4},#{group ? 16 : 19} '#{group ? group.upcase : @@badge_title}'\" \
75
75
  -gravity West -background white -splice 1x0 \
76
76
  -background black -splice 1x0 -trim +repage \
77
77
  -gravity West -chop 1x0 -gravity East \
@@ -1,7 +1,7 @@
1
1
  module SimpleCov
2
2
  module Formatter
3
3
  class BadgeFormatter
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov-badge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-16 00:00:00.000000000 Z
11
+ date: 2013-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake