statsd_test_harness 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +4 -6
- data/lib/statsd_test_harness/postprocessors/rspec.rb +5 -1
- data/lib/statsd_test_harness/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bd438f84670405d01b9b423c27bb67347df5cb3
|
4
|
+
data.tar.gz: 02902f5cc1503cbe82681dbb87905b5f7bf83530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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
|
42
|
-
|
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
|
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
|
-
|
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
|