statsd_test_harness 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: 0c3392016a57b7f0f12fea1613979dc2fccda5ff
4
- data.tar.gz: 645e94680fadf32fb0c041ad949c51f2058610d1
3
+ metadata.gz: 1bd438f84670405d01b9b423c27bb67347df5cb3
4
+ data.tar.gz: 02902f5cc1503cbe82681dbb87905b5f7bf83530
5
5
  SHA512:
6
- metadata.gz: 47288d2658834bdfe3d556015867e20ae1fab16ec9e8de79b2a141cd0726129341aa5abfc9f9efb4a6a26a9efdc6a4e984dd87df4a1d2072dff19273de19aad5
7
- data.tar.gz: fb71cce422a069f7ff6a6e490b33ba965bd292b8a1d046f9657fc54996533379f618f54eb51bd8725583133ab3161ca69fc7464903eeb1e9d6892a867c54b715
6
+ metadata.gz: 7a75e5045c4dfcb081e7acdab0a0961a2c7391211ae81f355f0167167bd6b07610471a1d3e7d34a850b0c59cef5213a2f0262175bc3a6323abf0f87ec13430f1
7
+ data.tar.gz: 2a36ec9ee0687111bfefbfd8d16fe34984d1b74631c6a930997a3da59b5383bd4a3ebeb44917a099be4abf545bb40ce865f06a4d2413092393f01854f05f38dc
data/README.md CHANGED
@@ -32,16 +32,16 @@ Run at command line:
32
32
 
33
33
  wrap run_suite
34
34
 
35
- If you don't have a configuration in config/statsd_test_harness.rb, you can specify a config file at runtime:
35
+ If you don't have a configuration in config/config.rb, you can specify a config file at runtime:
36
36
 
37
37
  wrap run_suite --config path/to/config/file.rb
38
38
 
39
39
  ## Development
40
40
 
41
- To add support for a new test suite, create a file in statsd_test_harness/postprocessors that will match the duration output
42
- by the testing framework. Follow rspec.rb for an example.
41
+ To add support for a new test suite, create a file in statsd_test_harness/postprocessors/ that will extract the duration output
42
+ from the testing framework. Follow statsd_test_harness/postprocessors/rspec.rb for an example.
43
43
 
44
- To register the postprocessor, add it to the `config.tools` array the config file, e.g.
44
+ To register the postprocessor, add it to the `config.tools` array in your config file, e.g.
45
45
 
46
46
  {
47
47
  name: 'my_framework',
@@ -54,8 +54,6 @@ To register the postprocessor, add it to the `config.tools` array the config fil
54
54
 
55
55
  Set the `ignore_return_value` flag to false if you don't want to report an unsuccessful test run (based on exit status).
56
56
 
57
- To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
58
-
59
57
  ## Contributing
60
58
 
61
59
  1. Fork it ( https://github.com/[my-github-username]/statsd_test_harness/fork )
@@ -9,7 +9,11 @@ module StatsdTestHarness
9
9
  end
10
10
 
11
11
  def duration
12
- /Finished in ([0-9\.]+) seconds/.match(self.output)[1]
12
+ duration_string = /^real(.+)/.match(self.output).to_a.last
13
+ hours = /([0-9\.]+)h/.match(duration_string).to_a.last.to_f || 0
14
+ minutes = /([0-9\.]+)m/.match(duration_string).to_a.last.to_f || 0
15
+ seconds = /([0-9\.]+)s/.match(duration_string).to_a.last.to_f || 0
16
+ (hours * 60 * 60) + (minutes * 60) + seconds
13
17
  end
14
18
 
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module StatsdTestHarness
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd_test_harness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CoralineAda