hipchat 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be4faa179685cdd34630559010e1f4f8433d12d2
4
- data.tar.gz: ceb3933c95e331a8735199c0cf3f284bfdad078c
3
+ metadata.gz: 004d4b56bb26781381bb8042280fe2efdcfec827
4
+ data.tar.gz: e8646ef5ec31d6a8f4769c8a855d32ec63af261e
5
5
  SHA512:
6
- metadata.gz: 6a0d5ce3f382e4ac4a4b04890361e92d7a886570752c21567c6e74c163e67b8873e15be661fc321f4c5267fd203d36dcb29a4815e22feabda17c22308862a871
7
- data.tar.gz: 0b75dfbccbff349ca3eab259b458da322a7cc9875d0cba17fcf69183d37549231d175a9302d173083138503d6f4933e4be24ebc2027cc55c2cf1457ba8d61c69
6
+ metadata.gz: 269929c7b83d39802fb6e01754f6e83b8ba3f9c1d15f8819099e28da9c1a5a420f3701a7c914bfa4a162822ea91614c9bd9717c92174b445b2ee01ad8a70826b
7
+ data.tar.gz: df3ff14dc5f4e9dc5864d5a09260957a764fef1adcc66a38a1b6084284450258317c005e15065fd8188a130d5cb7e01ec3e07d5da817f1728ddc75f321a62dee
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "httparty"
21
+ spec.add_dependency "httparty", "~> 0.11.0"
22
22
 
23
23
  spec.add_development_dependency "rspec"
24
24
  spec.add_development_dependency "rr"
@@ -15,27 +15,30 @@ require 'hipchat'
15
15
  module HipChat
16
16
  class NotifyRoom < Chef::Handler
17
17
 
18
- def initialize(api_token, room_name, notify_users=false, report_success=false)
18
+ def initialize(api_token, room_name, excluded_envs=[], notify_users=false, report_success=false)
19
19
  @api_token = api_token
20
20
  @room_name = room_name
21
+ @excluded_envs = excluded_envs
21
22
  @notify_users = notify_users
22
23
  @report_success = report_success
23
24
  end
24
25
 
25
26
  def report
26
- msg = if run_status.failed? then "Failure on \"#{node.name}\": #{run_status.formatted_exception}"
27
- elsif run_status.success? && @report_success
28
- "Chef run on \"#{node.name}\" completed in #{run_status.elapsed_time.round(2)} seconds"
29
- else nil
30
- end
31
-
32
- color = if run_status.success? then 'green'
33
- else 'red'
27
+ unless excluded_envs.include?(node.chef_environment)
28
+ msg = if run_status.failed? then "Failure on \"#{node.name}\" (\"#{node.chef_environment}\" env): #{run_status.formatted_exception}"
29
+ elsif run_status.success? && @report_success
30
+ "Chef run on \"#{node.name}\" completed in #{run_status.elapsed_time.round(2)} seconds"
31
+ else nil
34
32
  end
35
33
 
36
- if msg
37
- client = HipChat::Client.new(@api_token)
38
- client[@room_name].send('Chef', msg, :notify => @notify_users, :color => color)
34
+ color = if run_status.success? then 'green'
35
+ else 'red'
36
+ end
37
+
38
+ if msg
39
+ client = HipChat::Client.new(@api_token)
40
+ client[@room_name].send('Chef', msg, :notify => @notify_users, :color => color)
41
+ end
39
42
  end
40
43
  end
41
44
  end
@@ -1,3 +1,3 @@
1
1
  module HipChat
2
- VERSION = "0.12.0"
2
+ VERSION = "0.13.0"
3
3
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HipChat/Atlassian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-06 00:00:00.000000000 Z
11
+ date: 2013-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.11.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.11.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rr
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rdoc
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>'
101
+ - - ">"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 2.4.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>'
108
+ - - ">"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.4.2
111
111
  description: Ruby library to interact with HipChat
@@ -115,9 +115,9 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .document
119
- - .gitignore
120
- - .travis.yml
118
+ - ".document"
119
+ - ".gitignore"
120
+ - ".travis.yml"
121
121
  - Gemfile
122
122
  - LICENSE
123
123
  - README.textile
@@ -143,12 +143,12 @@ require_paths:
143
143
  - lib
144
144
  required_ruby_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
- - - '>='
146
+ - - ">="
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - '>='
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
@@ -162,3 +162,4 @@ test_files:
162
162
  - spec/hipchat_spec.rb
163
163
  - spec/spec.opts
164
164
  - spec/spec_helper.rb
165
+ has_rdoc: