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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b77c22bed299dc020a8aaf8969d02fa5e4aec211fdf2a1e383bba0b3c8086b4
4
- data.tar.gz: bad90c04e8c9d4b132b5404cb97b553b28a45b9d455c228fb101b31808e9fd68
3
+ metadata.gz: b83d5ecb1cc7cfdbf88f23273fce8e930cbd0fc35f3a6b260b1aabdcde3670de
4
+ data.tar.gz: 3815abcaef04933a213daf978b6af2dbc7d51e8934da0410579f37a00beb4e47
5
5
  SHA512:
6
- metadata.gz: 6a152639aba57094258da3921d7d5d6a984209c5b9a6456bbae45fef5e58db43469365b4e7e0eac87af6363c28d68057f7c6f4a887d5018886d36a6b9713936e
7
- data.tar.gz: bf3853ad9dfc1a89a486a810cda5fb3596cf17ad2a456928680fc5ff8c183186b8f9eb5d682ccf982b16950126ae8dc6307824f8f48f8844753f8b94b91707b7
6
+ metadata.gz: 9608eed99456830ae703a331e4d25269a81c638c490b533bdcaaf0151e8799cd5c92f0f09300534c4e77e564ffaeb0cda43761ed6a5d6cd753f39f1b76cae6ef
7
+ data.tar.gz: e8c465f56eb74b39ee1df9db95a1f1e106da64cfa0e6b31940e45f8054c04210ab81723fb3f012c119bc4d5290b314abb8dd7b8e93b99f7bba058093ea593c84
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  Gemfile.lock
4
4
 
5
5
  ## PROJECT::GENERAL
6
- coverage
7
6
  rdoc
8
7
  pkg
9
8
  .sass-cache
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.5.3
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ branches:
3
3
  only:
4
4
  - master
5
5
  rvm:
6
- - 2.5.1
6
+ - 2.5.3
7
7
  cache: bundler
8
8
  bundler_args: "--jobs=3 --retry=3 --without production"
9
9
  matrix:
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Change Logs
2
+
3
+ # 0.2.2
4
+ * Ruby 2.5.3
5
+ * RubyCritic badge
6
+
7
+ # Version 0.2.1
8
+
9
+ * Add CHANGELOG
10
+ * Support SVG
11
+ * Support 0.2.2 repo-small-badge gem
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
- font: 'Helvetica',
17
- font_size: 16,
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: 'Helvetica-Narrow-Bold',
21
+ coverage_font: 'Verdana,sans-serif',
23
22
  coverage_font_color: '#fff',
24
- coverage_font_size: 16,
23
+ coverage_font_size: 11,
25
24
  badge_height: 20,
26
- badge_width: 200,
25
+ badge_width: 120,
27
26
  filename_prefix: 'coverage_badge',
28
27
  output_path: SimpleCov.coverage_path,
29
28
  log_level: 'info',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleCovSmallBadge
4
- VERSION = '0.2'
4
+ VERSION = '0.2.2'
5
5
  end
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
- gem install bundler-audit && bundle-audit update && bundle-audit check
8
- gem install rubycritic && rubycritic app lib config ${RUBYCRITICPARAMS} --format console --minimum-score ${RUBYCRITICLIMIT}
9
- echo "Pushing badges upstream"
10
- [ -d badges ] || mkdir badges
11
- cp coverage/coverage_badge* badges/
12
- ls badges
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.1'
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.63'
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")
@@ -5,7 +5,6 @@ require 'spec_helper'
5
5
  describe SimpleCovSmallBadge::Formatter do
6
6
  include TestSimpleCovSmallBadge::Mocks
7
7
 
8
- let(:stack) { mock_mini_magick_stack }
9
8
  describe '#format' do
10
9
  context 'bad result' do
11
10
  it do
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: '0.2'
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-16 00:00:00.000000000 Z
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.1
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.1
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.63'
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.63'
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.6
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