sensu-plugins-rspec 1.0.0 → 1.1.0
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.md +6 -1
- data/README.md +1 -1
- data/bin/check-rspec.rb +7 -2
- data/lib/sensu-plugins-rspec/version.rb +1 -1
- 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: 1b45ac87d98ba3d4f52378d28678910761a67219
|
4
|
+
data.tar.gz: c3f59b8e887b46a8430e566a923d32cabad88071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f782cf88cdb5653ce0ddb3333fa19056c80fd5cad2bdf9772a2cdc8086b77ce6088fc174b918fb843eeab6c9f199934634648d0d61222825423c1dcef0b6d50
|
7
|
+
data.tar.gz: 654a400e4738dc4291e08b9ad11a43f49874d57397ebc18c8bf92c2340ce02d9700fae0d871c0cdc4b2161ea856ef792b63c87e110b64c3cf1e777d4768bec67
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [1.1.0] 2017-07-15
|
9
|
+
### Added
|
10
|
+
- Config option to provide a proxy client name for rspec results
|
11
|
+
|
8
12
|
## [1.0.0] - 2017-07-12
|
9
13
|
### Added
|
10
14
|
- Ruby 2.3.0 & 2.4.1 testing
|
@@ -42,7 +46,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
42
46
|
* fix rubocop errors
|
43
47
|
* add unpinned dependencies to gemspec
|
44
48
|
|
45
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/1.
|
49
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/1.1.0...HEAD
|
50
|
+
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/1.0.0...1.1.0
|
46
51
|
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/0.0.3...1.0.0
|
47
52
|
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/0.0.2...0.0.3
|
48
53
|
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ Run only one set of tests
|
|
23
23
|
|
24
24
|
Run tests with all options (except environment variables)
|
25
25
|
|
26
|
-
`check-rspec -b /usr/bin/ruby -i bin/rspec -d /tmp/my_tests -s spec`
|
26
|
+
`check-rspec -b /usr/bin/ruby -i bin/rspec -d /tmp/my_tests -s spec --proxy-client rspec-client`
|
27
27
|
|
28
28
|
Run tests with required options and multiple environment variables
|
29
29
|
|
data/bin/check-rspec.rb
CHANGED
@@ -77,18 +77,23 @@ class CheckRspec < Sensu::Plugin::Check::CLI
|
|
77
77
|
long: '--handler HANDLER',
|
78
78
|
default: 'default'
|
79
79
|
|
80
|
+
option :proxy_client,
|
81
|
+
description: 'Proxy client name for results',
|
82
|
+
long: '--proxy-client SOURCE',
|
83
|
+
required: false
|
84
|
+
|
80
85
|
def sensu_client_socket(msg)
|
81
86
|
u = UDPSocket.new
|
82
87
|
u.send(msg + "\n", 0, '127.0.0.1', 3030)
|
83
88
|
end
|
84
89
|
|
85
90
|
def send_ok(check_name, msg)
|
86
|
-
d = { 'name' => check_name, 'status' => 0, 'output' => "OK: #{msg}", 'handler' => config[:handler] }
|
91
|
+
d = { 'name' => check_name, 'status' => 0, 'output' => "OK: #{msg}", 'handler' => config[:handler], 'source' => config[:proxy_client] }
|
87
92
|
sensu_client_socket d.to_json
|
88
93
|
end
|
89
94
|
|
90
95
|
def send_warning(check_name, msg)
|
91
|
-
d = { 'name' => check_name, 'status' => 1, 'output' => "WARNING: #{msg}", 'handler' => config[:handler] }
|
96
|
+
d = { 'name' => check_name, 'status' => 1, 'output' => "WARNING: #{msg}", 'handler' => config[:handler], 'source' => config[:proxy_client] }
|
92
97
|
sensu_client_socket d.to_json
|
93
98
|
end
|
94
99
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|