danger-rcov 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +53 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +45 -13
- data/Dangerfile +10 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +11 -0
- data/Guardfile +2 -0
- data/Rakefile +2 -0
- data/danger-rcov.gemspec +11 -24
- data/lib/danger_plugin.rb +3 -1
- data/lib/danger_rcov.rb +3 -1
- data/lib/rcov/gem_version.rb +3 -1
- data/lib/rcov/plugin.rb +12 -8
- data/spec/rcov_spec.rb +31 -7
- data/spec/spec_helper.rb +31 -16
- metadata +59 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc9bb768c8f89f33d294bd4bd1b83c025821494511866b9866842b805a7c28b2
|
4
|
+
data.tar.gz: 041d9a40c9bfa642455924e2d2a4e45f335b783a7e747cbbdf49b5ae512ba424
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f14f4276cfd30037c26eafcfd19aa04f3158914b685ed156847026e7777554d83e596f809fc61a3a5daa8851ec444d8b3036fed731f4800b5413793bbf6a8d47
|
7
|
+
data.tar.gz: 9ef2e81f72588c3b60464a5d9fc894a2f749237e34b557da10a36069270270817cb22b8d039dd4c0978d0f614e043f6a5753f706e281fa28588fd70b49a6edc4
|
@@ -0,0 +1,53 @@
|
|
1
|
+
version: 2.1
|
2
|
+
workflows:
|
3
|
+
test-workflow:
|
4
|
+
jobs:
|
5
|
+
- build:
|
6
|
+
context: EdgePetrolApp
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
docker:
|
10
|
+
- image: circleci/ruby:2.7.1
|
11
|
+
environment:
|
12
|
+
RUBYOPT: '-W0 -KU -E utf-8:utf-8'
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- checkout
|
16
|
+
- run:
|
17
|
+
name: Install Cmake
|
18
|
+
command: sudo apt-get install cmake
|
19
|
+
- restore_cache:
|
20
|
+
keys:
|
21
|
+
- edge-bundle-{{ checksum "Gemfile.lock" }}
|
22
|
+
- edge-bundle-
|
23
|
+
- run:
|
24
|
+
name: Bundle Check or Install
|
25
|
+
command: bundle check --path vendor/bundle || bundle install --jobs=4 --retry=3 --path vendor/bundle
|
26
|
+
- save_cache:
|
27
|
+
key: edge-bundle-{{ checksum "Gemfile.lock" }}
|
28
|
+
paths:
|
29
|
+
- vendor/bundle
|
30
|
+
- run:
|
31
|
+
name: Lint code
|
32
|
+
command: bundle exec rubocop
|
33
|
+
- run:
|
34
|
+
name: Execute Rspec Tests
|
35
|
+
command: |
|
36
|
+
mkdir -p /tmp/coverage
|
37
|
+
bundle exec rspec
|
38
|
+
- run:
|
39
|
+
name: Store coverage report
|
40
|
+
command: mv coverage/coverage.json /tmp/coverage/
|
41
|
+
- persist_to_workspace:
|
42
|
+
root: /tmp/coverage
|
43
|
+
paths: .
|
44
|
+
- store_artifacts:
|
45
|
+
path: /tmp/coverage
|
46
|
+
destination: coverage
|
47
|
+
- run:
|
48
|
+
name: Run Danger
|
49
|
+
command: bundle exec danger
|
50
|
+
# - run:
|
51
|
+
# name: build and upload gem to rubygems
|
52
|
+
# command: |-
|
53
|
+
# gem build danger-rcov.gemspec
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -2,37 +2,69 @@
|
|
2
2
|
|
3
3
|
# If you don't like these settings, just delete this file :)
|
4
4
|
|
5
|
-
AllCops:
|
6
|
-
TargetRubyVersion: 2.0
|
7
|
-
|
8
5
|
Style/StringLiterals:
|
9
|
-
EnforcedStyle:
|
6
|
+
EnforcedStyle: single_quotes
|
10
7
|
Enabled: true
|
11
8
|
|
12
9
|
# kind_of? is a good way to check a type
|
13
10
|
Style/ClassCheck:
|
14
11
|
EnforcedStyle: kind_of?
|
15
12
|
|
16
|
-
# It's better to be more explicit about the type
|
17
|
-
Style/BracesAroundHashParameters:
|
18
|
-
Enabled: false
|
19
|
-
|
20
13
|
# specs sometimes have useless assignments, which is fine
|
21
14
|
Lint/UselessAssignment:
|
22
15
|
Exclude:
|
23
16
|
- '**/spec/**/*'
|
24
17
|
|
25
18
|
# We could potentially enable the 2 below:
|
26
|
-
Layout/
|
19
|
+
Layout/FirstHashElementIndentation:
|
27
20
|
Enabled: false
|
28
21
|
|
29
|
-
Layout/
|
22
|
+
Layout/HashAlignment:
|
30
23
|
Enabled: false
|
31
24
|
|
32
25
|
# HoundCI doesn't like this rule
|
33
26
|
Layout/DotPosition:
|
34
27
|
Enabled: false
|
35
28
|
|
29
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
Layout/SpaceAroundMethodCallOperator:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
Lint/DeprecatedOpenSSLConstant:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
Lint/MixedRegexpCaptureTypes:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
Lint/RaiseException:
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
Lint/StructNewOverride:
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Style/ExponentialNotation:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Style/HashEachMethods:
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
Style/HashTransformKeys:
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Style/HashTransformValues:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Style/RedundantRegexpCharacterClass:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Style/RedundantRegexpEscape:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Style/SlicingWithRange:
|
66
|
+
Enabled: true
|
67
|
+
|
36
68
|
# We allow !! as it's an easy way to convert ot boolean
|
37
69
|
Style/DoubleNegation:
|
38
70
|
Enabled: false
|
@@ -76,7 +108,7 @@ Metrics/CyclomaticComplexity:
|
|
76
108
|
Max: 17
|
77
109
|
|
78
110
|
# Configuration parameters: AllowURI, URISchemes.
|
79
|
-
|
111
|
+
Layout/LineLength:
|
80
112
|
Max: 370
|
81
113
|
|
82
114
|
# Configuration parameters: CountKeywordArgs.
|
@@ -127,10 +159,10 @@ Metrics/BlockLength:
|
|
127
159
|
Style/MixinGrouping:
|
128
160
|
Enabled: false
|
129
161
|
|
130
|
-
|
162
|
+
Naming/FileName:
|
131
163
|
Enabled: false
|
132
164
|
|
133
|
-
Layout/
|
165
|
+
Layout/HeredocIndentation:
|
134
166
|
Enabled: false
|
135
167
|
|
136
168
|
Style/SpecialGlobalVars:
|
data/Dangerfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
danger.import_plugin('../lib/rcov/plugin.rb')
|
4
|
+
|
5
|
+
if ENV['CIRCLE_TOKEN']
|
6
|
+
markdown rcov.report(
|
7
|
+
current_url: "https://circleci.com/api/v1.1/project/github/#{ENV['CIRCLE_PROJECT_USERNAME']}/#{ENV['CIRCLE_PROJECT_REPONAME']}/#{ENV['CIRCLE_BUILD_NUM']}/artifacts?circle-token=#{ENV['CIRCLE_TOKEN']}",
|
8
|
+
master_url: "https://circleci.com/api/v1.1/project/github/#{ENV['CIRCLE_PROJECT_USERNAME']}/#{ENV['CIRCLE_PROJECT_REPONAME']}/latest/artifacts?circle-token=#{ENV['CIRCLE_TOKEN']}&branch=master"
|
9
|
+
)
|
10
|
+
end
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -35,6 +35,7 @@ GEM
|
|
35
35
|
danger-plugin-api (1.0.0)
|
36
36
|
danger (> 2.0)
|
37
37
|
diff-lcs (1.3)
|
38
|
+
docile (1.3.2)
|
38
39
|
faraday (1.0.1)
|
39
40
|
multipart-post (>= 1.2, < 3)
|
40
41
|
faraday-http-cache (2.2.0)
|
@@ -57,6 +58,7 @@ GEM
|
|
57
58
|
guard (~> 2.1)
|
58
59
|
guard-compat (~> 1.1)
|
59
60
|
rspec (>= 2.99.0, < 4.0)
|
61
|
+
json (2.3.1)
|
60
62
|
kramdown (2.3.0)
|
61
63
|
rexml
|
62
64
|
kramdown-parser-gfm (1.1.0)
|
@@ -121,6 +123,13 @@ GEM
|
|
121
123
|
addressable (>= 2.3.5)
|
122
124
|
faraday (> 0.8, < 2.0)
|
123
125
|
shellany (0.0.1)
|
126
|
+
simplecov (0.19.0)
|
127
|
+
docile (~> 1.1)
|
128
|
+
simplecov-html (~> 0.11)
|
129
|
+
simplecov-html (0.12.2)
|
130
|
+
simplecov-json (0.2.1)
|
131
|
+
json
|
132
|
+
simplecov
|
124
133
|
terminal-table (1.8.0)
|
125
134
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
126
135
|
thor (1.0.1)
|
@@ -140,6 +149,8 @@ DEPENDENCIES
|
|
140
149
|
rake (~> 12.3)
|
141
150
|
rspec (~> 3.4)
|
142
151
|
rubocop
|
152
|
+
simplecov
|
153
|
+
simplecov-json
|
143
154
|
yard
|
144
155
|
|
145
156
|
BUNDLED WITH
|
data/Guardfile
CHANGED
data/Rakefile
CHANGED
data/danger-rcov.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'rcov/gem_version.rb'
|
5
6
|
|
@@ -8,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
8
9
|
spec.version = Rcov::VERSION
|
9
10
|
spec.authors = ['Guilherme Pereira']
|
10
11
|
spec.email = ['guilhermepereira@edgepetrol.com']
|
11
|
-
spec.description = %
|
12
|
-
spec.summary = %
|
12
|
+
spec.description = %(Plugin that allows code coverage print)
|
13
|
+
spec.summary = %(Plugin that allows code coverage print)
|
13
14
|
spec.homepage = 'https://github.com/EdgePetrol/danger-rcov'
|
14
15
|
spec.license = 'MIT'
|
15
16
|
|
@@ -22,28 +23,14 @@ Gem::Specification.new do |spec|
|
|
22
23
|
|
23
24
|
# General ruby development
|
24
25
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
25
|
-
spec.add_development_dependency 'rake', '~> 12.3'
|
26
|
-
|
27
|
-
# Testing support
|
28
|
-
spec.add_development_dependency 'rspec', '~> 3.4'
|
29
|
-
|
30
|
-
# Linting code and docs
|
31
|
-
spec.add_development_dependency "rubocop"
|
32
|
-
spec.add_development_dependency "yard"
|
33
|
-
|
34
|
-
# Makes testing easy via `bundle exec guard`
|
35
26
|
spec.add_development_dependency 'guard', '~> 2.14'
|
36
27
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
37
|
-
|
38
|
-
# If you want to work on older builds of ruby
|
39
28
|
spec.add_development_dependency 'listen', '3.0.7'
|
40
|
-
|
41
|
-
# This gives you the chance to run a REPL inside your tests
|
42
|
-
# via:
|
43
|
-
#
|
44
|
-
# require 'pry'
|
45
|
-
# binding.pry
|
46
|
-
#
|
47
|
-
# This will stop test execution and let you inspect the results
|
48
29
|
spec.add_development_dependency 'pry'
|
30
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
31
|
+
spec.add_development_dependency 'rspec', '~> 3.4'
|
32
|
+
spec.add_development_dependency 'rubocop'
|
33
|
+
spec.add_development_dependency 'simplecov'
|
34
|
+
spec.add_development_dependency 'simplecov-json'
|
35
|
+
spec.add_development_dependency 'yard'
|
49
36
|
end
|
data/lib/danger_plugin.rb
CHANGED
data/lib/danger_rcov.rb
CHANGED
data/lib/rcov/gem_version.rb
CHANGED
data/lib/rcov/plugin.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: false
|
2
|
+
|
1
3
|
require 'open-uri'
|
2
4
|
require 'net/http'
|
3
5
|
|
@@ -13,8 +15,8 @@ module Danger
|
|
13
15
|
|
14
16
|
@master_report = master_report
|
15
17
|
|
16
|
-
if show_warning && master_report && master_report.dig('metrics', 'covered_percent').round(2)
|
17
|
-
warn("Code coverage decreased from #{master_report.dig('metrics', 'covered_percent').round(2)
|
18
|
+
if show_warning && master_report && master_report.dig('metrics', 'covered_percent').round(2) > current_report.dig('metrics', 'covered_percent').round(2)
|
19
|
+
warn("Code coverage decreased from #{master_report.dig('metrics', 'covered_percent').round(2)}% to #{current_report.dig('metrics', 'covered_percent').round(2)}%")
|
18
20
|
end
|
19
21
|
|
20
22
|
# Output the processed report
|
@@ -24,11 +26,13 @@ module Danger
|
|
24
26
|
private
|
25
27
|
|
26
28
|
def get_report(url:)
|
29
|
+
return nil if Net::HTTP.get_response(URI.parse(url)).code != '200'
|
30
|
+
|
27
31
|
artifacts = JSON.parse(URI.parse(url).read).map { |a| a['url'] }
|
28
32
|
|
29
33
|
coverage_url = artifacts.find { |artifact| artifact.end_with?('coverage/coverage.json') }
|
30
34
|
|
31
|
-
return nil
|
35
|
+
return nil unless coverage_url
|
32
36
|
|
33
37
|
coverage_url_with_token = "#{coverage_url}?circle-token=#{ENV['CIRCLE_TOKEN']}"
|
34
38
|
|
@@ -57,26 +61,26 @@ module Danger
|
|
57
61
|
message << new_line('Lines', @current_total_lines, @master_total_lines)
|
58
62
|
message << separator_line
|
59
63
|
message << new_line('Misses', @current_misses_count, @master_misses_count)
|
60
|
-
message <<
|
64
|
+
message << '```'
|
61
65
|
end
|
62
66
|
|
63
67
|
def separator_line
|
64
68
|
"========================================\n"
|
65
69
|
end
|
66
70
|
|
67
|
-
def new_line(title, current, master, symbol=nil)
|
71
|
+
def new_line(title, current, master, symbol = nil)
|
68
72
|
formatter = symbol ? '%+.2f' : '%+d'
|
69
73
|
currrent_formatted = current.to_s + symbol.to_s
|
70
74
|
master_formatted = master ? master.to_s + symbol.to_s : '-'
|
71
|
-
prep =
|
75
|
+
prep = master_formatted != '-' && current - master != 0 ? '+ ' : ' '
|
72
76
|
|
73
77
|
line = data_string(title, master_formatted, currrent_formatted, prep)
|
74
|
-
line << justify_text(
|
78
|
+
line << justify_text(format(formatter, current - master) + symbol.to_s, 8) if prep == '+ '
|
75
79
|
line << "\n"
|
76
80
|
line
|
77
81
|
end
|
78
82
|
|
79
|
-
def justify_text(string, adjust, position='right')
|
83
|
+
def justify_text(string, adjust, position = 'right')
|
80
84
|
string.send(position == 'right' ? :rjust : :ljust, adjust)
|
81
85
|
end
|
82
86
|
|
data/spec/rcov_spec.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path('spec_helper', __dir__)
|
2
4
|
|
3
5
|
module Danger
|
4
6
|
describe Danger::DangerRcov do
|
5
|
-
it
|
7
|
+
it 'should be a plugin' do
|
6
8
|
expect(Danger::DangerRcov.new(nil)).to be_a Danger::Plugin
|
7
9
|
end
|
8
10
|
|
9
|
-
describe
|
11
|
+
describe 'with Dangerfile' do
|
10
12
|
let(:current_url) { double('URI::HTTPS') }
|
11
13
|
let(:master_url) { double('URI::HTTPS') }
|
12
14
|
let(:coverage_current_url) { double('URI::HTTPS') }
|
@@ -26,8 +28,9 @@ module Danger
|
|
26
28
|
@master_coverage = File.read(File.dirname(__FILE__) + '/support/fixtures/master_coverage.json')
|
27
29
|
end
|
28
30
|
|
29
|
-
it
|
31
|
+
it 'code coverage different' do
|
30
32
|
allow(URI).to receive(:parse).with('https://current.dev').and_return(current_url)
|
33
|
+
allow(Net::HTTP).to receive_message_chain(:get_response, :code).and_return('200')
|
31
34
|
allow(current_url).to receive(:read).and_return(@current_circle_ci)
|
32
35
|
allow(URI).to receive(:parse).with('https://current.circle-artifacts.com/0/coverage/coverage.json?circle-token=circle-token').and_return(coverage_current_url)
|
33
36
|
allow(coverage_current_url).to receive(:read).and_return(@current_coverage)
|
@@ -37,11 +40,22 @@ module Danger
|
|
37
40
|
allow(URI).to receive(:parse).with('https://master.circle-artifacts.com/0/coverage/coverage.json?circle-token=circle-token').and_return(coverage_master_url)
|
38
41
|
allow(coverage_master_url).to receive(:read).and_return(@master_coverage)
|
39
42
|
|
40
|
-
expect(@rcov_plugin.report(current_url: 'https://current.dev', master_url: 'https://master.dev')).to eq("```diff\n
|
43
|
+
expect(@rcov_plugin.report(current_url: 'https://current.dev', master_url: 'https://master.dev')).to eq("```diff\n"\
|
44
|
+
"@@ Coverage Diff @@\n"\
|
45
|
+
"## master #123 +/- ##\n"\
|
46
|
+
"========================================\n"\
|
47
|
+
"+ Coverage 81.62% 79.16% -2.46%\n"\
|
48
|
+
"========================================\n"\
|
49
|
+
" Files 85 85\n"\
|
50
|
+
"+ Lines 1708 1699 -9\n"\
|
51
|
+
"========================================\n"\
|
52
|
+
"+ Misses 314 354 +40\n"\
|
53
|
+
'```')
|
41
54
|
end
|
42
55
|
|
43
|
-
it
|
56
|
+
it 'same code coverage' do
|
44
57
|
allow(URI).to receive(:parse).with('https://current.dev').and_return(current_url)
|
58
|
+
allow(Net::HTTP).to receive_message_chain(:get_response, :code).and_return('200')
|
45
59
|
allow(current_url).to receive(:read).and_return(@current_circle_ci)
|
46
60
|
allow(URI).to receive(:parse).with('https://current.circle-artifacts.com/0/coverage/coverage.json?circle-token=circle-token').and_return(coverage_current_url)
|
47
61
|
allow(coverage_current_url).to receive(:read).and_return(@current_coverage)
|
@@ -51,7 +65,17 @@ module Danger
|
|
51
65
|
allow(URI).to receive(:parse).with('https://master.circle-artifacts.com/0/coverage/coverage.json?circle-token=circle-token').and_return(coverage_master_url)
|
52
66
|
allow(coverage_master_url).to receive(:read).and_return(@current_coverage)
|
53
67
|
|
54
|
-
expect(@rcov_plugin.report(current_url: 'https://current.dev', master_url: 'https://master.dev')).to eq("```diff\n
|
68
|
+
expect(@rcov_plugin.report(current_url: 'https://current.dev', master_url: 'https://master.dev')).to eq("```diff\n"\
|
69
|
+
"@@ Coverage Diff @@\n"\
|
70
|
+
"## master #123 +/- ##\n"\
|
71
|
+
"========================================\n"\
|
72
|
+
" Coverage 79.16% 79.16%\n"\
|
73
|
+
"========================================\n"\
|
74
|
+
" Files 85 85\n"\
|
75
|
+
" Lines 1699 1699\n"\
|
76
|
+
"========================================\n"\
|
77
|
+
" Misses 354 354\n"\
|
78
|
+
'```')
|
55
79
|
end
|
56
80
|
end
|
57
81
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,27 +1,42 @@
|
|
1
|
-
|
2
|
-
ROOT = Pathname.new(File.expand_path("../../", __FILE__))
|
3
|
-
$:.unshift((ROOT + "lib").to_s)
|
4
|
-
$:.unshift((ROOT + "spec").to_s)
|
1
|
+
# frozen_string_literal: true
|
5
2
|
|
6
|
-
require
|
3
|
+
require 'pathname'
|
4
|
+
ROOT = Pathname.new(File.expand_path('..', __dir__))
|
5
|
+
$:.unshift((ROOT + 'lib').to_s)
|
6
|
+
$:.unshift((ROOT + 'spec').to_s)
|
7
7
|
|
8
|
-
require
|
9
|
-
|
8
|
+
require 'bundler/setup'
|
9
|
+
|
10
|
+
require 'rspec'
|
11
|
+
require 'danger'
|
12
|
+
|
13
|
+
require 'simplecov'
|
14
|
+
require 'simplecov-json'
|
15
|
+
|
16
|
+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
|
17
|
+
[
|
18
|
+
SimpleCov::Formatter::HTMLFormatter,
|
19
|
+
SimpleCov::Formatter::JSONFormatter
|
20
|
+
]
|
21
|
+
)
|
22
|
+
SimpleCov.start do
|
23
|
+
add_filter 'spec'
|
24
|
+
end
|
10
25
|
|
11
26
|
if `git remote -v` == ''
|
12
|
-
puts
|
27
|
+
puts 'You cannot run tests without setting a local git remote on this repo'
|
13
28
|
puts "It's a weird side-effect of Danger's internals."
|
14
29
|
exit(0)
|
15
30
|
end
|
16
31
|
|
17
32
|
# Use coloured output, it's the best.
|
18
33
|
RSpec.configure do |config|
|
19
|
-
config.filter_gems_from_backtrace
|
34
|
+
config.filter_gems_from_backtrace 'bundler'
|
20
35
|
config.color = true
|
21
36
|
config.tty = true
|
22
37
|
end
|
23
38
|
|
24
|
-
require
|
39
|
+
require 'danger_plugin'
|
25
40
|
|
26
41
|
# These functions are a subset of https://github.com/danger/danger/blob/master/spec/spec_helper.rb
|
27
42
|
# If you are expanding these files, see if it's already been done ^.
|
@@ -39,7 +54,7 @@ def testing_ui
|
|
39
54
|
|
40
55
|
cork = Cork::Board.new(out: @output)
|
41
56
|
def cork.string
|
42
|
-
out.string.gsub(/\e\[([;\d]+)?m/,
|
57
|
+
out.string.gsub(/\e\[([;\d]+)?m/, '')
|
43
58
|
end
|
44
59
|
cork
|
45
60
|
end
|
@@ -49,11 +64,11 @@ end
|
|
49
64
|
# running a PR on TravisCI
|
50
65
|
def testing_env
|
51
66
|
{
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
67
|
+
'HAS_JOSH_K_SEAL_OF_APPROVAL' => 'true',
|
68
|
+
'TRAVIS_PULL_REQUEST' => '800',
|
69
|
+
'TRAVIS_REPO_SLUG' => 'artsy/eigen',
|
70
|
+
'TRAVIS_COMMIT_RANGE' => '759adcbd0d8f...13c4dc8bb61d',
|
71
|
+
'DANGER_GITHUB_API_TOKEN' => '123sbdq54erfsd3422gdfio'
|
57
72
|
}
|
58
73
|
end
|
59
74
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-rcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Pereira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|
@@ -39,49 +39,49 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: guard
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.14'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.14'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
56
|
+
name: guard-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '4.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '4.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: listen
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.0.7
|
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:
|
82
|
+
version: 3.0.7
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: pry
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,49 +95,77 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '12.3'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '12.3'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '4
|
117
|
+
version: '3.4'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '4
|
124
|
+
version: '3.4'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rubocop
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov-json
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: yard
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
142
170
|
requirements:
|
143
171
|
- - ">="
|
@@ -157,9 +185,11 @@ executables: []
|
|
157
185
|
extensions: []
|
158
186
|
extra_rdoc_files: []
|
159
187
|
files:
|
188
|
+
- ".circleci/config.yml"
|
160
189
|
- ".gitignore"
|
161
190
|
- ".rubocop.yml"
|
162
191
|
- ".travis.yml"
|
192
|
+
- Dangerfile
|
163
193
|
- Gemfile
|
164
194
|
- Gemfile.lock
|
165
195
|
- Guardfile
|
@@ -181,7 +211,7 @@ homepage: https://github.com/EdgePetrol/danger-rcov
|
|
181
211
|
licenses:
|
182
212
|
- MIT
|
183
213
|
metadata: {}
|
184
|
-
post_install_message:
|
214
|
+
post_install_message:
|
185
215
|
rdoc_options: []
|
186
216
|
require_paths:
|
187
217
|
- lib
|
@@ -197,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
227
|
version: '0'
|
198
228
|
requirements: []
|
199
229
|
rubygems_version: 3.1.2
|
200
|
-
signing_key:
|
230
|
+
signing_key:
|
201
231
|
specification_version: 4
|
202
232
|
summary: Plugin that allows code coverage print
|
203
233
|
test_files:
|