apireaper 1.0.13 → 1.0.14
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/CHANGELOG +16 -0
- data/lib/apireaper/cli.rb +7 -0
- data/lib/apireaper/requester.rb +1 -0
- data/lib/apireaper/version.rb +1 -1
- data/spec/apireaper/requester_spec.rb +6 -0
- data/spec/apireaper/stubs/servers_stubs.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab47e6b5bf430530f7e94bd73682f86226611039
|
4
|
+
data.tar.gz: d4bc3feb1794e57074d4e23abcc452809b96b9f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82dcde96d8839274c3517b2319ba94f1524dec8c78b02b10213fc87c1b103086eef9b4090d36bef23a1da5f27632a782123f905647a2d051ea13703f8e04126e
|
7
|
+
data.tar.gz: 95c9524edaac3e5d6784cef21d0b42619c18fffaf8dc391d7897d5345afdec4d4ef63d3d933e3b82bd9074c9e9434baada399337f44610d0a9af8fd563726535
|
data/CHANGELOG
CHANGED
@@ -5,3 +5,19 @@ Changelog
|
|
5
5
|
-----
|
6
6
|
|
7
7
|
- Initial version
|
8
|
+
|
9
|
+
1.0.11
|
10
|
+
------
|
11
|
+
|
12
|
+
- Add GET method
|
13
|
+
- Add basic authentication parameters
|
14
|
+
|
15
|
+
1.0.13
|
16
|
+
------
|
17
|
+
|
18
|
+
- Change exit code to fit Nagios Convention
|
19
|
+
|
20
|
+
1.0.14
|
21
|
+
------
|
22
|
+
|
23
|
+
- Add insecure mode using SSL
|
data/lib/apireaper/cli.rb
CHANGED
@@ -67,6 +67,13 @@ module APIReaper
|
|
67
67
|
aliases: ['-o'],
|
68
68
|
desc: 'Write the response body to output file.'
|
69
69
|
)
|
70
|
+
option(
|
71
|
+
:insecure,
|
72
|
+
aliases: ['-k'],
|
73
|
+
type: :boolean,
|
74
|
+
default: false,
|
75
|
+
desc: 'Do not verify certificates using SSL'
|
76
|
+
)
|
70
77
|
option(
|
71
78
|
:quiet,
|
72
79
|
aliases: ['-q'],
|
data/lib/apireaper/requester.rb
CHANGED
data/lib/apireaper/version.rb
CHANGED
@@ -87,4 +87,10 @@ describe APIReaper::Requester do # rubocop:disable Metrics/BlockLength
|
|
87
87
|
expect { start(self) }.to raise_error(SystemExit)
|
88
88
|
end
|
89
89
|
end
|
90
|
+
|
91
|
+
context 'check get https://api.test.yueyehua.net/ -k' do
|
92
|
+
it 'requests an API via https using insecure mode.' do
|
93
|
+
expect { start(self) }.to output(print_out(200)).to_stdout
|
94
|
+
end
|
95
|
+
end
|
90
96
|
end
|
@@ -60,5 +60,8 @@ RSpec.configure do |config| # rubocop:disable Metrics/BlockLength
|
|
60
60
|
stub_request(:post, 'http://api.fail.yueyehua.net/')
|
61
61
|
.with('body' => { 'l' => 'w' }, 'headers' => { 'l' => 'w' })
|
62
62
|
.to_return('status' => 404, 'body' => '{}', 'headers' => {})
|
63
|
+
# requests an API via https using insecure mode
|
64
|
+
stub_request(:get, 'https://api.test.yueyehua.net/')
|
65
|
+
.to_return('status' => 200, 'body' => '{}', 'headers' => {})
|
63
66
|
end
|
64
67
|
end
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Delaplace
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|