oncall 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +22 -0
- data/README.md +35 -0
- data/lib/oncall/commands/base_command.rb +4 -0
- data/lib/oncall/core/reporter.rb +11 -2
- data/lib/oncall/core.rb +0 -2
- data/lib/oncall/http.rb +1 -4
- data/lib/oncall/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2483b737ad5a8fdf0508249a7e55166794cd99562e5914d6962dbeaca8e51be
|
4
|
+
data.tar.gz: 43f1a469fde4c9370233a5e65b72ad2f886049931e70b7ca5fbd1043e810d0a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c21c6989f2c75b7f908a32d5976c940fee12748dc948b82dd3f63c96d639577dcb4a029ed662328aa55ab08cb0f241ba62572aaef41601e20daf2753399b35c
|
7
|
+
data.tar.gz: b4280cb5df3cf9f0b3cb65f367f0241f65c9e5bb855042a39ebf04c701e6a6e25bd62be0cd9da3119d36543d5aa7b3b36f290c7f417c2aa31b69e5857a113025
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 Koen Woortman
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
CHANGED
@@ -1,3 +1,38 @@
|
|
1
1
|
# 🤙 Oncall
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/oncall.svg)](https://badge.fury.io/rb/oncall)
|
4
|
+
|
5
|
+
> Oncall is a DSL for testing JSON API's.
|
6
|
+
|
7
|
+
#### Install
|
8
|
+
```
|
9
|
+
gem install oncall
|
10
|
+
```
|
11
|
+
|
12
|
+
|
13
|
+
### Table of content
|
14
|
+
|
15
|
+
* [Get started](#get-started)
|
16
|
+
* [Usage](#usage)
|
17
|
+
* [Configuration](#configuration)
|
18
|
+
* [License](#license)
|
19
|
+
* [Acknowledgments](#acknowledgments)
|
20
|
+
|
21
|
+
|
22
|
+
## Get started
|
23
|
+
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
|
28
|
+
## Configuration
|
29
|
+
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
34
|
+
|
35
|
+
|
36
|
+
## Acknowledgments
|
37
|
+
|
38
|
+
* Inspired by [rspec](https://github.com/rspec/rspec).
|
@@ -7,6 +7,10 @@ module Oncall
|
|
7
7
|
OptionParser.new do |opts|
|
8
8
|
opts.banner = 'Usage: oncall'
|
9
9
|
opts.separator ''
|
10
|
+
opts.separator 'Commands:'
|
11
|
+
opts.separator ' init Create an empty oncall project.'
|
12
|
+
opts.separator ' run [ENV] Run the test suite.'
|
13
|
+
opts.separator ''
|
10
14
|
opts.separator 'Options:'
|
11
15
|
|
12
16
|
opts.on('--version', 'Show version information.') do
|
data/lib/oncall/core/reporter.rb
CHANGED
@@ -10,6 +10,8 @@ module Oncall
|
|
10
10
|
empty: 0
|
11
11
|
}
|
12
12
|
|
13
|
+
@start_time = nil
|
14
|
+
@end_time = nil
|
13
15
|
@messages = []
|
14
16
|
end
|
15
17
|
|
@@ -22,13 +24,20 @@ module Oncall
|
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
25
|
-
def start
|
27
|
+
def start
|
28
|
+
@start_time = Time.now
|
29
|
+
end
|
26
30
|
|
27
31
|
def finish
|
32
|
+
@end_time = Time.now
|
33
|
+
|
28
34
|
puts "\n\n"
|
29
35
|
puts @messages
|
30
36
|
|
31
|
-
|
37
|
+
elapsed_seconds = (@end_time.to_f - @start_time.to_f).to_f
|
38
|
+
puts "Finished in #{elapsed_seconds.round(4)} seconds"
|
39
|
+
|
40
|
+
result = "#{@results[:success]} passed, #{@results[:failure]} failed.\n"
|
32
41
|
|
33
42
|
if success?
|
34
43
|
puts result.green
|
data/lib/oncall/core.rb
CHANGED
data/lib/oncall/http.rb
CHANGED
data/lib/oncall/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oncall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koen Woortman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -87,6 +87,7 @@ executables:
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- LICENSE
|
90
91
|
- README.md
|
91
92
|
- bin/oncall
|
92
93
|
- lib/oncall.rb
|