repo-small-badge 0.2.5 → 0.2.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 101a337bf142f46cd532938677eb6a28f4ae652431f276ecc3dcc99da3568b94
4
- data.tar.gz: 77891f4ddd8c08b271e11f6fb0f41d54ae2b7bc35ac6f1ef6b9b16a3a103bfaa
3
+ metadata.gz: 1792cff6cdb3aa52bcf54ed3939b44bfd67a959499f7516dc024407d5773af46
4
+ data.tar.gz: 1faf3ec780d5c137199632c6c9d5cf872ae4f9cb68cf87cbd61c2e96551e7ebd
5
5
  SHA512:
6
- metadata.gz: 660548f9e30b65e4162d4e752e566f352aeb7b752cd64ce7423e660dc8506dd067fce99d87525b52e66137fa0d710d73cf6e715778022642a0e8c4306479bd43
7
- data.tar.gz: b568d8437cc34ee2f47fcb8ea4e4b44c8ea31c9137eac7f8599702457650b7cf904792f7363ed76bcf30742a00d47a4bfc0a53ed84ca5d1585ed5cb77626323f
6
+ metadata.gz: 53bd35626427c279dbca42c1759753fd2f9664d6d504dcb6f8242ebdab42550de9bbc41734e7503cd2404be731c89c971db5230ce4b23e5a94c655aa03debe41
7
+ data.tar.gz: 2780018fdaec1fc509f1ef052fa567981ca5f8b1af9ed514b53487574c9cee981a12c985a1ff327fdb4e0a8e2ea7f3ea1431f51e83b28668bc4ba64ed6e5a879
data/Gemfile CHANGED
@@ -5,7 +5,3 @@ 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/Rakefile CHANGED
@@ -12,7 +12,7 @@ RubyCriticSmallBadge.configure do |config|
12
12
  config.minimum_score = ENV.fetch('RUBYCRITICLIMIT', 90.0)
13
13
  end
14
14
  RubyCritic::RakeTask.new do |task|
