sensu-plugins-rspec 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5126508dd775d18c488305c5a17520c3ff0942e
4
- data.tar.gz: 9a876fed9f455b950c757278dae56cde2dfefb5e
3
+ metadata.gz: 1b45ac87d98ba3d4f52378d28678910761a67219
4
+ data.tar.gz: c3f59b8e887b46a8430e566a923d32cabad88071
5
5
  SHA512:
6
- metadata.gz: 8eba00d31c7633c511a08308478731fefbc7e43cdd6e8b522b9d521f8643fd5a570f43992e80e1e66dcb2cee13827053d679cd123776e5363f603d4ac69d9b45
7
- data.tar.gz: 410453d91ff87ca793f27e3b1942d5a966a92b845c809a078acf290080fa814047a0932640352247017bd723b514bfc65f44c1b3fa5fa5461b40a5174cd97178
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.0.0...HEAD
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
 
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsRSpec
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 0
4
+ MINOR = 1
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.0.0
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-13 00:00:00.000000000 Z
11
+ date: 2017-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin