chef-handler-datadog 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +1 -2
  3. data/.rubocop.yml +3 -1
  4. data/.travis.yml +3 -2
  5. data/Appraisals +4 -4
  6. data/CHANGELOG.md +12 -1
  7. data/chef-handler-datadog.gemspec +6 -6
  8. data/gemfiles/chef_10.26.0.gemfile +1 -1
  9. data/gemfiles/chef_10.26.0.gemfile.lock +140 -0
  10. data/gemfiles/chef_10.32.2.gemfile +13 -0
  11. data/gemfiles/chef_10.32.2.gemfile.lock +140 -0
  12. data/gemfiles/{chef_10.14.0.gemfile → chef_11.10.4.gemfile} +2 -2
  13. data/gemfiles/chef_11.10.4.gemfile.lock +143 -0
  14. data/gemfiles/{chef_10.30.2.gemfile → chef_11.12.2.gemfile} +2 -2
  15. data/gemfiles/chef_11.12.2.gemfile.lock +139 -0
  16. data/gemfiles/chef_11.8.2.gemfile +1 -2
  17. data/gemfiles/chef_11.8.2.gemfile.lock +143 -0
  18. data/lib/chef/handler/datadog.rb +102 -79
  19. data/lib/{chef-handler-datadog.rb → chef_handler_datadog.rb} +1 -1
  20. data/spec/datadog_spec.rb +55 -7
  21. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +363 -0
  22. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +25 -60
  23. data/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +25 -60
  24. data/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +20 -20
  25. data/spec/support/cassettes/Chef_Handler_Datadog/handles_tags_correctly/sets_the_role_and_env_and_tags.yml +25 -60
  26. 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 → hostname/uses_the_node_name_when_no_config_specified.yml} +30 -65
  27. data/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +179 -0
  28. 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 +23 -58
  29. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +23 -58
  30. data/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +23 -58
  31. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +23 -58
  32. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +23 -58
  33. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +23 -58
  34. data/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/{get_and_set_tags → sets_tags}/puts_the_tags_for_the_current_node.yml +23 -58
  35. data/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +23 -58
  36. metadata +28 -18
@@ -2,11 +2,11 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "chef", "10.14.0"
5
+ gem "chef", "11.10.4"
6
6
 
7
7
  group :localdev do
8
8
  gem "pry"
9
9
  gem "travis-lint"
10
10
  end
11
11
 
12
- gemspec :path=>".././"
12
+ gemspec :path => "../"
@@ -0,0 +1,143 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ chef-handler-datadog (0.4.0.alpha)
5
+ dogapi (>= 1.6)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ addressable (2.3.6)
11
+ appraisal (1.0.0)
12
+ bundler
13
+ rake
14
+ thor (>= 0.14.0)
15
+ ast (1.1.0)
16
+ chef (11.10.4)
17
+ chef-zero (~> 1.7, >= 1.7.2)
18
+ diff-lcs (~> 1.2, >= 1.2.4)
19
+ erubis (~> 2.7)
20
+ highline (~> 1.6, >= 1.6.9)
21
+ json (>= 1.4.4, <= 1.8.1)
22
+ mime-types (~> 1.16)
23
+ mixlib-authentication (~> 1.3)
24
+ mixlib-cli (~> 1.4)
25
+ mixlib-config (~> 2.0)
26
+ mixlib-log (~> 1.3)
27
+ mixlib-shellout (~> 1.3)
28
+ net-ssh (~> 2.6)
29
+ net-ssh-multi (~> 1.1)
30
+ ohai (~> 6.0)
31
+ pry (~> 0.9)
32
+ puma (~> 1.6)
33
+ rest-client (>= 1.0.4, < 1.7.0)
34
+ yajl-ruby (~> 1.1)
35
+ chef-zero (1.7.3)
36
+ hashie (~> 2.0)
37
+ json
38
+ mixlib-log (~> 1.3)
39
+ moneta (< 0.7.0)
40
+ rack
41
+ coderay (1.1.0)
42
+ crack (0.4.1)
43
+ safe_yaml (~> 0.9.0)
44
+ diff-lcs (1.2.5)
45
+ docile (1.1.3)
46
+ dogapi (1.9.2)
47
+ json (>= 1.5.1)
48
+ dotenv (0.10.0)
49
+ erubis (2.7.0)
50
+ hashie (2.1.1)
51
+ hashr (0.0.22)
52
+ highline (1.6.21)
53
+ ipaddress (0.8.0)
54
+ json (1.8.1)
55
+ method_source (0.8.2)
56
+ mime-types (1.25.1)
57
+ mixlib-authentication (1.3.0)
58
+ mixlib-log
59
+ mixlib-cli (1.4.0)
60
+ mixlib-config (2.1.0)
61
+ mixlib-log (1.6.0)
62
+ mixlib-shellout (1.4.0)
63
+ moneta (0.6.0)
64
+ multi_json (1.9.2)
65
+ net-ssh (2.8.0)
66
+ net-ssh-gateway (1.2.0)
67
+ net-ssh (>= 2.6.5)
68
+ net-ssh-multi (1.2.0)
69
+ net-ssh (>= 2.6.5)
70
+ net-ssh-gateway (>= 1.2.0)
71
+ ohai (6.22.0)
72
+ ipaddress
73
+ mixlib-cli
74
+ mixlib-config
75
+ mixlib-log
76
+ mixlib-shellout
77
+ systemu (~> 2.5.2)
78
+ yajl-ruby
79
+ parser (2.1.8)
80
+ ast (~> 1.1)
81
+ slop (~> 3.4, >= 3.4.5)
82
+ powerpack (0.0.9)
83
+ pry (0.9.12.6)
84
+ coderay (~> 1.0)
85
+ method_source (~> 0.8)
86
+ slop (~> 3.4)
87
+ puma (1.6.3)
88
+ rack (~> 1.2)
89
+ rack (1.5.2)
90
+ rainbow (2.0.0)
91
+ rake (10.3.1)
92
+ rest-client (1.6.7)
93
+ mime-types (>= 1.16)
94
+ rspec (2.14.1)
95
+ rspec-core (~> 2.14.0)
96
+ rspec-expectations (~> 2.14.0)
97
+ rspec-mocks (~> 2.14.0)
98
+ rspec-core (2.14.8)
99
+ rspec-expectations (2.14.5)
100
+ diff-lcs (>= 1.1.3, < 2.0)
101
+ rspec-mocks (2.14.6)
102
+ rubocop (0.20.1)
103
+ json (>= 1.7.7, < 2)
104
+ parser (~> 2.1.7)
105
+ powerpack (~> 0.0.6)
106
+ rainbow (>= 1.99.1, < 3.0)
107
+ ruby-progressbar (~> 1.4)
108
+ ruby-progressbar (1.4.2)
109
+ safe_yaml (0.9.7)
110
+ simplecov (0.8.2)
111
+ docile (~> 1.1.0)
112
+ multi_json
113
+ simplecov-html (~> 0.8.0)
114
+ simplecov-html (0.8.0)
115
+ slop (3.5.0)
116
+ systemu (2.5.2)
117
+ thor (0.19.1)
118
+ travis-lint (1.8.0)
119
+ hashr (~> 0.0.22)
120
+ safe_yaml (~> 0.9.0)
121
+ vcr (2.9.0)
122
+ webmock (1.17.4)
123
+ addressable (>= 2.2.7)
124
+ crack (>= 0.3.2)
125
+ yajl-ruby (1.2.0)
126
+
127
+ PLATFORMS
128
+ ruby
129
+
130
+ DEPENDENCIES
131
+ appraisal (~> 1.0.0)
132
+ bundler
133
+ chef (= 11.10.4)
134
+ chef-handler-datadog!
135
+ dotenv
136
+ pry
137
+ rake
138
+ rspec
139
+ rubocop (~> 0.20.1)
140
+ simplecov
141
+ travis-lint
142
+ vcr
143
+ webmock
@@ -2,11 +2,11 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "chef", "10.30.2"
5
+ gem "chef", "11.12.2"
6
6
 
