sensu-extension 1.2.0 → 1.3.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: 99e1b51e945313164d339767955691d4e3cc021e
4
- data.tar.gz: 243ddecd5cc7e7aa1a72a09aceb8c1fa79d9f199
3
+ metadata.gz: 607074c1722556962c92e56472be0f7b4a6ef006
4
+ data.tar.gz: c6dc6d6d507a031b99dabeefa37466a463d35d7e
5
5
  SHA512:
6
- metadata.gz: 78414eecf851d00490ba0325dfff2a818c899307cbbcf901c24266bdb6b898e2ceaafe6ad1fee65c2e702607c7139329b487c7c17a5c0b462fd354cd811ce0a9
7
- data.tar.gz: 256663943477a5f739bab4ebdb1a84fb9eb8b6c64cbc12e7299909dda545fd4277b4d9a1fe6e8e156f88ec162917d95b19c85f48d566b36a5210eeb995f07259
6
+ metadata.gz: 67dbbff00a90185156d00284faeafffd7cfb5d11967a1aa15420cec05a0ed60dea5a74c989ef574afebcc9d4598f2e4e5c8d74d445100f95853b0907cad70594
7
+ data.tar.gz: 6713f063ce4923ff8c91640eaddccd8420b5bc1a14e6bd7c1b3fa6894f5678d6034a77cbde532f42b89e7f5709f4ae27c7b16432bdbc26f37f72a05662cee2eb
@@ -28,6 +28,12 @@ module Sensu
28
28
  "base"
29
29
  end
30
30
 
31
+ # Override this method to set a name alias for the extension.
32
+ # The extention can be referenced by the name alias. This method
33
+ # is used to aid in the transition to the extension from a Sensu
34
+ # component sharing the same name, e.g. pipe handler.
35
+ def name_alias; end
36
+
31
37
  # Override this method to set the extension's description.
32
38
  def description
33
39
  "extension description (change me)"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-extension"
5
- spec.version = "1.2.0"
5
+ spec.version = "1.3.0"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com"]
8
8
  spec.summary = "The Sensu extension library"
data/spec/base_spec.rb CHANGED
@@ -10,13 +10,14 @@ describe "Sensu::Extension::Base" do
10
10
  end
11
11
 
12
12
  it "can provide the extension API" do
13
- expect(@extension).to respond_to(:name, :description, :definition, :safe_run, :has_key?, :[])
13
+ expect(@extension).to respond_to(:name, :name_alias, :description, :definition, :safe_run, :has_key?, :[])
14
14
  end
15
15
 
16
16
  it "can provide default method return values" do
17
17
  expect(@extension.post_init).to be(true)
18
18
  expect(@extension.stop).to be(true)
19
19
  expect(@extension.name).to eq("base")
20
+ expect(@extension.name_alias).to eq(nil)
20
21
  expect(@extension.description).to eq("extension description (change me)")
21
22
  expect(@extension.definition).to eq({:type => "extension", :name => "base"})
22
23
  end
@@ -7,7 +7,7 @@ describe "Sensu::Extension::Bridge" do
7
7
  it "inherits Base" do
8
8
  expect(Sensu::Extension::Bridge.superclass).to eq(Sensu::Extension::Base)
9
9
  extension = Sensu::Extension::Bridge.new
10
- expect(extension).to respond_to(:name, :description, :definition, :safe_run, :stop, :has_key?, :[])
10
+ expect(extension).to respond_to(:name, :name_alias, :description, :definition, :safe_run, :stop, :has_key?, :[])
11
11
  end
12
12
  end
13
13
 
@@ -17,7 +17,7 @@ describe "Sensu::Extension::Check" do
17
17
  it "inherits Base" do
18
18
  expect(Sensu::Extension::Check.superclass).to eq(Sensu::Extension::Base)
19
19
  extension = Sensu::Extension::Check.new
20
- expect(extension).to respond_to(:name, :description, :definition, :safe_run, :stop, :has_key?, :[])
20
+ expect(extension).to respond_to(:name, :name_alias, :description, :definition, :safe_run, :stop, :has_key?, :[])
21
21
  end
22
22
  end
23
23
 
@@ -27,7 +27,7 @@ describe "Sensu::Extension::Filter" do
27
27
  it "inherits Base" do
28
28
  expect(Sensu::Extension::Filter.superclass).to eq(Sensu::Extension::Base)
29
29
  extension = Sensu::Extension::Filter.new
30
- expect(extension).to respond_to(:name, :description, :definition, :safe_run, :stop, :has_key?, :[])
30
+ expect(extension).to respond_to(:name, :name_alias, :description, :definition, :safe_run, :stop, :has_key?, :[])
31
31
  end
32
32
  end
33
33
 
@@ -37,7 +37,7 @@ describe "Sensu::Extension::Mutator" do
37
37
  it "inherits Base" do
38
38
  expect(Sensu::Extension::Mutator.superclass).to eq(Sensu::Extension::Base)
39
39
  extension = Sensu::Extension::Mutator.new
40
- expect(extension).to respond_to(:name, :description, :definition, :safe_run, :stop, :has_key?, :[])
40
+ expect(extension).to respond_to(:name, :name_alias, :description, :definition, :safe_run, :stop, :has_key?, :[])
41
41
  end
42
42
  end
43
43
 
@@ -47,6 +47,6 @@ describe "Sensu::Extension::Handler" do
47
47
  it "inherits Base" do
48
48
  expect(Sensu::Extension::Handler.superclass).to eq(Sensu::Extension::Base)
49
49
  extension = Sensu::Extension::Handler.new
50
- expect(extension).to respond_to(:name, :description, :definition, :safe_run, :stop, :has_key?, :[])
50
+ expect(extension).to respond_to(:name, :name_alias, :description, :definition, :safe_run, :stop, :has_key?, :[])
51
51
  end
52
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.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: 2015-09-16 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -127,3 +127,4 @@ test_files:
127
127
  - spec/base_spec.rb
128
128
  - spec/categories_spec.rb
129
129
  - spec/helpers.rb
130
+ has_rdoc: