testmetrics_minitest 1.0.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed676fac58e14542581140eb0f7b6dbfc11df4a3652de9292296e907798a1731
4
- data.tar.gz: b4b22d08333b7d8227957d3e1b09c621c0ed9cf101fe79617538ba07e864397c
3
+ metadata.gz: 2da6647ab30704ebb72795402b32417f0bbd75457d88f7d94744dd97edd16058
4
+ data.tar.gz: 5987ac4fa20077b567fa129d62084ff94837b04050cd7aed1f84899dcef21875
5
5
  SHA512:
6
- metadata.gz: 3fdb0d03f98045223a119b1c71ce9c3e65991f65d7765f7dff70338e0635d9225bb36dd0b118757c419ad8f3edfe38d7fb36ab0d5ae58e783d9d7ea798c37d42
7
- data.tar.gz: c291a41b052ef3fa11376f7e6ae3e33d56ab28fd0221f7679233d0f951473b1802392cf8dd83107b482e87a3fb29162ea5cd4cf2b9cc312959c74d6f9d1b8140
6
+ metadata.gz: ae71a5f00425abea509c0d004e10ae0494c1da8d77b7d76f331ea74cee8d8552bee504732e4d25578a9e1aa92f09385f7a9307686ff0012bc7283406b11d43c6
7
+ data.tar.gz: bf1e12d2495d28bcacec9a84bd0d7b380492216eb010ed9f804df82f334c32b880fa2d92b18cb38396c905a6539926ceee68f1e81c08ddbba055e4ee7b46779e
data/README.md CHANGED
@@ -15,15 +15,8 @@ group :test do
15
15
  end
16
16
  ```
17
17
 
18
- Then, when you're running your tests in CI, you can pass the `--testmetrics`
19
- option to turn on the reporter:
20
-
21
- ```
22
- bundle exec rake test --testmetrics
23
- ```
24
-
25
- You can also turn on the reporter by requiring `'minitest/testmetrics'` in
26
- your test files.
18
+ Then, right after your call to `require 'minitest'`, add
19
+ `require 'minitest/testmetrics'` to enable the Testmetrics reporter.
27
20
 
28
21
  In order for the metrics to be sent to Testmetrics, you must have your
29
22
  Testmetrics Project Key set in the `TESTMETRICS_PROJECT_KEY` environment
@@ -55,22 +55,22 @@ module Minitest
55
55
 
56
56
  def report
57
57
  total_time = 0
58
+
58
59
  results.each do |name, class_results|
59
60
  class_results.each do |result|
60
61
  total_time += time_in_microseconds(result.time)
61
62
  result.name
62
- testmetrics_results[:tests]<< {
63
+ testmetrics_results[:tests] << {
63
64
  name: "#{name}.#{result.name.delete("\0").delete("\x01").delete("\e")}",
64
65
  total_run_time: time_in_microseconds(result.time),
65
66
  state: state(result.failure)
66
67
  }
67
68
  end
68
-
69
- testmetrics_results[:total_run_time] = total_time
70
-
71
- puts "\nSending results to Testmetrics server..."
72
- post_results(testmetrics_results) unless testmetrics_results[:key] == 'Unknown'
73
69
  end
70
+
71
+ testmetrics_results[:total_run_time] = total_time
72
+ puts "\nSending results to Testmetrics server..."
73
+ post_results(testmetrics_results) unless testmetrics_results[:key] == 'Unknown'
74
74
  end
75
75
 
76
76
  private
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'testmetrics_minitest'
6
- spec.version = '1.0.0'
6
+ spec.version = '1.0.2'
7
7
  spec.authors = ['Devon Estes']
8
8
  spec.email = ['devon.c.estes@gmail.com']
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testmetrics_minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Estes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-25 00:00:00.000000000 Z
11
+ date: 2019-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler