emma 0.0.1 → 0.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.
@@ -5,7 +5,7 @@ require 'tmpdir'
5
5
 
6
6
  def unpack_war(path)
7
7
  destination = Dir.mktmpdir("emma-unzip")
8
-
8
+
9
9
  Dir.chdir destination do
10
10
  proc = ChildProcess.new("jar", "xf", path)
11
11
  proc.io.inherit!
@@ -9,8 +9,14 @@ module Emma
9
9
  @ec = opts[:coverage_file] || Tempfile.new("emma-coverage").path
10
10
  end
11
11
 
12
- def get
13
- emma "ctl", "-c" "coverage.get,#{@ec},true,true"
12
+ def get(opts = {})
13
+ merge = true
14
+ merge = opts[:merge] if opts.key? :merge
15
+
16
+ stop_collection = false
17
+ stop_collection = opts[:stop_collection] if opts.key? :stop_collection
18
+
19
+ emma "ctl", "-c", "coverage.get,#{@ec},#{merge},#{stop_collection}"
14
20
  end
15
21
 
16
22
  def report(opts = {})
@@ -24,6 +30,7 @@ module Emma
24
30
  end
25
31
 
26
32
  def instrument(paths, opts = {})
33
+ paths = Array(paths)
27
34
  mode = opts[:mode] || 'fullcopy'
28
35
  filter = opts[:filter] || '*'
29
36
 
@@ -34,6 +41,7 @@ module Emma
34
41
  '-outfile', @em,
35
42
  '-merge', 'yes',
36
43
  '-filter', filter,
44
+ '-verbose',
37
45
  *inputs
38
46
  end
39
47
 
@@ -1,3 +1,3 @@
1
1
  module Emma
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emma
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jari Bakken