chef-handler-datadog 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +9 -9
  2. data/.gitignore +4 -3
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +36 -0
  5. data/.travis.yml +7 -2
  6. data/Appraisals +24 -0
  7. data/CHANGELOG.md +23 -0
  8. data/Gemfile +7 -1
  9. data/README.md +16 -3
  10. data/Rakefile +7 -7
  11. data/chef-handler-datadog.gemspec +17 -12
  12. data/gemfiles/chef_10.14.0.gemfile +12 -0
  13. data/gemfiles/chef_10.26.0.gemfile +13 -0
  14. data/gemfiles/chef_10.30.2.gemfile +12 -0
  15. data/gemfiles/chef_11.8.2.gemfile +13 -0
  16. data/lib/chef-handler-datadog.rb +4 -1
  17. data/lib/chef/handler/datadog.rb +112 -89
  18. data/spec/datadog_spec.rb +279 -0
  19. data/spec/spec_helper.rb +48 -0
  20. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +218 -0
  21. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +218 -0
  22. data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +142 -0
  23. data/spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml +215 -0
  24. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml +214 -0
  25. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +214 -0
  26. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +214 -0
  27. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +214 -0
  28. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +214 -0
  29. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +214 -0
  30. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/gets_the_tags_for_the_current_node.yml +214 -0
  31. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/puts_the_tags_for_the_current_node.yml +214 -0
  32. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +217 -0
  33. metadata +102 -15
  34. data/gemfiles/Gemfile.chef-10 +0 -5
  35. data/gemfiles/Gemfile.chef-11 +0 -5
  36. data/test/helper.rb +0 -18
  37. data/test/test_chef-handler-datadog.rb +0 -7
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fiedler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-31 00:00:00.000000000 Z
13
+ date: 2014-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dogapi
@@ -26,6 +26,20 @@ dependencies:
26
26
  - - ! '>='
27
27
  - !ruby/object:Gem::Version
28
28
  version: '1.2'
29
+ - !ruby/object:Gem::Dependency
30
+ name: appraisal
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: 1.0.0.beta2
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ~>
41
+ - !ruby/object:Gem::Version
42
+ version: 1.0.0.beta2
29
43
  - !ruby/object:Gem::Dependency
30
44
  name: bundler
31
45
  requirement: !ruby/object:Gem::Requirement
@@ -60,6 +74,20 @@ dependencies:
60
74
  - - <=
61
75
  - !ruby/object:Gem::Version
62
76
  version: '12'
77
+ - !ruby/object:Gem::Dependency
78
+ name: dotenv
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
63
91
  - !ruby/object:Gem::Dependency
64
92
  name: rake
65
93
  requirement: !ruby/object:Gem::Requirement
@@ -89,21 +117,49 @@ dependencies:
89
117
  - !ruby/object:Gem::Version
90
118
  version: '0'
91
119
  - !ruby/object:Gem::Dependency
92
- name: tailor
120
+ name: rubocop
93
121
  requirement: !ruby/object:Gem::Requirement
94
122
  requirements:
95
- - - ~>
123
+ - - ! '>='
96
124
  - !ruby/object:Gem::Version
97
- version: '1.3'
125
+ version: '0'
98
126
  type: :development
99
127
  prerelease: false
100
128
  version_requirements: !ruby/object:Gem::Requirement
101
129
  requirements:
102
- - - ~>
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ - !ruby/object:Gem::Dependency
134
+ name: simplecov
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ! '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ type: :development
141
+ prerelease: false
142
+ version_requirements: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ! '>='
103
145
  - !ruby/object:Gem::Version
104
- version: '1.3'
146
+ version: '0'
147
+ - !ruby/object:Gem::Dependency
148
+ name: vcr
149
+ requirement: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ type: :development
155
+ prerelease: false
156
+ version_requirements: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
105
161
  - !ruby/object:Gem::Dependency
106
- name: travis-lint
162
+ name: webmock
107
163
  requirement: !ruby/object:Gem::Requirement
108
164
  requirements:
109
165
  - - ! '>='
@@ -127,19 +183,37 @@ extra_rdoc_files:
127
183
  - LICENSE.txt
128
184
  files:
129
185
  - .gitignore
186
+ - .rspec
187
+ - .rubocop.yml
130
188
  - .travis.yml
189
+ - Appraisals
131
190
  - CHANGELOG.md
132
191
  - Gemfile
133
192
  - LICENSE.txt
134
193
  - README.md
135
194
  - Rakefile
136
195
  - chef-handler-datadog.gemspec
137
- - gemfiles/Gemfile.chef-10
138
- - gemfiles/Gemfile.chef-11
196
+ - gemfiles/chef_10.14.0.gemfile
197
+ - gemfiles/chef_10.26.0.gemfile
198
+ - gemfiles/chef_10.30.2.gemfile
199
+ - gemfiles/chef_11.8.2.gemfile
139
200
  - lib/chef-handler-datadog.rb
140
201
  - lib/chef/handler/datadog.rb
141
- - test/helper.rb
142
- - test/test_chef-handler-datadog.rb
202
+ - spec/datadog_spec.rb
203
+ - spec/spec_helper.rb
204
+ - spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml
205
+ - spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml
206
+ - spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml
207
+ - spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml
208
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml
209
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml
210
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml
211
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml
212
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml
213
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml
214
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/gets_the_tags_for_the_current_node.yml
215
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/puts_the_tags_for_the_current_node.yml
216
+ - spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml
143
217
  homepage: http://www.datadoghq.com/
144
218
  licenses:
145
219
  - BSD
@@ -160,10 +234,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
234
  version: '0'
161
235
  requirements: []
162
236
  rubyforge_project:
163
- rubygems_version: 2.0.5
237
+ rubygems_version: 2.1.11
164
238
  signing_key:
165
239
  specification_version: 4
166
240
  summary: Chef Handler for DataDog events and metrics
167
241
  test_files:
168
- - test/helper.rb
169
- - test/test_chef-handler-datadog.rb
242
+ - spec/datadog_spec.rb
243
+ - spec/spec_helper.rb
244
+ - spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml
245
+ - spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml
246
+ - spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml
247
+ - spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml
248
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml
249
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml
250
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml
251
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml
252
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml
253
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml
254
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/gets_the_tags_for_the_current_node.yml
255
+ - spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/get_and_set_tags/puts_the_tags_for_the_current_node.yml
256
+ - spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'chef', '~> 10.0'
4
-
5
- gemspec :path => '..'
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'chef', '~> 11.2'
4
-
5
- gemspec :path => '..'
data/test/helper.rb DELETED
@@ -1,18 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'chef/handler/datadog'
16
-
17
- class Test::Unit::TestCase
18
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestChefHandlerDatadog < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- # flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end