15
- task.options = %(--formatter RubyCriticSmallBadge::Report
15
+ task.options = %(--custom-format RubyCriticSmallBadge::Report
16
16
  --minimum-score #{RubyCriticSmallBadge.config.minimum_score}
17
17
  --format html --format console)
18
18
  task.paths = FileList['lib/**/*.rb']
@@ -14,8 +14,7 @@ module RepoSmallBadge
14
14
  @config = Configuration.new(config)
15
15
  super(template: :html, contentScriptType: 'text/ecmascript',
16
16
  contentStyleType: 'text/css', preserveAspectRatio: 'xMidYMid meet',
17
- 'xmlns:xlink': 'http://www.w3.org/1999/xlink',
18
- xmlns: 'http://www.w3.org/2000/svg', version: '1.0',
17
+ version: '1.0',
19
18
  height: @config.badge_height, width: @config.badge_width)
20
19
  end
21
20
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RepoSmallBadge
4
- VERSION = '0.2.5'
4
+ VERSION = '0.2.6'
5
5
  end
@@ -19,9 +19,11 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency 'victor', '~> 0.2' # to create the svg
20
20
  s.add_development_dependency 'rake', '~> 12'
21
21
  s.add_development_dependency 'rspec', '~> 3.8'
22
- s.add_development_dependency 'rubocop', '~> 0.65'
22
+ s.add_development_dependency 'rubocop'
23
+ s.add_development_dependency 'rubycritic', '~> 4.1'
24
+ s.add_development_dependency 'rubycritic-small-badge'
23
25
  s.add_development_dependency 'simplecov', '~> 0.16'
24
- s.add_development_dependency 'simplecov-small-badge', '~> 0.1'
26
+ s.add_development_dependency 'simplecov-small-badge', '~> 0.2.2'
25
27
 
26
28
  s.files = `git ls-files`.split("\n")
27
29
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
data/spec/spec_helper.rb CHANGED
@@ -27,9 +27,6 @@ require 'bundler/setup'
27
27
 
28
28
  Dir[File.join('./spec/support/*.rb')].each { |f| require f }
29
29
 
30
- SimpleCovSmallBadge.configure do |config|
31
- config.format = 'svg'
32
- end
33
30
  RSpec.configure do |config|
34
31
  # some (optional) config here
35
32
  end
@@ -4,7 +4,10 @@ module TestRepoSmallBadge
4
4
  # rubocop:disable Metrics/MethodLength,Metrics/LineLength,Metrics/ParameterLists
5
5
  def rounded_svg_string(title_color: '#fff', title_font: 'Verdana,sans-serif', title_font_size: 11,
6
6
  value_color: '#fff', value_font: 'Verdana,sans-serif', value_font_size: 11)
7
- %(<svg contentScriptType="text/ecmascript" contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.0" height="20" width="120">
7
+ %(<svg contentScriptType="text/ecmascript" contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" version="1.0" height="20" width="120"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ xmlns:xlink="http://www.w3.org/1999/xlink">
10
+
8
11
 
9
12
  <linearGradient id="smooth" x2="0" y2="120">
10
13
  <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
@@ -34,11 +37,15 @@ Total
34
37
  100%
35
38
  </text>
36
39
  </g>
40
+
37
41
  </svg>)
38
42
  end
39
43
 
40
44
  def not_rounded_svg_string
41
- %(<svg contentScriptType="text/ecmascript" contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.0" height="20" width="200">
45
+ %(<svg contentScriptType="text/ecmascript" contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" version="1.0" height="20" width="200"
46
+ xmlns="http://www.w3.org/2000/svg"
47
+ xmlns:xlink="http://www.w3.org/1999/xlink">
48
+
42
49
 
43
50
  <linearGradient id="smooth" x2="0" y2="200">
44
51
  <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
@@ -68,6 +75,7 @@ badge Total
68
75
  100%
69
76
  </text>
70
77
  </g>
78
+
71
79
  </svg>)
72
80
  end
73
81
  # rubocop:enable Metrics/MethodLength,Metrics/LineLength,Metrics/ParameterLists
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repo-small-badge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
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-20 00:00:00.000000000 Z
11
+ date: 2019-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: victor
@@ -54,18 +54,46 @@ dependencies:
54
54
  version: '3.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubycritic
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '0.65'
75
+ version: '4.1'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '0.65'
82
+ version: '4.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubycritic-small-badge
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: simplecov
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +114,14 @@ dependencies:
86
114
  requirements:
87
115
  - - "~>"
88
116
  - !ruby/object:Gem::Version
89
- version: '0.1'
117
+ version: 0.2.2
90
118
  type: :development
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
93
121
  requirements:
94
122
  - - "~>"
95
123
  - !ruby/object:Gem::Version
96
- version: '0.1'
124
+ version: 0.2.2
97
125
  description: Small Badge generator to be used for different tools 4 ruby
98
126
  email:
99
127
  - marc.grimme at gmail dot com
@@ -114,7 +142,6 @@ files:
114
142
  - MIT-LICENSE
115
143
  - README.md
116
144
  - Rakefile
117
- - badges/coverage_badge_total.svg
118
145
  - bin/console
119
146
  - lib/repo_small_badge.rb
120
147
  - lib/repo_small_badge/configuration.rb
@@ -1,31 +0,0 @@
1
- <svg contentScriptType="text/ecmascript" contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.0" height="20" width="100%">
2
-
3
- <linearGradient id="smooth" x2="0" y2="100%">
4
- <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
5
- <stop offset="1" stop-opacity=".1"/>
6
- </linearGradient>
7
- <clipPath id="round">
8
- <rect height="20" width="200" rx="3" fill="#fff"/>
9
- </clipPath>
10
- <g clip-path="url(#round)">
11
- <rect height="20" width="100" fill="#555"/>
12
- <rect x="100" height="20" width="100" fill="#4dc71f"/>
13
- <rect height="20" width="200" fill="url(#smooth)"/>
14
- </g>
15
- <g fill="#fff" text-anchor="middle" font-family="Helvetica" size="16">
16
- <text x="50" y="15" fill="#010101" fill-opacity="0.3">
17
- scov total
18
- </text>
19
- <text x="50" y="14">
20
- scov total
21
- </text>
22
- </g>
23
- <g fill="#fff" text-anchor="middle" font-family="Helvetica-Narrow-Bold" size="16">
24
- <text x="150" y="15" fill="#010101" fill-opacity="0.3">
25
- 100%
26
- </text>
27
- <text x="150" y="14">
28
- 100%
29
- </text>
30
- </g>
31
- </svg>