simplecov 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -1
- data/CONTRIBUTING.md +15 -1
- data/README.md +16 -0
- data/gemfiles/multi_json_legacy.gemfile +1 -0
- data/gemfiles/multi_json_new.gemfile +1 -0
- data/lib/simplecov.rb +2 -8
- data/lib/simplecov/result_merger.rb +6 -1
- data/lib/simplecov/version.rb +1 -1
- data/simplecov.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aee53c6d098222de6eef7ecc86e2ffc355b664d
|
4
|
+
data.tar.gz: f9b347700bdd580ecc4edba7a24d67c4b8c9e003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cb3e1de8a12231765a66cc56f036bef7aa2856d0b29990fb0e2a440d7878876c91b193d059306221e5b3ef4863d95ed80df53775cdb3275f6a1c52ce25006c9
|
7
|
+
data.tar.gz: 3a7fd5ed285ff6804d60a7ec5c644d727a1772f4510cbc93e6f934a43628f8703854ebddf6f879924420898b1585cde55f38dea86a14ab82bd9065f06660880d
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
-
Unreleased ([changes](https://github.com/colszowka/simplecov/compare/v0.8.
|
1
|
+
Unreleased ([changes](https://github.com/colszowka/simplecov/compare/v0.8.2...master))
|
2
2
|
====================
|
3
3
|
|
4
|
+
v0.8.2, 2013-11-20 ([changes](https://github.com/colszowka/simplecov/compare/v0.8.1...v0.8.2))
|
5
|
+
=====================
|
6
|
+
|
7
|
+
## Bugfixes
|
8
|
+
|
9
|
+
* Replaced the locking behaviour [via lockfile gem](https://github.com/colszowka/simplecov/pull/185) with
|
10
|
+
plain Ruby explicit file locking when merging results. This should make simplecov merging to behave well
|
11
|
+
on Windows again.
|
12
|
+
See [#258](https://github.com/colszowka/simplecov/issues/258) and
|
13
|
+
[#223](https://github.com/colszowka/simplecov/pull/223) (thanks to @tomykaira)
|
14
|
+
|
4
15
|
v0.8.1, 2013-11-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.8.0...v0.8.1))
|
5
16
|
=====================
|
6
17
|
|
@@ -12,6 +23,8 @@ v0.8.1, 2013-11-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.
|
|
12
23
|
v0.8.0, 2013-11-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.7.1...v0.8.0))
|
13
24
|
=====================
|
14
25
|
|
26
|
+
**Note: Yanked the same day because of the regression that 0.8.1 fixes, see above**
|
27
|
+
|
15
28
|
## TL;DR
|
16
29
|
|
17
30
|
It's been way too long since the last official release 0.7.1, but this was partly due to it proving itself
|
data/CONTRIBUTING.md
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
|
1
|
+
## Reporting Issues
|
2
|
+
|
3
|
+
You can report issues at https://github.com/colszowka/simplecov/issues
|
4
|
+
|
5
|
+
* Search existing issues for your problem, chances are someone else already reported it.
|
6
|
+
* Please make sure you are running the latest version of simplecov. If that is not possible,
|
7
|
+
please specify in your report why you can't update to the latest version.
|
8
|
+
* Include the SimpleCov version you are running in your report.
|
9
|
+
* Include your `ruby -e "puts RUBY_DESCRIPTION"`. Please also specify the gem versions of
|
10
|
+
Rails and your testing framework, if applicable.
|
11
|
+
This is extremely important for narrowing down the cause of your problem.
|
12
|
+
|
13
|
+
Thanks!
|
14
|
+
|
15
|
+
## Making Contributions
|
2
16
|
|
3
17
|
To fetch & test the library for development, do:
|
4
18
|
|
data/README.md
CHANGED
@@ -294,6 +294,22 @@ Defining your own filters is pretty easy: Just inherit from SimpleCov::Filter an
|
|
294
294
|
the filter, a true return value from this method will result in the removal of the given source_file. The filter_argument method
|
295
295
|
is being set in the SimpleCov::Filter initialize method and thus is set to 5 in this example.
|
296
296
|
|
297
|
+
## Default root filter and coverage for things outside of it
|
298
|
+
|
299
|
+
By default, SimpleCov filters everything outside of the `SimpleCov.root` directory. However, sometimes you may want
|
300
|
+
to include coverage reports for things you include as a gem, for example a Rails Engine.
|
301
|
+
|
302
|
+
Here's an example by [@lsaffie](https://github.com/lsaffie) from [#221](https://github.com/colszowka/simplecov/issues/221)
|
303
|
+
that shows how you can achieve just that:
|
304
|
+
|
305
|
+
```ruby
|
306
|
+
SimpleCov.start :rails do
|
307
|
+
filters.clear # This will remove the :root_filter that comes via simplecov's defaults
|
308
|
+
add_filter do |src|
|
309
|
+
!(src.filename =~ /^#{SimpleCov.root}/) unless src.filename =~ /my_engine/
|
310
|
+
end
|
311
|
+
end
|
312
|
+
```
|
297
313
|
|
298
314
|
## Groups
|
299
315
|
|
data/lib/simplecov.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Code coverage for ruby 1.9. Please check out README for a full introduction.
|
3
3
|
#
|
4
|
-
require 'lockfile'
|
5
|
-
|
6
4
|
module SimpleCov
|
7
5
|
class << self
|
8
6
|
attr_accessor :running
|
@@ -47,12 +45,8 @@ module SimpleCov
|
|
47
45
|
# If we're using merging of results, store the current result
|
48
46
|
# first, then merge the results and return those
|
49
47
|
if use_merging
|
50
|
-
|
51
|
-
|
52
|
-
lockfile.lock do
|
53
|
-
SimpleCov::ResultMerger.store_result(@result) if @result
|
54
|
-
return SimpleCov::ResultMerger.merged_result
|
55
|
-
end
|
48
|
+
SimpleCov::ResultMerger.store_result(@result) if @result
|
49
|
+
return SimpleCov::ResultMerger.merged_result
|
56
50
|
else
|
57
51
|
return @result if defined? @result
|
58
52
|
end
|
@@ -13,7 +13,11 @@ module SimpleCov::ResultMerger
|
|
13
13
|
# Loads the cached resultset from YAML and returns it as a Hash
|
14
14
|
def resultset
|
15
15
|
if stored_data
|
16
|
-
|
16
|
+
begin
|
17
|
+
SimpleCov::JSON.parse(stored_data)
|
18
|
+
rescue
|
19
|
+
{}
|
20
|
+
end
|
17
21
|
else
|
18
22
|
{}
|
19
23
|
end
|
@@ -66,6 +70,7 @@ module SimpleCov::ResultMerger
|
|
66
70
|
command_name, data = result.to_hash.first
|
67
71
|
new_set[command_name] = data
|
68
72
|
File.open(resultset_path, "w+") do |f|
|
73
|
+
f.flock(File::LOCK_EX)
|
69
74
|
f.puts SimpleCov::JSON.dump(new_set)
|
70
75
|
end
|
71
76
|
true
|
data/lib/simplecov/version.rb
CHANGED
data/simplecov.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christoph Olszowka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: lockfile
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.1.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 2.1.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: simplecov-html
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|