oncall 0.2.3 → 0.2.4

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: 97c624adba4e2e68cd74e7f5211d9118b61e5d790d634486699f68555d5b6665
4
- data.tar.gz: b024f0d793c08c9effd162a07aff1da4ee073489d0ae184e0389f08ebcde6515
3
+ metadata.gz: e2483b737ad5a8fdf0508249a7e55166794cd99562e5914d6962dbeaca8e51be
4
+ data.tar.gz: 43f1a469fde4c9370233a5e65b72ad2f886049931e70b7ca5fbd1043e810d0a9
5
5
  SHA512:
6
- metadata.gz: 52eb1ea9450b1769ec6a2e2aeca4f44fb2b797fa73c31b36d52e2009d6a9937e8475ce466727d46540cf357562559891c5b121aef4747d842f7ba93a090976b2
7
- data.tar.gz: 132efe00a5dc72ac7fc43ceabf92258de9abd3eb0a3918e6185f860a6eace498239e92efcb14d3b44880a8e5282a2d15d5f3c052986e1ba8fd21d8f4b831649a
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
@@ -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; end
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
- result = "\n#{@results[:success]} passed, #{@results[:failure]} failed.\n"
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
@@ -6,8 +6,6 @@ module Oncall
6
6
  require_relative 'core/world'
7
7
  require_relative 'core/wrapper'
8
8
 
9
- STATUS_EMPTY = :empty
10
-
11
9
  class << self
12
10
  attr_writer :config, :world, :reporter
13
11
  end
data/lib/oncall/http.rb CHANGED
@@ -2,10 +2,7 @@ module Oncall
2
2
  module HTTP
3
3
  def self.uri(path, params)
4
4
  parts = path.split('/')
5
-
6
- if parts.empty?
7
- return '/'
8
- end
5
+ return '/' if parts.empty?
9
6
 
10
7
  parts.each_with_index do |part, index|
11
8
  if part.start_with?(':')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Oncall
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
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.3
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-02 00:00:00.000000000 Z
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