easycov 0.3.1 → 0.4.0

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
  SHA1:
3
- metadata.gz: ea3f0b5360ba2fc80c76b9fa9ab38951a345a67f
4
- data.tar.gz: 101756a24e72f1f36fba94fbca4a473668b9b111
3
+ metadata.gz: 6c72dd9e0f756ba8752327523cc833548a5ca421
4
+ data.tar.gz: d21141fd8696f665741bc37fda251225234f778b
5
5
  SHA512:
6
- metadata.gz: a872412f2288f2fa70bfae762820134cd26174499b1edf2aa4fb7b74ef47412842f02aaeb0f17691ddbc7ab6f9b355ce16d4ddb74ba4c551a6fcfcd175d8ae65
7
- data.tar.gz: e9598689e7e66fd25ccaadf8c9939cafa0adece50c088b68dfb216c085d23c3f32d7ba8aaa32f5e56e47d983c1257e7751d169ada27541f33ef498c87fb4d803
6
+ metadata.gz: 96ab10ced507edd261a9f1261e3c1ec2a03b3336d5c4de5fb69c9e63ef67ff3d26ad328c8bab8b12b51520b1015c5b1db09d33b1a80edb64980e7dd467bac60f
7
+ data.tar.gz: 2d5f8f966e4d33f32a73d83320590bdf9587a67496f8c5a941618a1af55d2d62f0ae6e461d92a4d41bd5dd1a4cadb8a828033f68aa1da7096cb5e5f0092999fe
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
@@ -2,15 +2,15 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: easycov 0.3.1 ruby lib
5
+ # stub: easycov 0.4.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "easycov"
9
- s.version = "0.3.1"
9
+ s.version = "0.4.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["Chetan Sarva"]
13
- s.date = "2013-10-07"
13
+ s.date = "2013-10-14"
14
14
  s.description = "An easy to use, simplecov-compatibile code coverage library for Ruby"
15
15
  s.email = "chetan@pixelcop.net"
16
16
  s.files = [
@@ -95,9 +95,13 @@ module EasyCov
95
95
 
96
96
  data = {}
97
97
  files.each do |f|
98
- next if !File.exists? f
99
- data.merge!(MultiJson.load(File.read(f)))
100
- File.delete(f)
98
+ begin
99
+ next if !File.size? f
100
+ data.merge!(MultiJson.load(File.read(f)))
101
+ rescue Oj::ParseError
102
+ ensure
103
+ File.delete(f) if File.exists? f
104
+ end
101
105
  end
102
106
 
103
107
  prune(data)
@@ -206,4 +210,10 @@ module SimpleCov
206
210
  end
207
211
  end
208
212
 
213
+ # Set default path
209
214
  EasyCov.detect_path!
215
+ EasyCov.path ||= "coverage"
216
+
217
+ # Add some default filters
218
+ EasyCov.filters << EasyCov::IGNORE_GEMS << EasyCov::IGNORE_STDLIB <<
219
+ EasyCov::IGNORE_TESTS << EasyCov::IGNORE_VENDOR
@@ -24,9 +24,14 @@ module EasyCov
24
24
  end
25
25
  end
26
26
 
27
- # Ignore files in <root>/test/
27
+ # Ignore files in <root>/test/ and <root>/.test/
28
28
  IGNORE_TESTS = lambda { |filename|
29
- filename =~ %r{^#{EasyCov.root}/test/}
29
+ filename =~ %r{^#{EasyCov.root}/\.?test/}
30
+ }
31
+
32
+ # Ignore files in <root>/vendor/
33
+ IGNORE_VENDOR = lambda { |filename|
34
+ filename =~ %r{^#{EasyCov.root}/vendor/}
30
35
  }
31
36
 
32
37
  # Ignore all filfes outside EasyCov.root (pwd by default)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easycov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chetan Sarva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-07 00:00:00.000000000 Z
11
+ date: 2013-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov