chef-rabbit 1.0.6 → 1.0.7

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjVhYzdkOThjZjFhNThlZjc2MWUwMzdjZjFiZDkyYmNlMmFjMDA4ZA==
4
+ ZGJhNjQ0ZGJiNTE1NjQ0YTRhMmNlMDBhOWRmMTEwN2UwYTAxYTgyNg==
5
5
  data.tar.gz: !binary |-
6
- MjY2MGNlMDNjMzY0NTIxOTk5NjQ4NTcwN2YyMzU3YjRiYTI3NWYxOA==
6
+ NTZlMWNmODIwYWQzZTAwNjVhZDNiY2Q0YTk1YjhmMTRmZmViNzg3NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDg4YjI1OWE4NmQ1YjgzM2RjNmYzYjI1NGRlNDcwZWQ3MGNmMjNhZmJjYTFk
10
- ZmRiYmFlODZjMThkMzhjZjNmMjA2MzM3MmIxZTBlYmVkZThkZTRhYTY3OTE2
11
- ZjRmYWVlZmYzN2FiNDk4MGUwNGNkZDBkNDZmNDU0ZGEzMTc4YjI=
9
+ MDYxZWNmMmQ0ZTI0ZDA1MmY3MmRmYzBmMmM2YTM5Njc1MWMwY2YzZTA1NDU0
10
+ M2Q1MjQ1NTFmMmM5YzQ0NjU5YjNlODY2YzZmYjQzNjM1Mjc0YmFhNWU2ZWQ5
11
+ YjlhNDNkMWFkODM3NjRjNWVhZTczY2UxMWRiZWM4NjRmYTBlOTA=
12
12
  data.tar.gz: !binary |-
13
- MGVmZjcyNmRjZThjYjg0OTI0YTJjNzkyZTliNzA3YjA0OGQzYTkwMmI1OTQ2
14
- OTE5NThhMGFjYjMwMGY2MTllYmVjMDBjOTM5MTVkZDdmNWNlZWYxZmE0ZTQ4
15
- MDA0ZTRhYzJlOTAyMGVhMDBhMmQ2NDhiZDIyNjIwZjliMzY0ODM=
13
+ ZjE5NzdlMTRlYzBmZTJmOTlkNzY1NWIwN2E1YjJkNDhlMzNlMmUwNWYxMTE5
14
+ YjNkZDVkNzNmNTIzNjY1YWUzYWIwYjc0NzUxOGZiNTRhNGZjODA0MTUzOTE0
15
+ MTcxOTE1NzE5ZGI4NzAzMzc4YzQ2Y2UyZTA4MTk0YjZhODE2Nzc=
data/lib/chef/rabbit.rb CHANGED
@@ -58,23 +58,21 @@ class Chef
58
58
  timestamp = (@options[:timestamp_tag] == nil) ? "timestamp" : @options[:timestamp_tag]
59
59
 
60
60
  if run_status.failed?
61
- Chef::Log.debug "Notifying Rabbit server of failure."
62
- exchange.publish(
63
- {
64
- timestamp.to_sym => Time.now.getutc.to_s,
65
- :short_message => "Chef run failed on #{node.name}. Updated #{changes[:count]} resources.",
66
- :full_message => run_status.formatted_exception + "\n" + Array(backtrace).join("\n") + changes[:message]
67
- }.to_json,
68
- :routing_key => @options[:queue][:name])
61
+ message = {
62
+ timestamp.to_sym => Time.now.getutc.to_s,
63
+ :short_message => "Chef run failed on #{node.name}. Updated #{changes[:count]} resources.",
64
+ :full_message => run_status.formatted_exception + "\n" + Array(backtrace).join("\n") + changes[:message]
65
+ }
66
+ Chef::Log.debug "Notifying Rabbit server of failure: #{message.pretty_inspect}"
67
+ exchange.publish(message.to_json, :routing_key => @options[:queue][:name])
69
68
  else
70
- Chef::Log.debug "Notifying Rabbit server of success."
71
- exchange.publish(
72
- {
73
- timestamp.to_sym => Time.now.getutc.to_s,
74
- :short_message => "Chef run completed on #{node.name} in #{elapsed_time}. Updated #{changes[:count]} resources.",
75
- :full_message => changes[:message]
76
- }.to_json,
77
- :routing_key => @options[:queue][:name])
69
+ message = {
70
+ timestamp.to_sym => Time.now.getutc.to_s,
71
+ :short_message => "Chef run completed on #{node.name} in #{elapsed_time}. Updated #{changes[:count]} resources.",
72
+ :full_message => changes[:message]
73
+ }
74
+ Chef::Log.debug "Notifying Rabbit server of success: #{message.pretty_inspect}"
75
+ exchange.publish(message.to_json, :routing_key => @options[:queue][:name])
78
76
  end
79
77
 
80
78
  connection.close
@@ -23,6 +23,6 @@
23
23
 
24
24
  class Chef
25
25
  module RABBIT
26
- VERSION = "1.0.6"
26
+ VERSION = "1.0.7"
27
27
  end
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-rabbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - MTN Satellite Communications