pullreview-coverage 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 2d911da1d57a352f346a4ca601e926101c3dc60b
4
- data.tar.gz: 332cc986f4f44d0515a3bd6f77e4b85486243611
3
+ metadata.gz: 3e30e4aabbd0207f366bd8eeeb661c65f41f95b9
4
+ data.tar.gz: dbfad747c26744c5008ef72f53e12ca49b024580
5
5
  SHA512:
6
- metadata.gz: bc67f37fad243f53c6df6b784fc27b1133775031215323a024be27b2bf30adff49308c2d30ac63fe81a113c3b2fc302e5309384f2992706be1950b8bf62e697e
7
- data.tar.gz: 47577ef24022c5c99d023b4feb958cb5acd082c80b48f82ad8c9ccfb790672af254dba03544e4b3466666bac76d5a0bed427274c4ceda1dd6b0f1fba4b1cc91d
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
- [![Gem Version](https://badge.fury.io/rb/pullreview-coverage.svg)](http://badge.fury.io/rb/pullreview-coverage)
3
+ [![Gem Version](https://badge.fury.io/rb/pullreview-coverage.svg)](https://badge.fury.io/rb/pullreview-coverage)
4
4
  [![PullReview stats](https://www.pullreview.com/github/8thcolor/pullreview-coverage/badges/master.svg?)](https://www.pullreview.com/github/8thcolor/pullreview-coverage/reviews/master)
5
5
  [![Codeship](https://img.shields.io/codeship/5b76b590-a9f8-0132-ffc9-427bb4181a39.svg?style=flat-square)](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
- if defined?(WebMock) && allow = WebMock::Config.instance.allow || []
94
- WebMock::Config.instance.allow = [*allow].push(config.api_host)
95
- end
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
@@ -1,6 +1,6 @@
1
1
  module PullReview
2
2
  module Coverage
3
3
  # gem version
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
6
6
  end
@@ -1,7 +1,9 @@
1
1
  require_relative 'coverage'
2
2
 
3
3
  module PullReview
4
+ # Simple reporter based on SimpleCov's one
4
5
  module CoverageReporter
6
+ # start the tracking of coverage
5
7
  def self.start
6
8
  require 'simplecov'
7
9
  ::SimpleCov.formatter = PullReview::Coverage::Formatter
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pullreview-coverage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christophe Philemotte