simplecov-parallel 0.1.0 → 0.1.1
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 +11 -0
- data/Gemfile +4 -0
- data/README.md +6 -1
- data/lib/simplecov/parallel/adapter/circleci.rb +15 -13
- data/lib/simplecov/parallel/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fdc5794fb5634ad9c97afcdf6783daf7d1220cd
|
4
|
+
data.tar.gz: 055eb756b87784b13681d0fc9bcf54bc3558f30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca8662037eed8bce87500d0c9958506b76599d291cb9098e03fb7c7c770f5ac6e9193d72d02bf96d0f342ba308a2b223e0546d2ac29a72af9163dfb8b8a4c8d6
|
7
|
+
data.tar.gz: 4bd82d8cb9c78f9ef55d7f4a115bb795ef14313c330fa8a7f4a9b6ec8f19b52ead689a58e654f98f34d75d505bcd1893d6b104ede5c7d0fcd999c05e1e9e0b49
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
[](http://badge.fury.io/rb/simplecov-parallel)
|
2
|
+
[](https://gemnasium.com/increments/simplecov-parallel)
|
3
|
+
[](https://circleci.com/gh/increments/simplecov-parallel)
|
4
|
+
[](https://codeclimate.com/github/increments/simplecov-parallel)
|
5
|
+
|
1
6
|
# SimpleCov::Parallel
|
2
7
|
|
3
|
-
**SimpleCov::Parallel** is a SimpleCov extension for parallelism support.
|
8
|
+
**SimpleCov::Parallel** is a [SimpleCov](https://github.com/colszowka/simplecov) extension for parallelism support.
|
4
9
|
Currently only [CircleCI parallelism](https://circleci.com/docs/parallelism/) is supported.
|
5
10
|
|
6
11
|
## Installation
|
@@ -59,7 +59,7 @@ module SimpleCov
|
|
59
59
|
def merge_slave_node_results
|
60
60
|
Dir.glob('node*') do |node_dir|
|
61
61
|
results = load_results_from_dir(node_dir)
|
62
|
-
|
62
|
+
merge_and_save_results(results)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -69,10 +69,8 @@ module SimpleCov
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
73
|
-
|
74
|
-
results.each { |result| SimpleCov::ResultMerger.store_result(result) }
|
75
|
-
end
|
72
|
+
def merge_and_save_results(results)
|
73
|
+
results.each { |result| SimpleCov::ResultMerger.store_result(result) }
|
76
74
|
end
|
77
75
|
|
78
76
|
def with_changing_resultset_path(dir)
|
@@ -80,15 +78,19 @@ module SimpleCov
|
|
80
78
|
# SimpleCov.root and SimpleCov.coverage_dir does not work well because .root is used in
|
81
79
|
# the root filter, which is invoked from SimpleCov::Result#initialize.
|
82
80
|
# https://github.com/colszowka/simplecov/blob/v0.12.0/lib/simplecov/defaults.rb#L9
|
83
|
-
|
84
|
-
|
85
|
-
SimpleCov::ResultMerger.
|
86
|
-
|
81
|
+
method_name = :resultset_path
|
82
|
+
original_method = SimpleCov::ResultMerger.method(method_name)
|
83
|
+
singleton_class = SimpleCov::ResultMerger.singleton_class
|
84
|
+
|
85
|
+
singleton_class.__send__(:undef_method, method_name)
|
86
|
+
singleton_class.__send__(:define_method, method_name) { File.join(dir, '.resultset.json') }
|
87
|
+
|
88
|
+
begin
|
89
|
+
yield
|
90
|
+
ensure
|
91
|
+
singleton_class.__send__(:undef_method, method_name)
|
92
|
+
singleton_class.__send__(:define_method, method_name, original_method)
|
87
93
|
end
|
88
|
-
|
89
|
-
yield
|
90
|
-
ensure
|
91
|
-
unbound_method.bind(SimpleCov::ResultMerger)
|
92
94
|
end
|
93
95
|
|
94
96
|
def current_node
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov-parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Nakayama
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- ".gitignore"
|
63
63
|
- ".rspec"
|
64
64
|
- ".rubocop.yml"
|
65
|
+
- CHANGELOG.md
|
65
66
|
- Gemfile
|
66
67
|
- LICENSE.txt
|
67
68
|
- README.md
|