sensu-settings 10.13.1 → 10.14.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: 2a3b3ebce4a59d0863190fe102f9eff027764cc9
4
- data.tar.gz: 71968b22565578b0978a72224cb3809330351118
3
+ metadata.gz: 41da4fb8028ac3cfc68d5abfc188b17990fddf75
4
+ data.tar.gz: 37af7c2c3cf32097a0495c2b358ff7f096376544
5
5
  SHA512:
6
- metadata.gz: 43d1246feae72a40a21e8d91b3df60d02e52d98b7dd991d25a48b202deefe6115060e6132c8bee0aebb121c1f8b0430e9956e6c1ecb33ebdd26ada22d9257eaf
7
- data.tar.gz: 9a358519e804190024195353d1c09fbc4a2993f915e1db36f79d0489026ac228519ef7ff65fe09edbbf31601a2c7ea313439a31c929cbc4668852c6c369b2fe7
6
+ metadata.gz: 70bffe6052e39e0908b582d9825fca60094a78a6e19a47b2d10079bef373b84adbdaa0478ceac7d27defdac243afbf42c9c48c7aa3bee8ed40c1fe50edb53ae0
7
+ data.tar.gz: 5b9f13bcd3b85d51b2492e468a294e977e099c5d73739c3da26b245c91f6e5c4628ac6890b2c95178418cb57a8ad6377f96ef8ce4160e19a1508f3704d063d8b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -26,6 +26,8 @@ module Sensu
26
26
  validate_transport(settings[:transport])
27
27
  validate_categories(settings)
28
28
  case service
29
+ when "server"
30
+ validate_tessen(settings[:tessen])
29
31
  when "client"
30
32
  validate_client(settings[:client])
31
33
  when "api"
@@ -1,4 +1,5 @@
1
1
  require "sensu/settings/validators/sensu"
2
+ require "sensu/settings/validators/tessen"
2
3
  require "sensu/settings/validators/transport"
3
4
  require "sensu/settings/validators/time_window"
4
5
  require "sensu/settings/validators/check"
@@ -13,6 +14,7 @@ module Sensu
13
14
  module Settings
14
15
  module Validators
15
16
  include Sensu
17
+ include Tessen
16
18
  include Transport
17
19
  include TimeWindow
18
20
  include Check
@@ -0,0 +1,22 @@
1
+ module Sensu
2
+ module Settings
3
+ module Validators
4
+ module Tessen
5
+ # Validate a Tessen definition.
6
+ # Validates: enabled, identity_key
7
+ #
8
+ # @param tessen [Hash] tessen definition.
9
+ def validate_tessen(tessen)
10
+ must_be_a_hash_if_set(tessen) ||
11
+ invalid(tessen, "tessen must be a hash")
12
+ if is_a_hash?(tessen)
13
+ must_be_boolean_if_set(tessen[:enabled]) ||
14
+ invalid(tessen, "tessen enabled must be boolean")
15
+ must_be_a_string_if_set(tessen[:identity_key]) ||
16
+ invalid(tessen, "tessen identity_key must be a string")
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-settings"
5
- spec.version = "10.13.1"
5
+ spec.version = "10.14.0"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com", "engineering@sensu.io"]
8
8
  spec.summary = "The Sensu settings library, loader and validator"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.13.1
4
+ version: 10.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
@@ -30,7 +30,7 @@ cert_chain:
30
30
  jOeGyhtQa9j4FFmsEJDg59f5v/3hECXsa3Xuml3foaFHzX3Ya/YIyd2YFxvkFKIu
31
31
  GVbe7A3YdxzdkH2Es/Ym9twdxXaIDdXzj8sWhw==
32
32
  -----END CERTIFICATE-----
33
- date: 2018-03-07 00:00:00.000000000 Z
33
+ date: 2018-05-02 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-json
@@ -126,6 +126,7 @@ files:
126
126
  - lib/sensu/settings/validators/handler.rb
127
127
  - lib/sensu/settings/validators/mutator.rb
128
128
  - lib/sensu/settings/validators/sensu.rb
129
+ - lib/sensu/settings/validators/tessen.rb
129
130
  - lib/sensu/settings/validators/time_window.rb
130
131
  - lib/sensu/settings/validators/transport.rb
131
132
  - sensu-settings.gemspec
metadata.gz.sig CHANGED
Binary file