jsinstrument 0.0.2 → 0.0.3

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.
@@ -7,7 +7,7 @@ include RKelly::Nodes
7
7
  module JSInstrument
8
8
  class Instrumenter
9
9
 
10
- attr_accessor :js_object_name, :upload_url, :project_name, :commit_hash, :batch_text, :data_compress_method
10
+ attr_accessor :js_object_name, :upload_url, :project_name, :commit_hash, :batch_text, :data_compress_method, :src_filename
11
11
 
12
12
  def js_object_name
13
13
  @js_object_name || '__coverage__'
@@ -19,6 +19,7 @@ module JSInstrument
19
19
 
20
20
  def instrument src, filename
21
21
  raise 'Filename not set' unless filename
22
+ self.src_filename = filename
22
23
  ast = RKelly::Parser.new.parse src
23
24
  raise 'Parse source failed.' unless ast
24
25
  ast, instrumented_lines = instrument_ast ast
@@ -29,7 +30,7 @@ module JSInstrument
29
30
  bindings = {
30
31
  js_object_name: self.js_object_name,
31
32
  upload_url: self.upload_url,
32
- src_filename: filename,
33
+ src_filename: self.src_filename,
33
34
  project_name: self.project_name,
34
35
  commit_hash: self.commit_hash,
35
36
  batch_text: self.batch_text,
@@ -1,3 +1,3 @@
1
1
  module JSInstrument
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsinstrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: