sensu-settings 0.0.3 → 0.0.4

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: 48ba35c4667643728d564b4a6f1b896c7309cca4
4
- data.tar.gz: b3df632e4ebfde1123b2b9c606304cabff06ea8f
3
+ metadata.gz: 5b6fd2ff7cfbb87b1395809280a22abac6b15f82
4
+ data.tar.gz: 5a6bfcdd10dcd7cb836e95788e7abc032ce2dd9a
5
5
  SHA512:
6
- metadata.gz: 5089acb63a77f61dede53af687a9ae5f9c2d01def001617c0dc360626192183a102c5d3881e28681d21022ae0c7879d41815233c3a1edf9bb18f0a75cbd99579
7
- data.tar.gz: 3ef86a3100eddda1ff08aa3dd1e8a8103501ba93677a7bc162f7a1f70db2912867d2d01ff5edda9b59f99a76092ee7ccddcc35ecdab47ad0bfc10a6a75ebd4a6
6
+ metadata.gz: bfb6873c4156668eff7b9a76d577f46632d98fca2e6c93c38ba4ab2f1c97668c8f39919dffa86dc3538686a088f04687b8246a46b283ad49d9a55475c2e32f5d
7
+ data.tar.gz: cdd96c0197b1b9c32dce6b582571e807b8f86d6fdeb6ea419e0a71132239bc195c36170d3b6e4a7dc539fda4aba68637f1faf1c7c242b7855492bf15911eb1e2
@@ -133,9 +133,8 @@ module Sensu
133
133
  #
134
134
  # @return [Array] validation failures.
135
135
  def validate
136
- service = ::File.basename($0).split("-").last
137
136
  validator = Validator.new
138
- validator.run(@settings, service)
137
+ validator.run(@settings, sensu_service_name)
139
138
  end
140
139
 
141
140
  private
@@ -227,6 +226,13 @@ module Sensu
227
226
  end
228
227
  end
229
228
 
229
+ # Retrieve Sensu service name.
230
+ #
231
+ # @return [String] service name.
232
+ def sensu_service_name
233
+ File.basename($0).split("-").last
234
+ end
235
+
230
236
  # Record a warning.
231
237
  #
232
238
  # @param message [String] warning message.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-settings"
5
- spec.version = "0.0.3"
5
+ spec.version = "0.0.4"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com"]
8
8
  spec.summary = "The Sensu settings library, loader and validator"
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: 0.0.3
4
+ version: 0.0.4
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-05-23 00:00:00.000000000 Z
11
+ date: 2014-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json