chef-handler-users 0.0.8 → 0.0.9

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.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "chef-handler-users"
6
- gem.version = "0.0.8"
6
+ gem.version = "0.0.9"
7
7
  gem.authors = ["Heavy Water Operations, LLC. (OR)"]
8
8
  gem.email = ["ops@hw-ops.com"]
9
9
  gem.homepage = "http://github.com/heavywater/chef-handler-users"
@@ -20,14 +20,21 @@ require 'rubygems'
20
20
  require 'chef/handler'
21
21
  require 'pony'
22
22
 
23
+
24
+
23
25
  class Chef::Handler::Users < Chef::Handler
24
26
  attr_reader :config
27
+ class ConfigurationError < StandardError; end
25
28
 
26
29
  def initialize(config={})
27
30
  @config = config
28
- @config[:to_address] ||= "no@email.com"
29
- @config[:from_address] ||= "yomommas@house.com"
30
31
  @config
32
+
33
+ %w[to_address from_address].map(&:to_sym).each do |key|
34
+ unless @config.has_key? key
35
+ raise ConfigurationError.new("Required configuration #{key} not passed to handler")
36
+ end
37
+ end
31
38
  end
32
39
 
33
40
  def report
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-users
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: