pullreview-coverage 0.0.4 → 0.0.5
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 +4 -4
- data/CHANGELOG.md +16 -1
- data/README.md +1 -1
- data/lib/pullreview/coverage/client_api.rb +3 -3
- data/lib/pullreview/coverage/formatter.rb +3 -0
- data/lib/pullreview/coverage/version.rb +1 -1
- data/lib/pullreview/coverage_reporter.rb +2 -0
- data/spec/spec_helper.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e30e4aabbd0207f366bd8eeeb661c65f41f95b9
|
4
|
+
data.tar.gz: dbfad747c26744c5008ef72f53e12ca49b024580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ff8ea2a02fb06caa97bb3aeb3dc5f06f047946cc80a8e4184f285068576ab58dd53a5add163e645782f540f31dd9068f75630a9d5021cb72a6baadcc2ee9def
|
7
|
+
data.tar.gz: d84a2570fd49264816a5be75e137b3e312ba978168b3946c39e46bec15136d407f40b765fa396df3524bc8eb5e85acc1ea4145c4751d82c4e01322fc64534d60
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,24 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.0.5] - 2015-04-18
|
6
|
+
### Added
|
7
|
+
- use pullreview-coverage onto pullreview-coverage
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
- minor refactoring (documentation, code smell)
|
11
|
+
- Gem Version badge
|
12
|
+
|
13
|
+
## [0.0.4] - 2015-04-18
|
14
|
+
### Changed
|
15
|
+
- add FAQ about possible SSL error
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
- fix SSL error on some platform by embedding bundle of root certs
|
19
|
+
|
5
20
|
## [0.0.3] - 2015-03-11
|
6
21
|
### Added
|
7
22
|
- include into payload the URI of the build for Semaphore
|
8
23
|
|
9
24
|
### Fixed
|
10
|
-
- fix spec helper ENV allowing to update ENV for a test
|
25
|
+
- fix spec helper ENV allowing to update ENV for a test
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Pullreview::Coverage
|
2
2
|
|
3
|
-
[](
|
3
|
+
[](https://badge.fury.io/rb/pullreview-coverage)
|
4
4
|
[](https://www.pullreview.com/github/8thcolor/pullreview-coverage/reviews/master)
|
5
5
|
[](https://codeship.com/projects/67847)
|
6
6
|
|
@@ -90,9 +90,9 @@ module PullReview
|
|
90
90
|
|
91
91
|
# white list the pullreview host for webmock
|
92
92
|
def allow_pullreview_webmock
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
return unless defined?(WebMock)
|
94
|
+
allow = WebMock::Config.instance.allow || []
|
95
|
+
WebMock::Config.instance.allow = [*allow].push(config.api_host) if allow
|
96
96
|
end
|
97
97
|
|
98
98
|
# white list the pullreview host for vcr
|
@@ -68,17 +68,20 @@ module PullReview
|
|
68
68
|
sources
|
69
69
|
end
|
70
70
|
|
71
|
+
# handle correctly filename considering root of the project and prefix
|
71
72
|
def short_filename(filename)
|
72
73
|
return prefix(filename) unless ::SimpleCov.root
|
73
74
|
filename = filename.gsub(::SimpleCov.root, '.').gsub(/^\.\//, '')
|
74
75
|
prefix(filename)
|
75
76
|
end
|
76
77
|
|
78
|
+
# add a prefix to a filename
|
77
79
|
def prefix(filename)
|
78
80
|
return filename unless @config.prefix_filename
|
79
81
|
"#{config.prefix_filename}/#{filename}"
|
80
82
|
end
|
81
83
|
|
84
|
+
# wrap Float.round
|
82
85
|
def round(numeric, precision)
|
83
86
|
Float(numeric).round(precision)
|
84
87
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,11 @@ require 'turn/autorun'
|
|
5
5
|
|
6
6
|
$LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
|
7
7
|
require_relative '../lib/pullreview/coverage.rb'
|
8
|
+
require_relative '../lib/pullreview/coverage_reporter.rb'
|
8
9
|
|
10
|
+
PullReview::CoverageReporter.start
|
11
|
+
|
12
|
+
# simple helper to manipulate the ENV when testing
|
9
13
|
def with_env(options, &block)
|
10
14
|
backup = ENV.to_h
|
11
15
|
ENV.clear
|