apireaper 1.0.9 → 1.0.10
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/.gitlab-ci.yml +4 -5
- data/README.md +1 -3
- data/lib/apireaper/requester.rb +3 -2
- data/lib/apireaper/version.rb +1 -1
- data/spec/apireaper/requester_spec.rb +6 -4
- data/spec/apireaper/stubs/servers_stubs.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ac14f3047975ad8a139d33b85e87dc030764aad
|
4
|
+
data.tar.gz: ca0f408f3b7c74dba4a04f2c02822fc06ced6a5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe20601c71f3215524ddcc195a53dee08e134ff047b25d1fa18108f34e2c0caaf1dcffce533d8cba069d7be76cbdc1ea08171057e9ea52510589dae646bf7e3
|
7
|
+
data.tar.gz: 91ebffe9fc105439324523bd073641a06c6ae2962e31bcb9890ccf430ab1a2db9058f78812e294c91cc6b19d3461b4284bc4b79e1d27da84505315e5ff84a736
|
data/.gitlab-ci.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
image: yueyehua/debian-ruby
|
1
|
+
image: yueyehua/debian-ruby:deb8
|
2
2
|
|
3
3
|
rubocop:
|
4
4
|
tags:
|
5
5
|
- docker
|
6
|
-
image: yueyehua/debian-ruby
|
7
6
|
stage: test
|
8
7
|
script:
|
9
8
|
- rubocop
|
10
9
|
|
11
10
|
lines_length:
|
11
|
+
image: yueyehua/debian-base:8
|
12
12
|
stage: test
|
13
13
|
script:
|
14
14
|
- >
|
@@ -17,20 +17,19 @@ lines_length:
|
|
17
17
|
80 README.md spec/files/*
|
18
18
|
|
19
19
|
git_history:
|
20
|
+
image: yueyehua/debian-base:8
|
20
21
|
stage: test
|
21
22
|
script:
|
22
23
|
- >
|
23
24
|
bash <(curl -s
|
24
25
|
https://gitlab.com/yue-script/checks/raw/master/check_git_history.sh)
|
25
26
|
|
26
|
-
before_script:
|
27
|
-
- bundle install
|
28
|
-
|
29
27
|
rspec:
|
30
28
|
tags:
|
31
29
|
- docker
|
32
30
|
stage: test
|
33
31
|
script:
|
32
|
+
- bundle install
|
34
33
|
- rspec
|
35
34
|
artifacts:
|
36
35
|
paths:
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# APIReaper
|
2
|
-
![License]
|
2
|
+
[](LICENSE)
|
3
3
|
[](https://gitlab.com/vp-noc/apireaper/commits/develop)
|
4
4
|
[](https://vp-noc.gitlab.io/apireaper/)
|
5
5
|
[](https://badge.fury.io/rb/apireaper)
|
@@ -63,5 +63,3 @@ request.
|
|
63
63
|
╚═(███)═╝
|
64
64
|
╚═(███)═╝
|
65
65
|
```
|
66
|
-
|
67
|
-
[license-img]: https://img.shields.io/badge/license-Apache-blue.svg
|
data/lib/apireaper/requester.rb
CHANGED
data/lib/apireaper/version.rb
CHANGED
@@ -26,7 +26,7 @@ def print_out(code)
|
|
26
26
|
end
|
27
27
|
|
28
28
|
describe APIReaper::Requester do # rubocop:disable Metrics/BlockLength
|
29
|
-
%w[delete
|
29
|
+
%w[delete put].each do |method|
|
30
30
|
context "check #{method} http://api.test.yueyehua.net/ -q" do
|
31
31
|
it 'tries unimplemented commands.' do
|
32
32
|
expect { start(self) }.to raise_error(SystemExit)
|
@@ -40,9 +40,11 @@ describe APIReaper::Requester do # rubocop:disable Metrics/BlockLength
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
%w[get post].each do |method|
|
44
|
+
context "check #{method} http://api.test.yueyehua.net/" do
|
45
|
+
it 'requests an API without extra arguments.' do
|
46
|
+
expect { start(self) }.to output(print_out(200)).to_stdout
|
47
|
+
end
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
@@ -26,6 +26,8 @@ RSpec.configure do |config|
|
|
26
26
|
# requests an API without extra arguments
|
27
27
|
stub_request(:post, 'http://api.test.yueyehua.net/')
|
28
28
|
.to_return('status' => 200, 'body' => '{}', 'headers' => {})
|
29
|
+
stub_request(:get, 'http://api.test.yueyehua.net/')
|
30
|
+
.to_return('status' => 200, 'body' => '{}', 'headers' => {})
|
29
31
|
# requests an API with headers
|
30
32
|
stub_request(:post, 'http://api.test.yueyehua.net/')
|
31
33
|
.with('headers' => { 'k' => 'v' })
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apireaper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Delaplace
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06
|
11
|
+
date: 2017-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.
|
177
|
+
rubygems_version: 2.6.8
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: Tool to request and check an API.
|