sensu-settings 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be148ef059d6a70cb141803bbddbb0057d04c0b2
4
- data.tar.gz: 2ddb52d10346ec77e5b619ca0eb062b2d09faffc
3
+ metadata.gz: a5afc7c7ef4a3cfc41e5a052c2133371dade84f1
4
+ data.tar.gz: 2345400d3a76e5b7b275866baf577f52875bc4e8
5
5
  SHA512:
6
- metadata.gz: a890ec24f4140fa1442684bbf369c1e49d34a2652a18f3f51b0132b74ca1bf9ea58219c4774fa891fbcd13866fbb2f7be26d59608b0d47d449df42b8134a9ba3
7
- data.tar.gz: 8c87459191c206e6da49b448e3ba44ed38dbededc48edeb7516c12782cfd4c7fd8828773940ca381fe5b7df1642802b06eb266bf465bed20bfe5138230cf1096
6
+ metadata.gz: daa43044a9e2ac530ea62f613ebe86aefaf2b734a499f4c8b098c8b5e0480041e099c2d31cd8489791894d94745941a7c950bf627544363cf4dc9f2e3c7487fe
7
+ data.tar.gz: a95609dba6b6631c75be0d20d0c1d454386d0bc8969912cef9005abd7c91bfc412efd507c0510a75cbfeb03ca5f52c6e539b8f3ac224959dde1e2555587751fd
@@ -53,17 +53,6 @@ module Sensu
53
53
  end
54
54
  end
55
55
 
56
- # Validate check masquerade.
57
- # Validates: masquerade
58
- #
59
- # @param check [Hash] sensu check definition.
60
- def validate_check_masquerade(check)
61
- must_be_a_string(check[:masquerade]) ||
62
- invalid(check, "check masquerade must be a string")
63
- must_match_regex(/^[\w\.-]+$/, check[:masquerade]) ||
64
- invalid(check, "check masquerade cannot contain spaces or special characters")
65
- end
66
-
67
56
  # Validate a Sensu check definition.
68
57
  #
69
58
  # @param check [Hash] sensu check definition.
@@ -76,12 +65,11 @@ module Sensu
76
65
  invalid(check, "check command must be a string")
77
66
  must_be_a_numeric_if_set(check[:timeout]) ||
78
67
  invalid(check, "check timeout must be numeric")
68
+ must_be_a_string_if_set(check[:source]) ||
69
+ invalid(check, "check source must be a string")
79
70
  validate_check_scheduling(check)
80
71
  validate_check_handling(check)
81
72
  validate_check_flap_detection(check)
82
- if check[:masquerade]
83
- validate_check_masquerade(check)
84
- end
85
73
  if check[:subdue]
86
74
  validate_subdue(check)
87
75
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-settings"
5
- spec.version = "1.1.0"
5
+ spec.version = "1.2.0"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com"]
8
8
  spec.summary = "The Sensu settings library, loader and validator"
@@ -141,13 +141,10 @@ describe "Sensu::Settings::Validator" do
141
141
  check[:high_flap_threshold] = 55
142
142
  @validator.validate_check(check)
143
143
  expect(@validator.reset).to eq(0)
144
- check[:masquerade] = 1
145
- @validator.validate_check(check)
146
- expect(@validator.reset).to eq(2)
147
- check[:masquerade] = "%&@*"
144
+ check[:source] = 1
148
145
  @validator.validate_check(check)
149
146
  expect(@validator.reset).to eq(1)
150
- check[:masquerade] = "i-424242"
147
+ check[:source] = "switch-%42%"
151
148
  @validator.validate_check(check)
152
149
  expect(@validator.reset).to eq(0)
153
150
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-23 00:00:00.000000000 Z
11
+ date: 2014-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json