coveralls-multi 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 7b04e9b5d7ecc3c348db9b1f3c84e6a743d2ae8546b62b720a7561e557f9ab9c
4
- data.tar.gz: feac37cb27c4c0fbc4d4ba9c569b76d30ff89716b3f1ad4808a15429b843bce7
3
+ metadata.gz: 5bacb5677db7e69632b37ed957e6c8b81593cc564d88fc7784f39d0188474a0f
4
+ data.tar.gz: 50c58e18f4a5880c99f610edc7d8728e34c6d10a9cd516914d8e97ed248b2be8
5
5
  SHA512:
6
- metadata.gz: 2c052856e833c6b3641230f55a74abe5b6c615d179c7f056c5d68f158288af34c0c4235aa4636bfb0f7d0bcb879b882c7dd42ef1985fedf73a43f9505a9f928e
7
- data.tar.gz: a04a53fa820c79d96224d2f2fb9ab6eed932abf0d4904ea1dc4d893d4b07b13489b3e289059e7a4080022f9e50d94c6fd111c9c1156fe881589b250f2712ea9f
6
+ metadata.gz: 946f1fee4d5b776d6fe839c7d42a43f992853955cec541d8c205713bbeb228266ad77d98e8e8f342a24baa3bad17774a82d9d775397f9d3c1424207f50ea636a
7
+ data.tar.gz: 2e32fc721bb8a6c3b1c4e62d4cecf6532599ccf0334c51869e22f7011447f91979c002d466d70c902ac7bca9eaa0d1e532644f75eb6c72f53fad4703801df67d
data/.gitignore CHANGED
@@ -11,3 +11,7 @@
11
11
 
12
12
  # rspec failure tracking
13
13
  .rspec_status
14
+
15
+ # Exclude Gemfile.lock, because it should not be checked into / included in
16
+ # built gems
17
+ /Gemfile.lock
data/bin/test CHANGED
File without changes
@@ -13,7 +13,7 @@ module CoverallsMulti
13
13
  end
14
14
 
15
15
  def debug_mode
16
- yaml_config['debug_mode'] && yaml_config['debug_mode'] == 'true'
16
+ yaml_config['debug_mode'] && yaml_config['debug_mode'] == true
17
17
  end
18
18
 
19
19
  def yaml_config
@@ -2,6 +2,7 @@ require 'digest/md5'
2
2
  require 'json'
3
3
 
4
4
  # require individual formatters here
5
+ require 'coveralls-multi/formatters/excoveralls'
5
6
  require 'coveralls-multi/formatters/lcov'
6
7
  require 'coveralls-multi/formatters/simplecov'
7
8
 
@@ -0,0 +1,16 @@
1
+ require 'json'
2
+
3
+ module CoverallsMulti
4
+ class Formatter
5
+ # formats excoveralls JSON output files
6
+ # before merge + push to Coveralls
7
+ class Excoveralls
8
+ def run(file_path)
9
+ file = CoverallsMulti::Formatter.parse_json(file_path)
10
+ file['source_files']
11
+ rescue StandardError => e
12
+ raise e, "There was a problem converting the excoveralls file at #{file_path}"
13
+ end
14
+ end
15
+ end
16
+ end
@@ -16,14 +16,16 @@ module CoverallsMulti
16
16
 
17
17
  source_files = []
18
18
  begin
19
- file['RSpec']['coverage'].each do |filename, coverage|
20
- properties = {}
19
+ file.keys.each do |test_suite_key|
20
+ file[test_suite_key]['coverage'].each do |filename, coverage|
21
+ properties = {}
21
22
 
22
- properties['source'] = File.open(filename, 'rb:utf-8').read
23
- properties['name'] = format_short_filename(filename)
24
- properties['coverage'] = coverage
23
+ properties['source'] = File.open(filename, 'rb:utf-8').read
24
+ properties['name'] = format_short_filename(filename)
25
+ properties['coverage'] = coverage
25
26
 
26
- source_files << properties
27
+ source_files << properties
28
+ end
27
29
  end
28
30
  rescue StandardError => e
29
31
  raise e, "There was a problem formatting the simplecov report at #{file_path}"
@@ -21,7 +21,7 @@ module CoverallsMulti
21
21
  return unless CoverallsMulti::Config.debug_mode
22
22
 
23
23
  output_file_path = "#{CoverallsMulti::Config.root}/coveralls.json"
24
- puts "Writing results to #{output_file_path}"
24
+ puts "Debug mode on - writing results to #{output_file_path}"
25
25
  File.write(output_file_path, JSON.pretty_generate(payload))
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  module CoverallsMulti
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coveralls-multi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - CJ Horton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-06 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -123,7 +123,6 @@ files:
123
123
  - ".travis.yml"
124
124
  - CODE_OF_CONDUCT.md
125
125
  - Gemfile
126
- - Gemfile.lock
127
126
  - LICENSE.txt
128
127
  - README.md
129
128
  - Rakefile
@@ -135,6 +134,7 @@ files:
135
134
  - lib/coveralls-multi.rb
136
135
  - lib/coveralls-multi/config.rb
137
136
  - lib/coveralls-multi/formatter.rb
137
+ - lib/coveralls-multi/formatters/excoveralls.rb
138
138
  - lib/coveralls-multi/formatters/lcov.rb
139
139
  - lib/coveralls-multi/formatters/simplecov.rb
140
140
  - lib/coveralls-multi/runner.rb
@@ -1,62 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- coveralls-multi (1.0.0)
5
- coveralls (~> 0.8.21)
6
- coveralls-lcov (~> 1.5.1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- coderay (1.1.2)
12
- coveralls (0.8.21)
13
- json (>= 1.8, < 3)
14
- simplecov (~> 0.14.1)
15
- term-ansicolor (~> 1.3)
16
- thor (~> 0.19.4)
17
- tins (~> 1.6)
18
- coveralls-lcov (1.5.1)
19
- diff-lcs (1.3)
20
- docile (1.1.5)
21
- json (2.1.0)
22
- method_source (0.9.0)
23
- pry (0.11.3)
24
- coderay (~> 1.1.0)
25
- method_source (~> 0.9.0)
26
- rake (10.5.0)
27
- rspec (3.7.0)
28
- rspec-core (~> 3.7.0)
29
- rspec-expectations (~> 3.7.0)
30
- rspec-mocks (~> 3.7.0)
31
- rspec-core (3.7.1)
32
- rspec-support (~> 3.7.0)
33
- rspec-expectations (3.7.0)
34
- diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.7.0)
36
- rspec-mocks (3.7.0)
37
- diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.7.0)
39
- rspec-support (3.7.1)
40
- simplecov (0.14.1)
41
- docile (~> 1.1.0)
42
- json (>= 1.8, < 3)
43
- simplecov-html (~> 0.10.0)
44
- simplecov-html (0.10.2)
45
- term-ansicolor (1.6.0)
46
- tins (~> 1.0)
47
- thor (0.19.4)
48
- tins (1.16.3)
49
-
50
- PLATFORMS
51
- ruby
52
-
53
- DEPENDENCIES
54
- bundler (~> 1.16)
55
- coveralls-multi!
56
- pry (~> 0.11.3)
57
- rake (~> 10.0)
58
- rspec (~> 3.0)
59
- simplecov (~> 0.14.1)
60
-
61
- BUNDLED WITH
62
- 1.16.1