chef-handler-sns 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -10,6 +10,7 @@ This Chef Handler is heavily based on [Joshua Timberman](https://github.com/jtim
10
10
  [![Dependency Status](https://gemnasium.com/onddo/chef-handler-sns.png)](https://gemnasium.com/onddo/chef-handler-sns)
11
11
  [![Code Climate](https://codeclimate.com/github/onddo/chef-handler-sns.png)](https://codeclimate.com/github/onddo/chef-handler-sns)
12
12
  [![Build Status](https://travis-ci.org/onddo/chef-handler-sns.png)](https://travis-ci.org/onddo/chef-handler-sns)
13
+ [![Coverage Status](https://coveralls.io/repos/onddo/chef-handler-sns/badge.png?branch=master)](https://coveralls.io/r/onddo/chef-handler-sns)
13
14
 
14
15
  ## Requirements
15
16
 
@@ -3,6 +3,9 @@ Node Name: <%= node.name %>
3
3
  Hostname: <%= node.fqdn %>
4
4
  <% end -%>
5
5
 
6
+ Chef Version: <%= Chef::VERSION %>
7
+ Ohai Version: <%= Ohai::VERSION %>
8
+
6
9
  Chef Run List: <%= node.run_list.to_s %>
7
10
  Chef Environment: <%= node.chef_environment %>
8
11
 
@@ -2,7 +2,7 @@
2
2
  class Chef
3
3
  class Handler
4
4
  class Sns < ::Chef::Handler
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.4'
6
6
  end
7
7
  end
8
8
  end
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.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-03 00:00:00.000000000 Z
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: []