chef-handler-sns 0.2.2 → 0.2.4
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.
- data/README.md +1 -0
- data/lib/chef/handler/sns/templates/body.erb +3 -0
- data/lib/chef/handler/sns/version.rb +1 -1
- data/test/helper.rb +3 -0
- data/test/test_chef_handler_sns_config.rb +26 -0
- metadata +18 -2
data/README.md
CHANGED
@@ -10,6 +10,7 @@ This Chef Handler is heavily based on [Joshua Timberman](https://github.com/jtim
|
|
10
10
|
[](https://gemnasium.com/onddo/chef-handler-sns)
|
11
11
|
[](https://codeclimate.com/github/onddo/chef-handler-sns)
|
12
12
|
[](https://travis-ci.org/onddo/chef-handler-sns)
|
13
|
+
[](https://coveralls.io/r/onddo/chef-handler-sns)
|
13
14
|
|
14
15
|
## Requirements
|
15
16
|
|
data/test/helper.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
3
|
|
4
|
+
require 'coveralls'
|
5
|
+
Coveralls.wear!
|
6
|
+
|
4
7
|
require 'rubygems'
|
5
8
|
gem 'minitest' # ensures you're using the gem, and not the built in MT
|
6
9
|
require 'minitest/autorun'
|
@@ -59,5 +59,31 @@ describe Chef::Handler::Sns::Config do
|
|
59
59
|
assert_raises(Chef::Exceptions::ValidationFailed) { @sns_config.config_check }
|
60
60
|
end
|
61
61
|
|
62
|
+
describe 'config_init' do
|
63
|
+
|
64
|
+
it 'should accept valid config options' do
|
65
|
+
option = :access_key
|
66
|
+
Chef::Log.expects(:warn).never
|
67
|
+
|
68
|
+
@sns_config.config_init({ option => 'valid' })
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should not accept invalid config options' do
|
72
|
+
option = :invalid_option
|
73
|
+
assert !@sns_config.respond_to?(option)
|
74
|
+
Chef::Log.expects(:warn).once
|
75
|
+
|
76
|
+
@sns_config.config_init({ option => 'none' })
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'should not accept config options starting by "config_"' do
|
80
|
+
option = :config_check
|
81
|
+
assert @sns_config.respond_to?(option)
|
82
|
+
Chef::Log.expects(:warn).once
|
83
|
+
|
84
|
+
@sns_config.config_init({ option => 'exists but not configurable' })
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
62
88
|
|
63
89
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-handler-sns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: right_aws
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: coveralls
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
110
126
|
description: Chef report handler to send SNS notifications on failures or changes
|
111
127
|
email: team@onddo.com
|
112
128
|
executables: []
|