rubysl-coverage 2.0.3 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62ec313867f69eb98cad0ba489c6d3659dbc6179
4
- data.tar.gz: 43c8ece8151e251920702f1bb46a8b8336d24014
3
+ metadata.gz: b07b48fd5302b2376c4b0fd21681a3a4be5b1ccc
4
+ data.tar.gz: 6e3d902933d4ac2cba4ba7fa54753fa29e79214d
5
5
  SHA512:
6
- metadata.gz: 58808244f3f18dcb819ad0558ba58dc964429b24260537df3a8305a4eff2a7ad76dea1668237d98531e23c1737e5a3f6e58252f14342df2f90100fa85482da8e
7
- data.tar.gz: b6059530261d2438362b312c70d85da71484bd893396a9c26c42ded1c3aa76e42a2ffc691f6301f3d13915b4d1b780bd44059ee08a66c19ed8c3f5cd64e9eeff
6
+ metadata.gz: cc34f06b1657741c090cdb914b9dbb886597abcac26116e4d987a5a93c517d1fe4825b219a50d6df5ebdc613586b8edcf4e41a6621d6e38ca88309b46490f270
7
+ data.tar.gz: fb0b87d9422ec0a17c06c77b7d9cf8506261ccd4419f9582003c93ac2301f8db693e3f50967e5b4d24e2ca7c0fa22583767169aff2ac3d98017d5ac6696cd52a
@@ -1,9 +1,14 @@
1
1
  language: ruby
2
- before_install:
3
- - rvm use $RVM --install --binary --fuzzy
4
- - gem update --system
5
- - gem --version
6
- - gem install rubysl-bundler
7
2
  env:
8
- - RVM=rbx-nightly-d21 RUBYLIB=lib
9
- script: bundle exec mspec spec
3
+ - RUBYLIB=lib
4
+ - RUBYLIB=
5
+ script: mspec spec
6
+ rvm:
7
+ - 2.0.0
8
+ - rbx-2.2.1
9
+ matrix:
10
+ exclude:
11
+ - rvm: 2.0.0
12
+ env: RUBYLIB=lib
13
+ - rvm: rbx-2.2.1
14
+ env: RUBYLIB=
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.
@@ -1,55 +1,22 @@
1
+ require "rubinius/coverage"
2
+
1
3
  module Coverage
2
- @coverage_tool = nil
4
+ @coverage_generator = nil
3
5
 
4
6
  def self.start
5
- require 'rubinius/coverage'
6
-
7
- @coverage_tool = Rubinius::Coverage.new
8
- @coverage_tool.start
7
+ @coverage_generator = Rubinius::Coverage.new
8
+ @coverage_generator.start
9
9
  end
10
10
 
11
11
  def self.result
12
- return unless @coverage_tool
13
-
14
- map = @coverage_tool.stop.results
15
-
16
- kernel = File.dirname Rubinius::KERNEL_PATH
17
-
18
- coverage = Hash.new { |h, k| h[k] = [] }
19
-
20
- map.each do |id, attr|
21
- counts = attr[:counts]
22
- code = attr[:code]
23
- next unless code
24
-
25
- file = code.file.to_s
26
- next if file[0] == ?(
27
- file = File.join kernel, file unless file[0] == ?/
28
-
29
- code.lines.to_a.drop(1).each_slice(2) do |line, _|
30
- next unless line > 0
31
- next if coverage[file][line - 1]
32
-
33
- coverage[file][line - 1] = 0
34
- end
35
-
36
- counts.each do |ip, count|
37
- line = code.line_from_ip(ip)
38
- next unless line > 0
39
-
40
- coverage[file][line - 1] = count
41
- end
42
- end
43
-
44
- coverage.each do |file, counts|
45
- next unless File.exists? file
46
-
47
- lines = File.open(file, "r") { |f| f.lines.count }
48
- next unless lines > 0
49
-
50
- counts[lines - 1] = nil unless counts.size == lines
12
+ if @coverage_generator
13
+ @coverage_generator.result
14
+ else
15
+ {}
51
16
  end
17
+ end
52
18
 
53
- coverage
19
+ class << self
20
+ alias_method :peek_result, :result
54
21
  end
55
22
  end
@@ -1,5 +1,5 @@
1
1
  module RubySL
2
2
  module Coverage
3
- VERSION = "2.0.3"
3
+ VERSION = "2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,22 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubysl-coverage
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: '2.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-06 00:00:00.000000000 Z
11
+ date: 2016-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '1.3'
19
+ name: bundler
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -25,12 +25,12 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
32
  version: '10.0'
33
+ name: rake
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,12 +39,12 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: mspec
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
46
  version: '1.5'
47
+ name: mspec
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -53,12 +53,12 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.5'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rubysl-prettyprint
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - "~>"
60
59
  - !ruby/object:Gem::Version
61
60
  version: '2.0'
61
+ name: rubysl-prettyprint
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,6 +77,7 @@ files:
77
77
  - ".travis.yml"
78
78
  - Gemfile
79
79
  - LICENSE
80
+ - MRI_LICENSE
80
81
  - README.md
81
82
  - Rakefile
82
83
  - lib/coverage.rb
@@ -104,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
105
  version: '0'
105
106
  requirements: []
106
107
  rubyforge_project:
107
- rubygems_version: 2.0.7
108
+ rubygems_version: 2.6.2
108
109
  signing_key:
109
110
  specification_version: 4
110
111
  summary: Ruby standard library coverage.
111
112
  test_files: []
112
- has_rdoc: