covered 0.10.4 → 0.10.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42eca672ae3b6b6589c0022ce5de6b610134c9eb3cf9e4edf3b1fb530e6101ab
4
- data.tar.gz: 558c12dade107d324740f9dfdcc59c125ca0c847779f502f4901c9fb202de72a
3
+ metadata.gz: 3e3b91d1e1b95b11caade1f15c09cff1e0e9e0d198f7b742fd46ff59b465e83f
4
+ data.tar.gz: d367447379742fee41271f512b9e9b0388c53655ecc985c167ba58b0defdd7b3
5
5
  SHA512:
6
- metadata.gz: c1fafd5d915b3e1c3e9f43b568e4564eab02a5049ab65b667bdd39a1ed25294c2a1ddb7d1e424e6b6433ff0d1163d5687a30b731fe6a614bfcb2f40cd25f2c34
7
- data.tar.gz: df90259692dfa61889afce1eda933fed4d37c3974dcc9675bcfa0f91e6dac0fba8c0b87fd7ee1b667157c409e4f058dfde6c8dff1d5f1aecd34826477495b80a
6
+ metadata.gz: '0926c0a0b461e11dd6a4abf83c24dd5c0250241c607aabd114fdb20aae3a1fae1e4d4b96483cc8be68a20053eb48d761e5a5b3b99fd5a4ea44a1890a8ac496dc'
7
+ data.tar.gz: 3d69f523f37c5591a07aa8f0d51eb26bb6c1884efb859c3be203fe31d28811bd959c9befa1df2e6275ace7382cee4adc63dabac6befcfc51a22a0c3e4477d754
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Covered uses modern Ruby features to generate comprehensive coverage, including support for templates which are compiled into Ruby.
4
4
 
5
+ - Incremental coverage - if you run your full test suite, and the run a subset, it will still report the correct coverage - so you can incrementally work on improving coverage.
6
+ - Integration with RSpec, Minitest, Travis & Coveralls - no need to configure anything - out of the box support for these platforms.
7
+ - Supports coverage of views - templates compiled to Ruby code can be tracked for coverage reporting.
8
+
5
9
  ![Screenshot](media/example.png)
6
10
 
7
11
  ## Motivation
@@ -98,20 +98,20 @@ module Covered
98
98
  @name = name
99
99
  end
100
100
 
101
- def call(*args)
101
+ def new
102
102
  begin
103
103
  klass = Covered.const_get(@name)
104
104
  rescue NameError
105
105
  require_relative @name.downcase
106
106
  end
107
107
 
108
- begin
109
- klass = Covered.const_get(@name)
110
-
111
- return klass.new.call(*args)
112
- rescue NameError
113
- warn "Could not find #{name} call Ignoring."
114
- end
108
+ klass = Covered.const_get(@name)
109
+
110
+ return klass.new
111
+ end
112
+
113
+ def call(*args)
114
+ self.new.call(*args)
115
115
  end
116
116
 
117
117
  def to_s
@@ -28,24 +28,12 @@ require 'parser/current'
28
28
  module Covered
29
29
  # The source map, loads the source file, parses the AST to generate which lines contain executable code.
30
30
  class Source < Wrapper
31
- EXECUTABLE = /(.?CALL|.VAR|.ASGN|DEFN)/.freeze
32
-
33
- # Deviate from the standard policy above, because all the files are already loaded, so we skip NODE_FCALL.
34
- DOGFOOD = /(^V?CALL|.VAR|.ASGN|DEFN)/.freeze
35
-
36
- # Ruby trace points don't trigger for argument execution.
37
- # Constants are loaded when the file loads, so they are less interesting.
38
- IGNORE = /(ARGS|CDECL)/.freeze
39
-
40
- def initialize(output, executable: EXECUTABLE, ignore: IGNORE)
31
+ def initialize(output)
41
32
  super(output)
42
33
 
43
34
  @paths = {}
44
35
  @mutex = Mutex.new
45
36
 
46
- @executable = executable
47
- @ignore = ignore
48
-
49
37
  @annotations = {}
50
38
  end
51
39
 
@@ -48,6 +48,8 @@ module Covered
48
48
 
49
49
  def print(output)
50
50
  output.puts "* #{count} files checked; #{executed_count}/#{executable_count} lines executed; #{percentage.to_f.round(2)}% covered."
51
+
52
+ # Could output funny message here, especially for 100% coverage.
51
53
  end
52
54
  end
53
55
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Covered
22
- VERSION = "0.10.4"
22
+ VERSION = "0.10.5"
23
23
  end
@@ -52,10 +52,6 @@ module Covered
52
52
 
53
53
  attr :output
54
54
 
55
- def mark(path, lineno, value)
56
- @output.mark(path, lineno, value)
57
- end
58
-
59
55
  def enable
60
56
  @output.enable
61
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covered
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams