simplecov-small-badge 0.2 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile +4 -0
- data/README.md +2 -1
- data/Rakefile +12 -0
- data/lib/simplecov_small_badge/configuration.rb +5 -6
- data/lib/simplecov_small_badge/version.rb +1 -1
- data/script/travis.sh +12 -6
- data/simplecov-small-badge.gemspec +2 -2
- data/spec/simplecov_small_badge_formatter_spec.rb +0 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b83d5ecb1cc7cfdbf88f23273fce8e930cbd0fc35f3a6b260b1aabdcde3670de
|
4
|
+
data.tar.gz: 3815abcaef04933a213daf978b6af2dbc7d51e8934da0410579f37a00beb4e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9608eed99456830ae703a331e4d25269a81c638c490b533bdcaaf0151e8799cd5c92f0f09300534c4e77e564ffaeb0cda43761ed6a5d6cd753f39f1b76cae6ef
|
7
|
+
data.tar.gz: e8c465f56eb74b39ee1df9db95a1f1e106da64cfa0e6b31940e45f8054c04210ab81723fb3f012c119bc4d5290b314abb8dd7b8e93b99f7bba058093ea593c84
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.3
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
@@ -5,3 +5,7 @@ source 'https://rubygems.org'
|
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
gem 'byebug', group: %i[development test]
|
8
|
+
gem 'rubycritic', git: 'https://github.com/marcgrimme/rubycritic',
|
9
|
+
branch: 'feature/support-dynamic-reports'
|
10
|
+
gem 'rubycritic-small-badge',
|
11
|
+
git: 'https://github.com/marcgrimme/rubycritic-small-badge'
|
data/README.md
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/simplecov-small-badge.svg)](https://badge.fury.io/rb/simplecov-small-badge)
|
4
4
|
[![Build Status](https://api.travis-ci.org/MarcGrimme/simplecov-small-badge.svg?branch=master)](https://secure.travis-ci.org/MarcGrimme/simplecov-small-badge)
|
5
5
|
[![Depfu](https://badges.depfu.com/badges/48a6c1c7c649f62eede6ffa2be843180/count.svg)](https://depfu.com/github/MarcGrimme/simplecov-small-badge?project_id=6900)
|
6
|
-
![Coverage](https://marcgrimme.github.io/simplecov-small-badge/badges/coverage_badge_total.svg)
|
6
|
+
[![Coverage](https://marcgrimme.github.io/simplecov-small-badge/badges/coverage_badge_total.svg)](https://marcgrimme.github.io/simplecov-small-badge/coverage/index.html)
|
7
|
+
[![RubyCritic](https://marcgrimme.github.io/simplecov-small-badge/badges/rubycritic_badge_score.svg)](https://marcgrimme.github.io/simplecov-small-badge/tmp/rubycritic/overview.html)
|
7
8
|
|
8
9
|
*SimpleCovBadge* is a gem that can be added to the `Gemfile` and will produce a file called `coverage_badge.png` in the `coverage` directory.
|
9
10
|
It could be looking as follows dependent on how it is configured.
|
data/Rakefile
CHANGED
@@ -6,5 +6,17 @@ Bundler::GemHelper.install_tasks
|
|
6
6
|
require 'rspec/core/rake_task'
|
7
7
|
RSpec::Core::RakeTask.new('spec')
|
8
8
|
|
9
|
+
require 'rubycritic_small_badge'
|
10
|
+
require 'rubycritic/rake_task'
|
11
|
+
RubyCriticSmallBadge.configure do |config|
|
12
|
+
config.minimum_score = ENV.fetch('RUBYCRITICLIMIT', 90.0)
|
13
|
+
end
|
14
|
+
RubyCritic::RakeTask.new do |task|
|
15
|
+
task.options = %(--formatter RubyCriticSmallBadge::Report
|
16
|
+
--minimum-score #{RubyCriticSmallBadge.config.minimum_score}
|
17
|
+
--format html --format console)
|
18
|
+
task.paths = FileList['lib/**/*.rb']
|
19
|
+
end
|
20
|
+
|
9
21
|
# If you want to make this the default task
|
10
22
|
task default: :spec
|
@@ -8,22 +8,21 @@ module SimpleCovSmallBadge
|
|
8
8
|
# rubocop:disable Metrics/MethodLength
|
9
9
|
def self.options
|
10
10
|
{
|
11
|
-
format: 'svg',
|
12
11
|
with_groups: false,
|
13
12
|
background: '#fff',
|
14
13
|
title_prefix: 'scov',
|
15
14
|
title_background: '#555',
|
16
|
-
|
17
|
-
font_size:
|
15
|
+
title_font: 'Verdana,sans-serif',
|
16
|
+
font_size: 11,
|
18
17
|
title_color: '#fff',
|
19
18
|
coverage_background_bad: '#ff0000',
|
20
19
|
coverage_background_unknown: '#cccc00',
|
21
20
|
coverage_background_good: '#4dc71f',
|
22
|
-
coverage_font: '
|
21
|
+
coverage_font: 'Verdana,sans-serif',
|
23
22
|
coverage_font_color: '#fff',
|
24
|
-
coverage_font_size:
|
23
|
+
coverage_font_size: 11,
|
25
24
|
badge_height: 20,
|
26
|
-
badge_width:
|
25
|
+
badge_width: 120,
|
27
26
|
filename_prefix: 'coverage_badge',
|
28
27
|
output_path: SimpleCov.coverage_path,
|
29
28
|
log_level: 'info',
|
data/script/travis.sh
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
set -e
|
3
3
|
RUBYCRITICLIMIT=${RUBYCRITICLIMIT:-"90.0"}
|
4
|
+
QUICK=${QUICK:-}
|
4
5
|
|
5
6
|
bundle exec rspec
|
6
7
|
bundle exec rubocop
|
7
|
-
|
8
|
-
gem install
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
if [ -z "$QUICK" ]; then
|
9
|
+
gem install bundler-audit && bundle-audit update && bundle-audit check
|
10
|
+
bundle exec rake rubycritic lib ${RUBYCRITICPARAMS}
|
11
|
+
# only move to the gh-pages if not a PR or branch is master
|
12
|
+
if [ "$TRAVIS_PULL_REQUEST" = "false" ] || [ "$TRAVIS_BRANCH" = "master" ]; then
|
13
|
+
echo "Pushing badges upstream"
|
14
|
+
[ -d badges ] || mkdir badges
|
15
|
+
cp coverage/coverage_badge* badges/ 2>/dev/null || true
|
16
|
+
fi
|
17
|
+
|
18
|
+
fi
|
@@ -16,11 +16,11 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.rubyforge_project = 'simplecov-small-badge'
|
18
18
|
|
19
|
-
s.add_dependency 'repo-small-badge', '~> 0.2.
|
19
|
+
s.add_dependency 'repo-small-badge', '~> 0.2.2'
|
20
20
|
s.add_dependency 'simplecov', '~> 0.16'
|
21
21
|
s.add_development_dependency 'rake', '~> 12'
|
22
22
|
s.add_development_dependency 'rspec', '~> 3.8'
|
23
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
23
|
+
s.add_development_dependency 'rubocop', '~> 0.65'
|
24
24
|
|
25
25
|
s.files = `git ls-files`.split("\n")
|
26
26
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-small-badge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Grimme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: repo-small-badge
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: simplecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.65'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.65'
|
83
83
|
description: Small Badge generator for SimpleCov coverage tool for ruby
|
84
84
|
email:
|
85
85
|
- marc.grimme at gmail dot com
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- ".ruby-gemset"
|
96
96
|
- ".ruby-version"
|
97
97
|
- ".travis.yml"
|
98
|
+
- CHANGELOG.md
|
98
99
|
- Gemfile
|
99
100
|
- MIT-LICENSE
|
100
101
|
- README.md
|
@@ -130,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
131
|
version: '0'
|
131
132
|
requirements: []
|
132
133
|
rubyforge_project: simplecov-small-badge
|
133
|
-
rubygems_version: 2.7.
|
134
|
+
rubygems_version: 2.7.8
|
134
135
|
signing_key:
|
135
136
|
specification_version: 4
|
136
137
|
summary: Small Badge generator for SimpleCov coverage tool for ruby
|