covered 0.14.0 → 0.14.1

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: a7debea47cf0febb50f3f84e0f081011000920a6e2946b500034321a4f854054
4
- data.tar.gz: c4dec696971409a1b58ba3b1f6b6d07f7af8f1c121def0d764ee4ccad7a0487b
3
+ metadata.gz: 65050cba58d4c4af27b6361adb1e398d7cc17190f5cd9f437b75ebe551fd47d9
4
+ data.tar.gz: 9e27906a329ce6748ef8023ba4ef7e14747ca612516052396369cd23798ae2be
5
5
  SHA512:
6
- metadata.gz: 491d65f3c87087ced3a3767ec14e3e82fddc99d539fd249ec9615f31386b13f97061f9befc97cc5ab700793a42205ae71d212711f7e9472864a392b41970da00
7
- data.tar.gz: 48b62e8ff991ae8046aca2a70508a677497748fbd6d6665e09ce9e42055a9ccf42c8212461dad7556014e1a3c8328fbeaf2049259dce670e54a33a34dccf45d3
6
+ metadata.gz: f2e15acaf1a9ccf76fca83a1fe9c2b0d5189b32ce60e9b2583b0f87a5c8296575f1669d96b9dddffaf9e9cc7d5ebd2192f675665c6f55ef73176eeb50bf2251d
7
+ data.tar.gz: 64e9dff68ef4a4efee7e903aff00ce60358a3c15853e487009c56828bffa1f510a2d0dd762b08973fc58ccccb948179aa5787badd4ffed07a094d1ccaaf5a721
checksums.yaml.gz.sig CHANGED
Binary file
@@ -5,28 +5,30 @@ on:
5
5
  branches:
6
6
  - main
7
7
 
8
+ env:
9
+ BUNDLE_WITH: maintenance
10
+
8
11
  jobs:
9
12
  deploy:
10
13
  runs-on: ubuntu-latest
11
14
 
12
15
  steps:
13
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v3
17
+
14
18
  - uses: ruby/setup-ruby@v1
15
- env:
16
- BUNDLE_WITH: maintenance
17
19
  with:
18
- ruby-version: 3.0
20
+ ruby-version: 3.1
19
21
  bundler-cache: true
20
22
 
21
23
  - name: Installing packages
22
24
  run: sudo apt-get install wget
23
25
 
26
+ - name: Prepare GitHub Pages
27
+ run: bundle exec bake github:pages:prepare --directory docs
28
+
24
29
  - name: Generate documentation
25
30
  timeout-minutes: 5
26
- run: bundle exec bake utopia:project:static
31
+ run: bundle exec bake utopia:project:static --force no
27
32
 
28
- - name: Deploy documentation
29
- uses: JamesIves/github-pages-deploy-action@4.0.0
30
- with:
31
- branch: docs
32
- folder: docs
33
+ - name: Deploy GitHub Pages
34
+ run: bundle exec bake github:pages:commit --directory docs
Binary file
Binary file
@@ -28,9 +28,13 @@ module Covered
28
28
  super(output)
29
29
 
30
30
  begin
31
- @trace = TracePoint.new(:line, :call, :c_call) do |event|
32
- if path = event.path
33
- @output.mark(path, event.lineno, 1)
31
+ @trace = TracePoint.new(:line, :call, :c_call) do |trace|
32
+ if trace.event == :call
33
+ # Ruby doesn't always mark call-sites in sub-expressions, so we use this approach to compute a call site and mark it:
34
+ location = caller_locations(2, 1).first
35
+ @output.mark(location.path, location.lineno, 1)
36
+ elsif path = trace.path
37
+ @output.mark(path, trace.lineno, 1)
34
38
  end
35
39
  end
36
40
  rescue
@@ -63,7 +63,7 @@ module Covered
63
63
  return unless File.exist?(@path)
64
64
 
65
65
  # Load existing coverage information and mark all files:
66
- File.open(@path, "r") do |file|
66
+ File.open(@path, "rb") do |file|
67
67
  file.flock(File::LOCK_SH)
68
68
 
69
69
  make_unpacker(file).each(&self.method(:apply))
@@ -72,7 +72,7 @@ module Covered
72
72
 
73
73
  def save!(path = @path)
74
74
  # Dump all coverage:
75
- File.open(@path, "w") do |file|
75
+ File.open(@path, "wb") do |file|
76
76
  file.flock(File::LOCK_EX)
77
77
 
78
78
  packer = make_packer(file)
@@ -35,10 +35,16 @@ module Covered
35
35
  @annotations = {}
36
36
 
37
37
  begin
