Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 6c2856e

Browse files
authored
Fix 0.24. (#85)
1 parent cbdca2a commit 6c2856e

5 files changed

Lines changed: 9 additions & 18 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: test install build deploy
22

33
deploy:
4-
$(eval VERSION := $(shell cat lib/version.rb | grep 'LATEST = ' | cut -d\' -f2))
4+
$(eval VERSION := $(shell cat lib/codecov.rb | grep 'VERSION = ' | cut -d\' -f2))
55
git tag v$(VERSION) -m ""
66
git push origin v$(VERSION)
77
gem build codecov.gemspec

codecov.gemspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
# frozen_string_literal: true
22

3-
lib = File.expand_path('lib', __dir__)
4-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5-
require 'version'
6-
73
Gem::Specification.new do |s|
84
s.name = 'codecov'
9-
s.version = Version::LATEST
5+
s.version = '0.2.4'
106
s.platform = Gem::Platform::RUBY
117
s.authors = ['codecov']
128
s.email = ['[email protected]']

lib/codecov.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
require 'colorize'
88
require 'zlib'
99

10-
require 'version'
11-
1210
class SimpleCov::Formatter::Codecov
11+
VERSION = '0.2.4'
12+
1313
### CIs
1414
RECOGNIZED_CIS = [
1515
APPVEYOR = 'Appveyor CI',
@@ -41,7 +41,7 @@ def display_header
4141
'| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /',
4242
'| |___| (_) | (_| | __/ (_| (_) \ V /',
4343
' \_____\___/ \__,_|\___|\___\___/ \_/',
44-
" Ruby-#{Version::LATEST}",
44+
" Ruby-#{VERSION}",
4545
''
4646
].join("\n")
4747
end
@@ -98,7 +98,7 @@ def build_params(ci)
9898
params = {
9999
'token' => ENV['CODECOV_TOKEN'],
100100
'flags' => ENV['CODECOV_FLAG'] || ENV['CODECOV_FLAGS'],
101-
'package' => "ruby-#{Version::LATEST}"
101+
'package' => "ruby-#{VERSION}"
102102
}
103103

104104
case ci
@@ -317,7 +317,7 @@ def retry_request(req, https)
317317
def create_report(report)
318318
result = {
319319
'meta' => {
320-
'version' => 'codecov-ruby/v' + Version::LATEST
320+
'version' => 'codecov-ruby/v' + VERSION
321321
}
322322
}
323323
result.update(result_to_codecov(report))

lib/version.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/test_codecov.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def url
3535

3636
def test_defined
3737
assert defined?(SimpleCov::Formatter::Codecov)
38-
assert defined?(Version::LATEST)
38+
assert defined?(SimpleCov::Formatter::Codecov::VERSION)
3939
end
4040

4141
def stub_file(filename, coverage)
@@ -83,7 +83,7 @@ def success_stubs
8383
def assert_successful_upload(data)
8484
assert_equal(data['result']['uploaded'], true)
8585
assert_equal(data['result']['message'], 'Coverage reports upload successfully')
86-
assert_equal(data['meta']['version'], 'codecov-ruby/v' + Version::LATEST)
86+
assert_equal(data['meta']['version'], 'codecov-ruby/v' + SimpleCov::Formatter::Codecov::VERSION)
8787
assert_equal(data['coverage'].to_json, {
8888
'lib/something.rb' => [nil, 1, 0, 0, nil, 1, nil],
8989
'lib/somefile.rb' => [nil, 1, nil, 1, 1, 1, 0, 0, nil, 1, nil]

0 commit comments

Comments
 (0)