7
7
  group :localdev do
8
8
  gem "pry"
9
9
  gem "travis-lint"
10
10
  end
11
11
 
12
- gemspec :path=>".././"
12
+ gemspec :path => "../"
@@ -0,0 +1,139 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ chef-handler-datadog (0.4.0.alpha)
5
+ dogapi (>= 1.6)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ addressable (2.3.6)
11
+ appraisal (1.0.0)
12
+ bundler
13
+ rake
14
+ thor (>= 0.14.0)
15
+ ast (1.1.0)
16
+ chef (11.12.2)
17
+ chef-zero (~> 2.0, >= 2.0.2)
18
+ diff-lcs (~> 1.2, >= 1.2.4)
19
+ erubis (~> 2.7)
20
+ highline (~> 1.6, >= 1.6.9)
21
+ json (>= 1.4.4, <= 1.8.1)
22
+ mime-types (~> 1.16)
23
+ mixlib-authentication (~> 1.3)
24
+ mixlib-cli (~> 1.4)
25
+ mixlib-config (~> 2.0)
26
+ mixlib-log (~> 1.3)
27
+ mixlib-shellout (~> 1.4)
28
+ net-ssh (~> 2.6)
29
+ net-ssh-multi (~> 1.1)
30
+ ohai (~> 7.0)
31
+ pry (~> 0.9)
32
+ rest-client (>= 1.0.4, < 1.7.0)
33
+ yajl-ruby (~> 1.1)
34
+ chef-zero (2.0.2)
35
+ hashie (~> 2.0)
36
+ json
37
+ mixlib-log (~> 1.3)
38
+ rack
39
+ coderay (1.1.0)
40
+ crack (0.4.1)
41
+ safe_yaml (~> 0.9.0)
42
+ diff-lcs (1.2.5)
43
+ docile (1.1.3)
44
+ dogapi (1.9.2)
45
+ json (>= 1.5.1)
46
+ dotenv (0.10.0)
47
+ erubis (2.7.0)
48
+ hashie (2.1.1)
49
+ hashr (0.0.22)
50
+ highline (1.6.21)
51
+ ipaddress (0.8.0)
52
+ json (1.8.1)
53
+ method_source (0.8.2)
54
+ mime-types (1.25.1)
55
+ mixlib-authentication (1.3.0)
56
+ mixlib-log
57
+ mixlib-cli (1.4.0)
58
+ mixlib-config (2.1.0)
59
+ mixlib-log (1.6.0)
60
+ mixlib-shellout (1.4.0)
61
+ multi_json (1.9.2)
62
+ net-ssh (2.8.0)
63
+ net-ssh-gateway (1.2.0)
64
+ net-ssh (>= 2.6.5)
65
+ net-ssh-multi (1.2.0)
66
+ net-ssh (>= 2.6.5)
67
+ net-ssh-gateway (>= 1.2.0)
68
+ ohai (7.0.2)
69
+ ipaddress
70
+ mime-types (~> 1.16)
71
+ mixlib-cli
72
+ mixlib-config (~> 2.0)
73
+ mixlib-log
74
+ mixlib-shellout (~> 1.2)
75
+ systemu (~> 2.5.2)
76
+ yajl-ruby
77
+ parser (2.1.8)
78
+ ast (~> 1.1)
79
+ slop (~> 3.4, >= 3.4.5)
80
+ powerpack (0.0.9)
81
+ pry (0.9.12.6)
82
+ coderay (~> 1.0)
83
+ method_source (~> 0.8)
84
+ slop (~> 3.4)
85
+ rack (1.5.2)
86
+ rainbow (2.0.0)
87
+ rake (10.3.1)
88
+ rest-client (1.6.7)
89
+ mime-types (>= 1.16)
90
+ rspec (2.14.1)
91
+ rspec-core (~> 2.14.0)
92
+ rspec-expectations (~> 2.14.0)
93
+ rspec-mocks (~> 2.14.0)
94
+ rspec-core (2.14.8)
95
+ rspec-expectations (2.14.5)
96
+ diff-lcs (>= 1.1.3, < 2.0)
97
+ rspec-mocks (2.14.6)
98
+ rubocop (0.20.1)
99
+ json (>= 1.7.7, < 2)
100
+ parser (~> 2.1.7)
101
+ powerpack (~> 0.0.6)
102
+ rainbow (>= 1.99.1, < 3.0)
103
+ ruby-progressbar (~> 1.4)
104
+ ruby-progressbar (1.4.2)
105
+ safe_yaml (0.9.7)
106
+ simplecov (0.8.2)
107
+ docile (~> 1.1.0)
108
+ multi_json
109
+ simplecov-html (~> 0.8.0)
110
+ simplecov-html (0.8.0)
111
+ slop (3.5.0)
112
+ systemu (2.5.2)
113
+ thor (0.19.1)
114
+ travis-lint (1.8.0)
115
+ hashr (~> 0.0.22)
116
+ safe_yaml (~> 0.9.0)
117
+ vcr (2.9.0)
118
+ webmock (1.17.4)
119
+ addressable (>= 2.2.7)
120
+ crack (>= 0.3.2)
121
+ yajl-ruby (1.2.0)
122
+
123
+ PLATFORMS
124
+ ruby
125
+
126
+ DEPENDENCIES
127
+ appraisal (~> 1.0.0)
128
+ bundler
129
+ chef (= 11.12.2)
130
+ chef-handler-datadog!
131
+ dotenv
132
+ pry
133
+ rake
134
+ rspec
135
+ rubocop (~> 0.20.1)
136
+ simplecov
137
+ travis-lint
138
+ vcr
139
+ webmock
@@ -3,11 +3,10 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "chef", "11.8.2"
6
- gem "json", "1.7.7"
7
6
 
