dogapi 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/capistrano/datadog.rb +27 -21
- data/lib/dogapi/version.rb +1 -1
- metadata +73 -83
data/CHANGELOG.md
CHANGED
data/lib/capistrano/datadog.rb
CHANGED
@@ -119,32 +119,38 @@ module Capistrano
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
Configuration.instance
|
123
|
-
#
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
dog.
|
122
|
+
if Configuration.respond_to? :instance then
|
123
|
+
# Capistrano v2
|
124
|
+
Configuration.instance(:must_exist).load do
|
125
|
+
# Wrap the existing logging target with the Datadog capture class
|
126
|
+
logger.device = Datadog::LogCapture.new logger.device
|
127
|
+
|
128
|
+
# Trigger the Datadog submission once all the tasks have run
|
129
|
+
on :exit, "datadog:submit"
|
130
|
+
namespace :datadog do
|
131
|
+
desc "Submit the tasks that have run to Datadog as events"
|
132
|
+
task :submit do |ns|
|
133
|
+
begin
|
134
|
+
api_key = variables[:datadog_api_key]
|
135
|
+
if api_key
|
136
|
+
dog = Dogapi::Client.new(api_key)
|
137
|
+
Datadog::reporter.report.each do |event|
|
138
|
+
dog.emit_event event
|
139
|
+
end
|
140
|
+
else
|
141
|
+
puts "No api key set, not submitting to Datadog"
|
137
142
|
end
|
138
|
-
|
139
|
-
puts "
|
143
|
+
rescue Timeout::Error => e
|
144
|
+
puts "Could not submit to Datadog, request timed out."
|
145
|
+
rescue => e
|
146
|
+
puts "Could not submit to Datadog: #{e.inspect}\n#{e.backtrace.join("\n")}"
|
140
147
|
end
|
141
|
-
rescue Timeout::Error => e
|
142
|
-
puts "Could not submit to Datadog, request timed out."
|
143
|
-
rescue => e
|
144
|
-
puts "Could not submit to Datadog: #{e.inspect}\n#{e.backtrace.join("\n")}"
|
145
148
|
end
|
146
149
|
end
|
147
150
|
end
|
151
|
+
else
|
152
|
+
# No support yet for Capistrano v3
|
153
|
+
puts "No Datadog events will be sent since Datadog currently only supports Capistrano v2. For more info, see https://github.com/DataDog/dogapi-rb/issues/40."
|
148
154
|
end
|
149
155
|
|
150
156
|
end
|
data/lib/dogapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,91 +1,88 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogapi
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.9.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 9
|
9
|
-
- 0
|
10
|
-
version: 1.9.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Datadog, Inc.
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 1
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 5
|
32
|
-
- 1
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 1.5.1
|
34
22
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: bundler
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.5.1
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
40
33
|
none: false
|
41
|
-
requirements:
|
34
|
+
requirements:
|
42
35
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
segments:
|
46
|
-
- 1
|
47
|
-
- 3
|
48
|
-
version: "1.3"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.3'
|
49
38
|
type: :development
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rake
|
53
39
|
prerelease: false
|
54
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
41
|
none: false
|
56
|
-
requirements:
|
42
|
+
requirements:
|
57
43
|
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '10'
|
63
54
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: rdoc
|
67
55
|
prerelease: false
|
68
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
57
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rdoc
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
77
70
|
type: :development
|
78
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
79
78
|
description: Ruby bindings for Datadog's API
|
80
|
-
email:
|
79
|
+
email:
|
81
80
|
- packages@datadoghq.com
|
82
81
|
executables: []
|
83
|
-
|
84
82
|
extensions: []
|
85
|
-
|
86
|
-
extra_rdoc_files:
|
83
|
+
extra_rdoc_files:
|
87
84
|
- README.rdoc
|
88
|
-
files:
|
85
|
+
files:
|
89
86
|
- .gitignore
|
90
87
|
- .rspec
|
91
88
|
- .tailor
|
@@ -142,44 +139,37 @@ files:
|
|
142
139
|
- tests/test_snapshot.rb
|
143
140
|
- tests/test_users.rb
|
144
141
|
homepage: http://datadoghq.com/
|
145
|
-
licenses:
|
142
|
+
licenses:
|
146
143
|
- BSD
|
147
144
|
post_install_message:
|
148
|
-
rdoc_options:
|
145
|
+
rdoc_options:
|
149
146
|
- --title
|
150
147
|
- DogAPI -- Datadog Client
|
151
148
|
- --main
|
152
149
|
- README.rdoc
|
153
150
|
- --line-numbers
|
154
151
|
- --inline-source
|
155
|
-
require_paths:
|
152
|
+
require_paths:
|
156
153
|
- lib
|
157
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
155
|
none: false
|
159
|
-
requirements:
|
160
|
-
- -
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
|
163
|
-
|
164
|
-
- 0
|
165
|
-
version: "0"
|
166
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
161
|
none: false
|
168
|
-
requirements:
|
169
|
-
- -
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
segments:
|
173
|
-
- 0
|
174
|
-
version: "0"
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
175
166
|
requirements: []
|
176
|
-
|
177
167
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.8.
|
168
|
+
rubygems_version: 1.8.24
|
179
169
|
signing_key:
|
180
170
|
specification_version: 3
|
181
171
|
summary: Ruby bindings for Datadog's API
|
182
|
-
test_files:
|
172
|
+
test_files:
|
183
173
|
- spec/alerts_spec.rb
|
184
174
|
- spec/common_spec.rb
|
185
175
|
- spec/facade_spec.rb
|