deep-cover 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/lib/deep_cover/cli/exec.rb +2 -1
- data/lib/deep_cover/node/mixin/has_child.rb +4 -0
- data/lib/deep_cover/node/mixin/has_child_handler.rb +1 -1
- data/lib/deep_cover/node/send.rb +2 -2
- data/lib/deep_cover/reporter/html/index.rb +1 -0
- data/lib/deep_cover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5f726d4e86e7bdf1a301c27d84dc8e7c0ffc783
|
4
|
+
data.tar.gz: 8af350ceda402ac91ee6f2d94c17307098a56583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc37d5e63f7a6d9c2bc9327e45cdb692f5ddcf7312241432e4e2907e54a964b3a75c93d713bcaa55d9be6e785e07a1d2cf015b15f0c59e949149461429f8bd55
|
7
|
+
data.tar.gz: b0c2e47f27f3240f3bb5787130ab0851953b9e29d3ead7070cb2e16c42bbc3aa08dd313e9d9ce259eb56e03fed3367aefae366489643f353397e34d67e9ea246
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ First we present the official way. There are also quick and dirty ways to try `d
|
|
82
82
|
|
83
83
|
For a standalone project (Rails app), add `deep-cover` to your Gemfile:
|
84
84
|
|
85
|
-
gem 'deep-cover', '~> 0.4', group: :test
|
85
|
+
gem 'deep-cover', '~> 0.4', group: :test, require: false
|
86
86
|
|
87
87
|
Then run `bundle`
|
88
88
|
|
@@ -142,7 +142,7 @@ It also uses our builtin HTML reporter. Check the produced `coverage/index.html`
|
|
142
142
|
|
143
143
|
To make it easier to transition for projects already using the builtin `Coverage` library (or indirectly those using `SimpleCov`), there is a way to overwrite the `Coverage` library using `deep-cover`'s extended coverage.
|
144
144
|
|
145
|
-
Add to your Gemfile `gem 'deep-cover'`, then run `bundle`.
|
145
|
+
Add to your Gemfile `gem 'deep-cover', require: false`, then run `bundle`.
|
146
146
|
|
147
147
|
Before you require `coverage` or `simplecov`, do a `require 'deep_cover/builtin_takeover'`.
|
148
148
|
|
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ require 'rspec/core/rake_task'
|
|
5
5
|
require 'rubocop/rake_task'
|
6
6
|
|
7
7
|
RuboCop::RakeTask.new(:rubocop) do |t|
|
8
|
-
t.options = ['-a']
|
8
|
+
t.options = ['-a'] unless ENV['TRAVIS']
|
9
9
|
end
|
10
10
|
|
11
11
|
RSpec::Core::RakeTask.new(:spec).tap { |task| task.pattern = 'spec/*_spec.rb, spec/*/*_spec.rb' }
|
data/lib/deep_cover/cli/exec.rb
CHANGED
@@ -17,7 +17,8 @@ module DeepCover
|
|
17
17
|
require 'yaml'
|
18
18
|
require_relative '../backports'
|
19
19
|
env_var = {'DEEP_COVER' => 't',
|
20
|
-
'DEEP_COVER_OPTIONS' => YAML.dump(@options.slice(*DEFAULTS.keys))
|
20
|
+
'DEEP_COVER_OPTIONS' => YAML.dump(@options.slice(*DEFAULTS.keys)),
|
21
|
+
}
|
21
22
|
|
22
23
|
system(env_var, *@argv)
|
23
24
|
end
|
@@ -21,6 +21,10 @@ module DeepCover
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
def child_index_to_name(index)
|
25
|
+
self.class.child_index_to_name(index, children.size)
|
26
|
+
end
|
27
|
+
|
24
28
|
module ClassMethods
|
25
29
|
def has_child(rest_: false, refine_: false, **args)
|
26
30
|
raise "Needs exactly one custom named argument, got #{args.size}" if args.size != 1
|
@@ -8,7 +8,7 @@ module DeepCover
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def call_child_handler(template, child, child_name = nil)
|
11
|
-
child_name ||= self.
|
11
|
+
child_name ||= self.child_index_to_name(child.index)
|
12
12
|
method_name = format(template, name: child_name)
|
13
13
|
if respond_to?(method_name)
|
14
14
|
args = [child, child_name]
|
data/lib/deep_cover/node/send.rb
CHANGED
@@ -72,7 +72,7 @@ module DeepCover
|
|
72
72
|
include ExecutedAfterChildren
|
73
73
|
|
74
74
|
def has_block?
|
75
|
-
parent.
|
75
|
+
parent.has_block?
|
76
76
|
end
|
77
77
|
|
78
78
|
def rewrite
|
@@ -123,7 +123,7 @@ module DeepCover
|
|
123
123
|
executed_loc_keys :dot
|
124
124
|
|
125
125
|
def has_block?
|
126
|
-
parent.is_a?(Block)
|
126
|
+
parent.is_a?(Block) && parent.child_index_to_name(index) == :call
|
127
127
|
end
|
128
128
|
|
129
129
|
def rewrite
|
data/lib/deep_cover/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep-cover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Lafortune
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parser
|