chef-handler-datadog 0.14.0 → 0.15.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb4f3988ce00909d5dc11ce38fd7757bf5269d2be1f27c2deecd80d8937281aa
4
- data.tar.gz: 5e3ebfb028f6ef88229241914f16a99d18d7b40b844bb1dda22230e49421eaaa
3
+ metadata.gz: 6c32c1f06c76260e05badf2dedfee051408ae3100d190f8dab77dabd7f296876
4
+ data.tar.gz: 80a715b2910eb6ff4aefd6a12c341fd2984ce76890741432b9d78b256649a797
5
5
  SHA512:
6
- metadata.gz: 10b1c0bd44d33c2b48d3eb399dda12479978db3eb0e7f31140e3a2f49db76cfaba3998b447a139e92592001ac7655f98897100f8754e5536b00c34033c4f9cea
7
- data.tar.gz: 5bd8dc74a69948d61847f925a8a802e0ac048ceedd488408480c61c4e5537bd983248e4622e7ac71be17e05bcbdaeff18e588da0e8da26aa8717a94132956935
6
+ metadata.gz: edc1cae87e010dbd41869d6b81228e25ee8c16a632dcc28ccd94860d98e02f4964a32afda0d25ec4aa89d9fd3a55bf409570811e3509fe57e72cb6425ba2e65d
7
+ data.tar.gz: c622db9bbb874330be12384645f319b882011dfcb93c264c000a49a5e3ed260bd7599c27938c591bc71c29c50c5cf28babbe6872fe44de70e482330956dc8037
@@ -1,6 +1,10 @@
1
1
  Changes
2
2
  =======
3
3
 
4
+ # 0.15.0 / 2020-12-10
5
+
6
+ * [FEATURE] Allow skipping SSL verification [#130][]
7
+
4
8
  # 0.14.0 / 2020-11-09
5
9
 
6
10
  * [MISC] Update dogapi gem dependency from 1.38 to 1.42. [#124][]
@@ -153,6 +157,7 @@ And all other versions were prior to this. See git history for more.
153
157
  [#119]: https://github.com/DataDog/chef-handler-datadog/issues/119
154
158
  [#123]: https://github.com/DataDog/chef-handler-datadog/issues/123
155
159
  [#124]: https://github.com/DataDog/chef-handler-datadog/issues/124
160
+ [#130]: https://github.com/DataDog/chef-handler-datadog/issues/130
156
161
  [@ABrehm264]: https://github.com/ABrehm264
157
162
  [@Azoam]: https://github.com/Azoam
158
163
  [@DanielMuller]: https://github.com/DanielMuller
@@ -176,4 +181,4 @@ And all other versions were prior to this. See git history for more.
176
181
  [@remeh]: https://github.com/remeh
177
182
  [@remh]: https://github.com/remh
178
183
  [@rlaveycal]: https://github.com/rlaveycal
179
- [@rmoriz]: https://github.com/rmoriz
184
+ [@rmoriz]: https://github.com/rmoriz
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ['lib']
16
16
  gem.extra_rdoc_files = ['README.md', 'LICENSE.txt']
17
17
 
18
- gem.add_dependency 'dogapi', '~> 1.42.0'
18
+ gem.add_dependency 'dogapi', '~> 1.44.0'
19
19
 
20
20
  gem.add_development_dependency 'appraisal', '~> 2.0.1'
21
21
  gem.add_development_dependency 'bundler'
@@ -129,15 +129,20 @@ class Chef
129
129
  def prepare_the_pack
130
130
  dogs = []
131
131
  endpoints.each do |url, api_key, app_key|
132
- dogs.push(Dogapi::Client.new(
133
- api_key,
134
- app_key,
135
- nil, # host
136
- nil, # device
137
- false, # silent
138
- nil, # timeout
139
- url
140
- ))
132
+ begin
133
+ dogs.push(Dogapi::Client.new(
134
+ api_key,
135
+ app_key,
136
+ nil, # host
137
+ nil, # device
138
+ false, # silent
139
+ nil, # timeout
140
+ url,
141
+ config[:skip_ssl_validation]
142
+ ))
143
+ rescue => e
144
+ Chef::Log.error("Could not create API Client '#{url}'\n #{e.to_s}")
145
+ end
141
146
  end
142
147
  dogs
143
148
  end
@@ -2,5 +2,5 @@
2
2
  # Helper module for version number only.
3
3
  # Real deal in 'chef/handler/datadog.rb'
4
4
  module ChefHandlerDatadog
5
- VERSION = '0.14.0'
5
+ VERSION = '0.15.0'
6
6
  end
@@ -192,6 +192,24 @@ describe Chef::Handler::Datadog, vcr: :new_episodes do
192
192
  host: 'my-imaginary-hostname.local'),
193
193
  )).to have_been_made.times(1)
194
194
  end
195
+
196
+ describe 'when dogapi-rb fails to calculate a hostname' do
197
+ before(:each) do
198
+ allow(Dogapi::Client).to receive(:new).and_raise("getaddrinfo: Name or service not known")
199
+
200
+ @handler = Chef::Handler::Datadog.new(
201
+ api_key: API_KEY,
202
+ application_key: APPLICATION_KEY,
203
+ )
204
+ end
205
+
206
+ it 'the reporter should not fail the chef run' do
207
+ @handler.config[:hostname] = 'my-imaginary-hostname.local'
208
+ @handler.run_report_unsafe(@run_status)
209
+
210
+ expect(a_request(:post, EVENTS_ENDPOINT)).to have_been_made.times(0)
211
+ end
212
+ end
195
213
  end
196
214
 
197
215
  context 'tags' do
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fiedler
8
8
  - Adam Jacob
9
9
  - Alexis Le-Quoc
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-09 00:00:00.000000000 Z
13
+ date: 2020-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dogapi
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 1.42.0
21
+ version: 1.44.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 1.42.0
28
+ version: 1.44.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: appraisal
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -233,7 +233,7 @@ homepage: http://www.datadoghq.com/
233
233
  licenses:
234
234
  - BSD
235
235
  metadata: {}
236
- post_install_message:
236
+ post_install_message:
237
237
  rdoc_options: []
238
238
  require_paths:
239
239
  - lib
@@ -248,8 +248,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.1.2
252
- signing_key:
251
+ rubyforge_project:
252
+ rubygems_version: 2.7.6
253
+ signing_key:
253
254
  specification_version: 4
254
255
  summary: Chef Handler reports events and metrics to Datadog
255
256
  test_files: