covered 0.15.0 → 0.15.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: 21a316a4045662e72cde0fa4d4c7fc433597cbb25790965fb3f0eaa341f994bb
4
- data.tar.gz: af7e1f193caa3ca359ee1e9dabc61019accf5ab3ca24758271937add2b93f8bc
3
+ metadata.gz: 8b53c13ab215d5a93f7a092321dc70b8538909a76da3e841b8ce6c2f8a7fcdc3
4
+ data.tar.gz: 6f01972bf2729eb4549612acfe8dc7ad37bb8aaf927460257ae4a060cee8e001
5
5
  SHA512:
6
- metadata.gz: cc6b308b9360bbd6db4180e92cc00fb1af462492fffc59d6c0b6b45a00f8f388a06d13e5b4d235e2fc74eea9950be34fac291111e0a1b096e98c5673acfd5948
7
- data.tar.gz: 361693de63a9e20e8dd1181ffac6a27d0bf1e3b7c19828f3e5a8fd762a38917e8fd8268d2922116ed1026cab131836ed9300321e3f256623f05176313a5beaba
6
+ metadata.gz: bde94163994801bf64fd7a61014361c754f7c18be4f766eb2728d93b8ff01c83ffc1bcc0917346d10ec720d95aa3c15eae208e3ebbec56c97ca394843dc715f3
7
+ data.tar.gz: 3ccfcc2ae535e65a6ca0de483c5a150104f1e414f9a5679d9e0d9b63420b9416db28df6e24cf5aaeb6d2a964d70af3d3828823eb35523b4ea240fd4b3872b66c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,25 @@
1
+
2
+ def initialize(context)
3
+ super
4
+
5
+ require_relative '../../lib/covered/policy/default'
6
+ end
7
+
8
+ # Validate the coverage of multiple test runs.
9
+ # @parameter paths [Array(String)] The coverage database paths.
10
+ # @parameter minumum [Float] The minimum required coverage in order to pass.
11
+ def validate(paths: nil, minimum: 1.0)
12
+ paths&.each do |path|
13
+ Covered::Persist.new($covered.output, path).load!
14
+ end
15
+
16
+ $covered.flush
17
+
18
+ statistics = Covered::Statistics.new
19
+
20
+ $covered.each do |coverage|
21
+ statistics << coverage
22
+ end
23
+
24
+ statistics.validate!(minimum)
25
+ end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Covered
22
- VERSION = "0.15.0"
22
+ VERSION = "0.15.1"
23
23
  end
data.tar.gz.sig CHANGED
Binary file
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.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -159,15 +159,7 @@ executables: []
159
159
  extensions: []
160
160
  extra_rdoc_files: []
161
161
  files:
162
- - ".github/workflows/development.yml"
163
- - ".github/workflows/documentation.yml"
164
- - examples/coverage/covered.rb
165
- - examples/coverage/erb/coverage.rb
166
- - examples/coverage/erb/template.erb
167
- - examples/coverage/parser.rb
168
- - examples/coverage/simplecov.rb
169
- - examples/coverage/test.rb
170
- - examples/coverage/tracepoint.rb
162
+ - bake/covered/validate.rb
171
163
  - lib/covered.rb
172
164
  - lib/covered/cache.rb
173
165
  - lib/covered/capture.rb
@@ -185,7 +177,6 @@ files:
185
177
  - lib/covered/summary.rb
186
178
  - lib/covered/version.rb
187
179
  - lib/covered/wrapper.rb
188
- - media/example.png
189
180
  homepage: https://github.com/ioquatix/covered
190
181
  licenses:
191
182
  - MIT
metadata.gz.sig CHANGED
Binary file
@@ -1,45 +0,0 @@
1
- name: Development
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- test:
7
- name: ${{matrix.ruby}} on ${{matrix.os}}
8
- runs-on: ${{matrix.os}}-latest
9
- continue-on-error: ${{matrix.experimental}}
10
-
11
- strategy:
12
- matrix:
13
- os:
14
- - ubuntu
15
- - macos
16
-
17
- ruby:
18
- - "2.6"
19
- - "2.7"
20
- - "3.0"
21
-
22
- experimental: [false]
23
- env: [""]
24
-
25
- include:
26
- - os: ubuntu
27
- ruby: truffleruby
28
- experimental: true
29
- - os: ubuntu
30
- ruby: jruby
31
- experimental: true
32
- - os: ubuntu
33
- ruby: head
34
- experimental: true
35
-
36
- steps:
37
- - uses: actions/checkout@v2
38
- - uses: ruby/setup-ruby@v1
39
- with:
40
- ruby-version: ${{matrix.ruby}}
41
- bundler-cache: true
42
-
43
- - name: Run tests
44
- timeout-minutes: 5
45
- run: ${{matrix.env}} bundle exec rspec
@@ -1,34 +0,0 @@
1
- name: Documentation
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- env:
9
- BUNDLE_WITH: maintenance
10
-
11
- jobs:
12
- deploy:
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- - uses: actions/checkout@v3
17
-
18
- - uses: ruby/setup-ruby@v1
19
- with:
20
- ruby-version: 3.1
21
- bundler-cache: true
22
-
23
- - name: Installing packages
24
- run: sudo apt-get install wget
25
-
26
- - name: Prepare GitHub Pages
27
- run: bundle exec bake github:pages:prepare --directory docs
28
-
29
- - name: Generate documentation
30
- timeout-minutes: 5
31
- run: bundle exec bake utopia:project:static --force no
32
-
33
- - name: Deploy GitHub Pages
34
- run: bundle exec bake github:pages:commit --directory docs
@@ -1,11 +0,0 @@
1
-
2
- ENV['COVERAGE'] ||= 'PartialSummary'
3
- require 'covered/policy/default'
4
-
5
- $covered.enable
6
-
7
- require_relative 'test'
8
-
9
- $covered.disable
10
-
11
- $covered.call($stdout)
@@ -1,21 +0,0 @@
1
-
2
- require 'erb'
3
- $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
4
-
5
- template_path = File.expand_path("template.erb", __dir__)
6
-
7
- ENV['COVERAGE'] ||= 'PartialSummary'
8
- require 'covered/policy/default'
9
-
10
- $covered.enable
11
-
12
- template = ERB.new(File.read(template_path)).tap do |template|
13
- template.filename = template_path
14
- end
15
-
16
- @items = ["Cats", "Dogs", "Chickens"]
17
- puts template.result(binding)
18
-
19
- $covered.disable
20
-
21
- $covered.call($stdout)
@@ -1,7 +0,0 @@
1
- <% for @item in @items %>
2
- <%= @item %>
3
- <% end %>
4
-
5
- <% if 1 == 2 %>
6
- Math is broken.
7
- <% end %>
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pry'
4
- require 'parser/current'
5
-
6
- ast = Parser::CurrentRuby.parse_file('test.rb')
7
- # ast.location.expression.source
8
-
9
- def print_methods(ast)
10
- if ast.is_a? Parser::AST::Node
11
- if ast.type == :send
12
- puts "Calling #{ast.children[1]} on #{ast.location.line}"
13
- end
14
-
15
- ast.children.each do |child|
16
- print_methods(child)
17
- end
18
- end
19
- end
20
-
21
- print_methods(ast)
22
-
23
- binding.pry
@@ -1,7 +0,0 @@
1
-
2
- require 'simplecov'
3
-
4
- SimpleCov.command_name 'Example'
5
- SimpleCov.start
6
-
7
- require_relative 'test'
@@ -1,16 +0,0 @@
1
- trace_point = TracePoint.new(:call, :return, :line, :c_call, :c_return, :b_call, :b_return) do |trace|
2
- puts [trace.path, trace.lineno].join(":")
3
- end
4
-
5
- trace_point.enable
6
-
7
- values = {foo: 10}
8
-
9
- def shell_escape(x)
10
- x
11
- end
12
-
13
- values.map{|key, value| [
14
- key.to_s.upcase,
15
- shell_escape(value) # TracePoint is never triggered for this line.
16
- ]}
@@ -1,8 +0,0 @@
1
-
2
- trace_point = TracePoint.new(:call, :return, :line, :c_call, :c_return, :b_call, :b_return) do |trace|
3
- puts [trace.path, trace.lineno].join(":")
4
- end
5
-
6
- trace_point.enable
7
-
8
- require_relative 'test'
data/media/example.png DELETED
Binary file