8
7
  group :localdev do
9
8
  gem "pry"
10
9
  gem "travis-lint"
11
10
  end
12
11
 
13
- gemspec :path=>".././"
12
+ gemspec :path => "../"
@@ -0,0 +1,143 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ chef-handler-datadog (0.4.0.alpha)
5
+ dogapi (>= 1.6)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ addressable (2.3.6)
11
+ appraisal (1.0.0)
12
+ bundler
13
+ rake
14
+ thor (>= 0.14.0)
15
+ ast (1.1.0)
16
+ chef (11.8.2)
17
+ chef-zero (~> 1.6, >= 1.6.2)
18
+ diff-lcs (~> 1.2, >= 1.2.4)
19
+ erubis (~> 2.7)
20
+ highline (~> 1.6, >= 1.6.9)
21
+ json (>= 1.4.4, <= 1.7.7)
22
+ mime-types (~> 1.16)
23
+ mixlib-authentication (~> 1.3)
24
+ mixlib-cli (~> 1.3)
25
+ mixlib-config (~> 2.0)
26
+ mixlib-log (~> 1.3)
27
+ mixlib-shellout (~> 1.2)
28
+ net-ssh (~> 2.6)
29
+ net-ssh-multi (~> 1.1.0)
30
+ ohai (~> 6.0)
31
+ pry (~> 0.9)
32
+ puma (~> 1.6)
33
+ rest-client (>= 1.0.4, < 1.7.0)
34
+ yajl-ruby (~> 1.1)
35
+ chef-zero (1.7.3)
36
+ hashie (~> 2.0)
37
+ json
38
+ mixlib-log (~> 1.3)
39
+ moneta (< 0.7.0)
40
+ rack
41
+ coderay (1.1.0)
42
+ crack (0.4.1)
43
+ safe_yaml (~> 0.9.0)
44
+ diff-lcs (1.2.5)
45
+ docile (1.1.3)
46
+ dogapi (1.9.2)
47
+ json (>= 1.5.1)
48
+ dotenv (0.10.0)
49
+ erubis (2.7.0)
50
+ hashie (2.1.1)
51
+ hashr (0.0.22)
52
+ highline (1.6.21)
53
+ ipaddress (0.8.0)
54
+ json (1.7.7)
55
+ method_source (0.8.2)
56
+ mime-types (1.25.1)
57
+ mixlib-authentication (1.3.0)
58
+ mixlib-log
59
+ mixlib-cli (1.4.0)
60
+ mixlib-config (2.1.0)
61
+ mixlib-log (1.6.0)
62
+ mixlib-shellout (1.4.0)
63
+ moneta (0.6.0)
64
+ multi_json (1.9.2)
65
+ net-ssh (2.8.0)
66
+ net-ssh-gateway (1.2.0)
67
+ net-ssh (>= 2.6.5)
68
+ net-ssh-multi (1.1)
69
+ net-ssh (>= 2.1.4)
70
+ net-ssh-gateway (>= 0.99.0)
71
+ ohai (6.22.0)
72
+ ipaddress
73
+ mixlib-cli
74
+ mixlib-config
75
+ mixlib-log
76
+ mixlib-shellout
77
+ systemu (~> 2.5.2)
78
+ yajl-ruby
79
+ parser (2.1.8)
80
+ ast (~> 1.1)
81
+ slop (~> 3.4, >= 3.4.5)
82
+ powerpack (0.0.9)
83
+ pry (0.9.12.6)
84
+ coderay (~> 1.0)
85
+ method_source (~> 0.8)
86
+ slop (~> 3.4)
87
+ puma (1.6.3)
88
+ rack (~> 1.2)
89
+ rack (1.5.2)
90
+ rainbow (2.0.0)
91
+ rake (10.3.1)
92
+ rest-client (1.6.7)
93
+ mime-types (>= 1.16)
94
+ rspec (2.14.1)
95
+ rspec-core (~> 2.14.0)
96
+ rspec-expectations (~> 2.14.0)
97
+ rspec-mocks (~> 2.14.0)
98
+ rspec-core (2.14.8)
99
+ rspec-expectations (2.14.5)
100
+ diff-lcs (>= 1.1.3, < 2.0)
101
+ rspec-mocks (2.14.6)
102
+ rubocop (0.20.1)
103
+ json (>= 1.7.7, < 2)
104
+ parser (~> 2.1.7)
105
+ powerpack (~> 0.0.6)
106
+ rainbow (>= 1.99.1, < 3.0)
107
+ ruby-progressbar (~> 1.4)
108
+ ruby-progressbar (1.4.2)
109
+ safe_yaml (0.9.7)
110
+ simplecov (0.8.2)
111
+ docile (~> 1.1.0)
112
+ multi_json
113
+ simplecov-html (~> 0.8.0)
114
+ simplecov-html (0.8.0)
115
+ slop (3.5.0)
116
+ systemu (2.5.2)
117
+ thor (0.19.1)
118
+ travis-lint (1.8.0)
119
+ hashr (~> 0.0.22)
120
+ safe_yaml (~> 0.9.0)
121
+ vcr (2.9.0)
122
+ webmock (1.17.4)
123
+ addressable (>= 2.2.7)
124
+ crack (>= 0.3.2)
125
+ yajl-ruby (1.2.0)
126
+
127
+ PLATFORMS
128
+ ruby
129
+
130
+ DEPENDENCIES
131
+ appraisal (~> 1.0.0)
132
+ bundler
133
+ chef (= 11.8.2)
134
+ chef-handler-datadog!
135
+ dotenv
136
+ pry
137
+ rake
138
+ rspec
139
+ rubocop (~> 0.20.1)
140
+ simplecov
141
+ travis-lint
142
+ vcr
143
+ webmock