38
- @trace = TracePoint.new(:script_compiled) do |event|
39
- if path = event.instruction_sequence.path and source = event.eval_script
40
- @mutex.synchronize do
41
- @paths[path] = source
38
+ @trace = TracePoint.new(:script_compiled) do |trace|
39
+ instruction_sequence = trace.instruction_sequence
40
+
41
+ # We only track source files which begin at line 1, as these represent whole files instead of monkey patches.
42
+ if instruction_sequence.first_lineno <= 1
43
+ # Extract the source path and source itself and save it for later:
44
+ if path = instruction_sequence.path and source = trace.eval_script
45
+ @mutex.synchronize do
46
+ @paths[path] = source
47
+ end
42
48
  end
43
49
  end
44
50
  end
@@ -73,13 +79,17 @@ module Covered
73
79
  def expand(node, coverage, level = 0)
74
80
  if node.is_a? Parser::AST::Node
75
81
  if ignore?(node)
76
- coverage.annotate(node.location.line, "ignoring #{node.type}")
82
+ # coverage.annotate(node.location.line, "ignoring #{node.type}")
77
83
  else
78
84
  if executable?(node)
79
- # coverage.annotate(node.first_lineno, "executable #{node.type}")
85
+ # coverage.annotate(node.location.line, "executable #{node.type}")
80
86
  coverage.counts[node.location.line] ||= 0
81
- else
82
- # coverage.annotate(node.first_lineno, "not executable #{node.type}")
87
+ elsif node.location
88
+ # coverage.annotate(node.location.line, "not executable #{node.type}") rescue nil
89
+ end
90
+
91
+ if node.type == :send
92
+ # coverage.annotate(node.location.line, "ignoring #{node.type} children")
83
93
  end
84
94
 
85
95
  expand(node.children, coverage, level + 1)
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Covered
22
- VERSION = "0.14.0"
22
+ VERSION = "0.14.1"
23
23
  end
data/media/.DS_Store ADDED
Binary file
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,10 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covered
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Cyril Roelandt
9
+ - Shannon Skipper
10
+ - chocolateboy
8
11
  autorequire:
9
12
  bindir: bin
10
13
  cert_chain:
@@ -36,7 +39,7 @@ cert_chain:
36
39
  RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
37
40
  HiLJ8VOFx6w=
38
41
  -----END CERTIFICATE-----
39
- date: 2021-10-26 00:00:00.000000000 Z
42
+ date: 2022-06-11 00:00:00.000000000 Z
40
43
  dependencies:
41
44
  - !ruby/object:Gem::Dependency
42
45
  name: async-rest
@@ -70,16 +73,16 @@ dependencies:
70
73
  name: msgpack
71
74
  requirement: !ruby/object:Gem::Requirement
72
75
  requirements:
73
- - - ">="
76
+ - - "~>"
74
77
  - !ruby/object:Gem::Version
75
- version: '0'
78
+ version: '1.0'
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
- - - ">="
83
+ - - "~>"
81
84
  - !ruby/object:Gem::Version
82
- version: '0'
85
+ version: '1.0'
83
86
  - !ruby/object:Gem::Dependency
84
87
  name: parser
85
88
  requirement: !ruby/object:Gem::Requirement
@@ -110,32 +113,18 @@ dependencies:
110
113
  version: '0'
111
114
  - !ruby/object:Gem::Dependency
112
115
  name: minitest
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: rake
127
116
  requirement: !ruby/object:Gem::Requirement
128
117
  requirements:
129
118
  - - "~>"
130
119
  - !ruby/object:Gem::Version
131
- version: '10.0'
120
+ version: '5.0'
132
121
  type: :development
133
122
  prerelease: false
134
123
  version_requirements: !ruby/object:Gem::Requirement
135
124
  requirements:
136
125
  - - "~>"
137
126
  - !ruby/object:Gem::Version
138
- version: '10.0'
127
+ version: '5.0'
139
128
  - !ruby/object:Gem::Dependency
140
129
  name: rspec
141
130
  requirement: !ruby/object:Gem::Requirement
@@ -172,6 +161,7 @@ extra_rdoc_files: []
172
161
  files:
173
162
  - ".github/workflows/development.yml"
174
163
  - ".github/workflows/documentation.yml"
164
+ - examples/coverage/.DS_Store
175
165
  - examples/coverage/covered.rb
176
166
  - examples/coverage/erb/.covered.db
177
167
  - examples/coverage/erb/coverage.rb
@@ -196,6 +186,7 @@ files:
196
186
  - lib/covered/summary.rb
197
187
  - lib/covered/version.rb
198
188
  - lib/covered/wrapper.rb
189
+ - media/.DS_Store
199
190
  - media/example.png
200
191
  homepage: https://github.com/ioquatix/covered
201
192
  licenses:
metadata.gz.sig CHANGED
Binary file