chef-handler-users 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.12"
6
+ gem.version = "0.0.13"
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"
@@ -38,12 +38,12 @@ class Chef::Handler::Users < Chef::Handler
38
38
  end
39
39
 
40
40
  def report
41
- updated_users = run_status.updated_resources.inject([]) do |updated_users, resource|
42
- updated_users << resource if resource.resource_name == "user"
43
- updated_users
41
+ updated_users = run_status.updated_resources.select do |resource|
42
+ resource.resource_name == "user"
44
43
  end
45
44
 
46
45
  if updated_users.empty?
46
+ Chef::Log.info "Users handler detected no user changes"
47
47
  return
48
48
  else
49
49
  Chef::Log.info "Users handler detected #{updated_users.length} user changes. Generating summary email for #{@config[:to_address]}"
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.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: