pagerduty-sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.git/HEAD +1 -0
- data/.git/config +13 -0
- data/.git/description +1 -0
- data/.git/hooks/applypatch-msg.sample +15 -0
- data/.git/hooks/commit-msg.sample +24 -0
- data/.git/hooks/post-update.sample +8 -0
- data/.git/hooks/pre-applypatch.sample +14 -0
- data/.git/hooks/pre-commit.sample +50 -0
- data/.git/hooks/pre-push.sample +53 -0
- data/.git/hooks/pre-rebase.sample +169 -0
- data/.git/hooks/prepare-commit-msg.sample +36 -0
- data/.git/hooks/update.sample +128 -0
- data/.git/index +0 -0
- data/.git/info/exclude +6 -0
- data/.git/logs/HEAD +1 -0
- data/.git/logs/refs/heads/master +1 -0
- data/.git/logs/refs/remotes/origin/HEAD +1 -0
- data/.git/objects/pack/pack-ef303a32b278847aabbf3023e493ea7a4ca5888f.idx +0 -0
- data/.git/objects/pack/pack-ef303a32b278847aabbf3023e493ea7a4ca5888f.pack +0 -0
- data/.git/packed-refs +2 -0
- data/.git/refs/heads/master +1 -0
- data/.git/refs/remotes/origin/HEAD +1 -0
- data/.gitignore +18 -0
- data/LICENSE +20 -0
- data/README.md +4 -0
- data/lib/.DS_Store +0 -0
- data/lib/.yardoc/checksums +18 -0
- data/lib/.yardoc/object_types +0 -0
- data/lib/.yardoc/objects/root.dat +0 -0
- data/lib/.yardoc/proxy_types +0 -0
- data/lib/pagerduty/.DS_Store +0 -0
- data/lib/pagerduty/core.rb +12 -0
- data/lib/pagerduty/models/agent.rb +5 -0
- data/lib/pagerduty/models/alert.rb +10 -0
- data/lib/pagerduty/models/assigneduser.rb +8 -0
- data/lib/pagerduty/models/channels.rb +44 -0
- data/lib/pagerduty/models/escalationpolicies.rb +127 -0
- data/lib/pagerduty/models/incident.rb +74 -0
- data/lib/pagerduty/models/laststatuschangeby.rb +9 -0
- data/lib/pagerduty/models/log_entry.rb +22 -0
- data/lib/pagerduty/models/maintenance_window.rb +66 -0
- data/lib/pagerduty/models/note.rb +9 -0
- data/lib/pagerduty/models/notification.rb +7 -0
- data/lib/pagerduty/models/report.rb +54 -0
- data/lib/pagerduty/models/resolvedbyuser.rb +9 -0
- data/lib/pagerduty/models/schedule.rb +109 -0
- data/lib/pagerduty/models/service.rb +9 -0
- data/lib/pagerduty/models/services.rb +53 -0
- data/lib/pagerduty/models/triggersummarydata.rb +6 -0
- data/lib/pagerduty/models/user.rb +74 -0
- data/lib/pagerduty/pagerduty.rb +366 -0
- data/lib/pagerduty.rb +31 -0
- data/pagerduty-sdk.gemspec +26 -0
- metadata +141 -0
@@ -0,0 +1,366 @@
|
|
1
|
+
|
2
|
+
class Pagerduty
|
3
|
+
|
4
|
+
attr_reader :token
|
5
|
+
attr_reader :subdomain
|
6
|
+
|
7
|
+
def initialize(options)
|
8
|
+
@@token = options[:token]
|
9
|
+
@@subdomain = options[:subdomain]
|
10
|
+
end
|
11
|
+
|
12
|
+
###################################################################################
|
13
|
+
# def curl
|
14
|
+
#
|
15
|
+
# Purpose: Performs a CURL request
|
16
|
+
#
|
17
|
+
# Params: options<~Hash> - The options Hash to send
|
18
|
+
# uri<~String> - The URI to curl
|
19
|
+
# ssl<~Boolean><Optional> - Whether or not to use SSL
|
20
|
+
# port<~Integer><Optional> - The port number to connect to
|
21
|
+
# params<~Hash><Optional> - The params to send in the curl request
|
22
|
+
# headers<~Hash><Optional> - The headers to send in the curl request
|
23
|
+
# method<~String> - The HTTP method to perform
|
24
|
+
# basic_auth<~Hash><Optional>
|
25
|
+
# user<~String> - Basic auth user
|
26
|
+
# password<~String> - Basic auth password
|
27
|
+
#
|
28
|
+
# Returns: <String>
|
29
|
+
###################################################################################
|
30
|
+
def curl(options)
|
31
|
+
|
32
|
+
curl_request = {
|
33
|
+
ssl: true,
|
34
|
+
port: 443,
|
35
|
+
headers: {
|
36
|
+
"Content-Type" => "application/json",
|
37
|
+
"Authorization" => "Token token=#@@token",
|
38
|
+
},
|
39
|
+
}
|
40
|
+
|
41
|
+
options.merge! curl_request
|
42
|
+
|
43
|
+
url = URI.parse(options[:uri])
|
44
|
+
|
45
|
+
if options[:params]
|
46
|
+
parameters = options[:params].map { |k,v| "#{k}=#{v}" }.join("&")
|
47
|
+
url += "?#{parameters}"
|
48
|
+
end
|
49
|
+
|
50
|
+
http = Net::HTTP.new(url.host, 443)
|
51
|
+
http.use_ssl = true
|
52
|
+
|
53
|
+
request = case options[:method]
|
54
|
+
when 'DELETE'
|
55
|
+
Net::HTTP::Delete.new(url)
|
56
|
+
when 'GET'
|
57
|
+
Net::HTTP::Get.new(url)
|
58
|
+
when 'POST'
|
59
|
+
Net::HTTP::Post.new(url)
|
60
|
+
when 'PUT'
|
61
|
+
Net::HTTP::Put.new(url)
|
62
|
+
end
|
63
|
+
|
64
|
+
if options.has_key?(:data)
|
65
|
+
request.set_form_data(options[:data])
|
66
|
+
end
|
67
|
+
|
68
|
+
if options.has_key?(:basic_auth)
|
69
|
+
request.basic_auth options[:basic_auth][:user], options[:basic_auth][:password]
|
70
|
+
end
|
71
|
+
|
72
|
+
request.body = options[:body]
|
73
|
+
|
74
|
+
options[:headers].each { |key,val| request.add_field(key,val) }
|
75
|
+
|
76
|
+
if options[:method] == 'POST'
|
77
|
+
http.post(url.path,options[:data].to_json,options[:headers])
|
78
|
+
elsif options[:method] == 'PUT'
|
79
|
+
http.put(url.path,options[:data].to_json,options[:headers])
|
80
|
+
else
|
81
|
+
http.request(request)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
def has_requirements?(keys,options)
|
86
|
+
(keys - options.keys).empty?
|
87
|
+
end
|
88
|
+
|
89
|
+
def alerts(options={})
|
90
|
+
|
91
|
+
unless has_requirements? [:since, :until], options
|
92
|
+
puts "#> This function requires arguments :since, :until"
|
93
|
+
puts "Please see: http://developer.pagerduty.com/documentation/rest/alerts/list"
|
94
|
+
return
|
95
|
+
end
|
96
|
+
|
97
|
+
JSON.parse(curl({
|
98
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/alerts",
|
99
|
+
params: options,
|
100
|
+
method: 'GET'
|
101
|
+
}).body)['alerts'].inject([]) { |alerts, alert|
|
102
|
+
alerts << Alert.new(alert)
|
103
|
+
}
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
def escalation_policies(options={})
|
108
|
+
JSON.parse(curl({
|
109
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/escalation_policies",
|
110
|
+
params: { 'query' => options[:query] },
|
111
|
+
method: 'GET'
|
112
|
+
}).body)['escalation_policies'].inject([]) { |policies, policy|
|
113
|
+
policies << EscalationPolicy.new(policy)
|
114
|
+
}
|
115
|
+
end
|
116
|
+
|
117
|
+
def create_escalation_policy(options={})
|
118
|
+
|
119
|
+
if options[:escalation_rules]
|
120
|
+
options[:escalation_rules] = options[:escalation_rules].map { |rule|
|
121
|
+
rule.class == EscalationRule ? rule.hashify : rule
|
122
|
+
}
|
123
|
+
end
|
124
|
+
|
125
|
+
EscalationPolicy.new(JSON.parse(curl({
|
126
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/escalation_policies",
|
127
|
+
data: options,
|
128
|
+
method: 'POST'
|
129
|
+
}).body)['escalation_policy'])
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
def get_escalation_policy(options={})
|
134
|
+
EscalationPolicy.new(JSON.parse(curl({
|
135
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/escalation_policies/#{options[:id]}",
|
136
|
+
method: 'GET'
|
137
|
+
}).body)['escalation_policy'])
|
138
|
+
end
|
139
|
+
|
140
|
+
def escalation_rules(options)
|
141
|
+
JSON.parse(curl({
|
142
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/escalation_policies/#{options[:escalation_policy_id]}/escalation_rules",
|
143
|
+
params: { 'query' => options[:query] },
|
144
|
+
method: 'GET'
|
145
|
+
}).body)['escalation_rules'].inject([]) { |rules, rule|
|
146
|
+
rules << EscalationRule.new(rule)
|
147
|
+
}
|
148
|
+
end
|
149
|
+
|
150
|
+
def get_escalation_rule(options={})
|
151
|
+
JSON.parse(curl({
|
152
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/escalation_policies/#{options[:escalation_policy_id]}/escalation_rules/#{options[:rule_id]}",
|
153
|
+
method: 'GET'
|
154
|
+
}).body)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Retrieve all incidents
|
158
|
+
#
|
159
|
+
# ==== Parameters
|
160
|
+
#
|
161
|
+
# * params<~Hash>
|
162
|
+
# * 'since'<~String>: The start of the date range over which to search
|
163
|
+
# * 'until'<~String>: The end of the date range over which to search
|
164
|
+
# * 'date_range'<~String>: When set to 'all' the 'since' and 'until' params are ignored. Use this to get all incidents since the account was created
|
165
|
+
# * 'fields'<~String>: Used to restrict the properties of each incident returned to a set of pre-defined fields. If omitted, returned incidents have all fields present. See below for a list of possible fields.
|
166
|
+
# * 'status'<~String>: Returns only the incidents currently in the passed status(es). Valid status options are triggered, acknowledged, and resolved. More status codes may be introduced in the future.
|
167
|
+
# * 'incident_key'<~String>: Returns only the incidents with the passed de-duplication key. See the PagerDuty Integration API docs for further details.
|
168
|
+
# * 'service'<~String>: Returns only the incidents associated with the passed service(s). This expects one or more service IDs. Separate multiple IDs by commas.
|
169
|
+
# * 'assigned_to_user'<~String>: Returns only the incidents currently assigned to the passed user(s). This expects one or more user IDs. Please see below for more info on how to find your users' IDs. When using the assigned_to_user filter, you will only receive incidents with statuses of triggered or acknowledged. This is because resolved incidents are not assigned to any user.
|
170
|
+
# * 'time_zone'<~String>: Time zone in which dates in the result will be rendered. Defaults to UTC.
|
171
|
+
# * 'sort_by'<~String>: Used to specify both the field you wish to sort the results on, as well as the direction See API doc for examples.
|
172
|
+
#
|
173
|
+
# ==== Returns
|
174
|
+
# * response<~Array>:
|
175
|
+
# * <~Pagerduty::Incident>:
|
176
|
+
# * 'id'<~String> - Id of request
|
177
|
+
# * 'incident_number'<~String>:
|
178
|
+
# * 'created_on'<~String>:
|
179
|
+
# * 'status'<~String>:
|
180
|
+
# * 'html_url'<~String>:
|
181
|
+
# * 'incident_key'<~String>:
|
182
|
+
# * 'service'<~Pagerduty::Service>
|
183
|
+
# * 'id'<~String>:
|
184
|
+
# * 'name'<~String>:
|
185
|
+
# * 'html_url'<~String>:
|
186
|
+
# * 'deleted_at'<~String>:
|
187
|
+
# * 'escalation_policy'<~String>:
|
188
|
+
# * 'assigned_to_user'<~String>:
|
189
|
+
# * 'trigger_summary_data'<~String>:
|
190
|
+
# * 'trigger_details_html_url'<~String>:
|
191
|
+
# * 'trigger_type'<~String>:
|
192
|
+
# * 'last_status_change_on'<~String>:
|
193
|
+
# * 'last_status_change_by'<~Pagerduty::User>:
|
194
|
+
# * 'id'<~String>:
|
195
|
+
# * 'name'<~String>:
|
196
|
+
# * 'email'<~String>:
|
197
|
+
# * 'html_url'<~String>:
|
198
|
+
# * 'number_of_escalations'<~Integer>:
|
199
|
+
# * 'resolved_by_user'<~Pagerduty::ResolvedByUser>:
|
200
|
+
# * 'id'<~String>:
|
201
|
+
# * 'name'<~String>:
|
202
|
+
# * 'email'<~String>:
|
203
|
+
# * 'html_url'<~String>:
|
204
|
+
#
|
205
|
+
# {Pagerduty API Reference}[http://developer.pagerduty.com/documentation/rest/incidents/list]
|
206
|
+
def incidents(options={})
|
207
|
+
JSON.parse(curl({
|
208
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/incidents",
|
209
|
+
params: {
|
210
|
+
since: options[:since] || (Time.now - 1.day).strftime("%Y-%m-%d"),
|
211
|
+
:until => options[:until] || (Time.now + 1.day).strftime("%Y-%m-%d"),
|
212
|
+
},
|
213
|
+
method: 'GET'
|
214
|
+
}).body)['incidents'].inject([]) { |incidents, incident|
|
215
|
+
incidents << Incident.new(incident)
|
216
|
+
}
|
217
|
+
end
|
218
|
+
|
219
|
+
def get_incident(options={})
|
220
|
+
incidents.detect { |incident| incident.id == options[:id] } || 'No results'
|
221
|
+
end
|
222
|
+
|
223
|
+
def get_incident_counts(options={})
|
224
|
+
JSON.parse(curl({
|
225
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/incidents/count",
|
226
|
+
params: options,
|
227
|
+
method: 'GET',
|
228
|
+
}).body)
|
229
|
+
end
|
230
|
+
|
231
|
+
def get_users(options={})
|
232
|
+
Users.new(JSON.parse(curl({
|
233
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/users",
|
234
|
+
params: { query: options[:query] },
|
235
|
+
method: 'GET'
|
236
|
+
}).body))
|
237
|
+
end
|
238
|
+
|
239
|
+
def get_user(options={})
|
240
|
+
get_users.users.detect { |user| user.id == options[:id] }
|
241
|
+
end
|
242
|
+
|
243
|
+
def create_user(options={})
|
244
|
+
User.new(JSON.parse(curl({
|
245
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/users",
|
246
|
+
data: options,
|
247
|
+
method: 'POST'
|
248
|
+
}).body)['user'])
|
249
|
+
end
|
250
|
+
|
251
|
+
def notes(id)
|
252
|
+
JSON.parse(curl({
|
253
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/incidents/#{id}/notes",
|
254
|
+
method: 'GET'
|
255
|
+
}).body)['notes'].inject([]) { |notes, note|
|
256
|
+
notes << Note.new(note)
|
257
|
+
}
|
258
|
+
end
|
259
|
+
|
260
|
+
def get_log_entries(options={})
|
261
|
+
LogEntries.new(JSON.parse(curl({
|
262
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/log_entries",
|
263
|
+
params: options,
|
264
|
+
method: 'GET'
|
265
|
+
}).body))
|
266
|
+
end
|
267
|
+
|
268
|
+
def get_log_entry(options={})
|
269
|
+
LogEntry.new(JSON.parse(curl({
|
270
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/log_entries/#{options[:id]}",
|
271
|
+
params: options,
|
272
|
+
method: 'GET'
|
273
|
+
}).body)['log_entry'])
|
274
|
+
end
|
275
|
+
|
276
|
+
def alerts_per_time(options={})
|
277
|
+
Pagerduty::Reports::Alerts.new(JSON.parse(curl({
|
278
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/reports/alerts_per_time",
|
279
|
+
params: options,
|
280
|
+
method: 'GET'
|
281
|
+
}).body))
|
282
|
+
end
|
283
|
+
|
284
|
+
def incidents_per_time(options={})
|
285
|
+
Pagerduty::Reports::Incidents.new(JSON.parse(curl({
|
286
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/reports/incidents_per_time/",
|
287
|
+
params: options,
|
288
|
+
method: 'GET'
|
289
|
+
}).body))
|
290
|
+
end
|
291
|
+
|
292
|
+
def get_maintenance_windows(options={})
|
293
|
+
Pagerduty::MaintenanceWindows.new(JSON.parse(curl({
|
294
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/maintenance_windows",
|
295
|
+
params: options,
|
296
|
+
method: 'GET'
|
297
|
+
}).body))
|
298
|
+
end
|
299
|
+
|
300
|
+
def get_maintenance_window(options={})
|
301
|
+
Pagerduty::MaintenanceWindow.new(JSON.parse(curl({
|
302
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/maintenance_windows/#{options[:id]}",
|
303
|
+
params: options,
|
304
|
+
method: 'GET'
|
305
|
+
}).body)['maintenance_window'])
|
306
|
+
end
|
307
|
+
|
308
|
+
def create_maintenance_window(options={})
|
309
|
+
Pagerduty::MaintenanceWindow.new(JSON.parse(curl({
|
310
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/maintenance_windows",
|
311
|
+
data: options,
|
312
|
+
method: 'POST'
|
313
|
+
}).body)['maintenance_window'])
|
314
|
+
end
|
315
|
+
|
316
|
+
def get_schedules(options={})
|
317
|
+
Pagerduty::Schedules.new(JSON.parse(curl({
|
318
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/schedules",
|
319
|
+
params: options,
|
320
|
+
method: 'GET'
|
321
|
+
}).body))
|
322
|
+
end
|
323
|
+
|
324
|
+
def get_schedule(options={})
|
325
|
+
Pagerduty::ScheduleInfo.new(JSON.parse(curl({
|
326
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/schedules/#{options[:id]}",
|
327
|
+
params: options,
|
328
|
+
method: 'GET'
|
329
|
+
}).body)['schedule'])
|
330
|
+
end
|
331
|
+
|
332
|
+
def get_schedule_users(options={})
|
333
|
+
JSON.parse(curl({
|
334
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/schedules/#{options[:id]}/users",
|
335
|
+
params: options,
|
336
|
+
method: 'GET'
|
337
|
+
}).body)['users'].inject([]) { |users, user|
|
338
|
+
users << Pagerduty::User.new(user)
|
339
|
+
}
|
340
|
+
end
|
341
|
+
|
342
|
+
def get_services(options={})
|
343
|
+
Pagerduty::Services.new(JSON.parse(curl({
|
344
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/services",
|
345
|
+
params: options,
|
346
|
+
method: 'GET'
|
347
|
+
}).body))
|
348
|
+
end
|
349
|
+
|
350
|
+
def get_service(options={})
|
351
|
+
Pagerduty::Services::Objects::Service.new(JSON.parse(curl({
|
352
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/services/#{options[:id]}",
|
353
|
+
params: options,
|
354
|
+
method: 'GET'
|
355
|
+
}).body)['service'])
|
356
|
+
end
|
357
|
+
|
358
|
+
def create_service(options={})
|
359
|
+
Pagerduty::Services::Objects::Service.new(JSON.parse(curl({
|
360
|
+
uri: "https://#@@subdomain.pagerduty.com/api/v1/services",
|
361
|
+
data: { service: options },
|
362
|
+
method: 'POST'
|
363
|
+
}).body)['service'])
|
364
|
+
end
|
365
|
+
|
366
|
+
end
|
data/lib/pagerduty.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
__LIB_DIR__ = File.expand_path(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift __LIB_DIR__ unless $LOAD_PATH.include?(__LIB_DIR__)
|
3
|
+
|
4
|
+
require 'active_support/all'
|
5
|
+
require 'json'
|
6
|
+
require 'net/http'
|
7
|
+
require 'net/https'
|
8
|
+
require 'uri'
|
9
|
+
require 'virtus'
|
10
|
+
|
11
|
+
require 'pagerduty/core'
|
12
|
+
require 'pagerduty/pagerduty'
|
13
|
+
require 'pagerduty/models/report'
|
14
|
+
require 'pagerduty/models/agent'
|
15
|
+
require 'pagerduty/models/assigneduser'
|
16
|
+
require 'pagerduty/models/laststatuschangeby'
|
17
|
+
require 'pagerduty/models/resolvedbyuser'
|
18
|
+
require 'pagerduty/models/service'
|
19
|
+
require 'pagerduty/models/escalationpolicies'
|
20
|
+
require 'pagerduty/models/triggersummarydata'
|
21
|
+
require 'pagerduty/models/user'
|
22
|
+
require 'pagerduty/models/schedule'
|
23
|
+
require 'pagerduty/models/maintenance_window'
|
24
|
+
require 'pagerduty/models/notification'
|
25
|
+
require 'pagerduty/models/log_entry'
|
26
|
+
require 'pagerduty/models/channels'
|
27
|
+
require 'pagerduty/models/alert'
|
28
|
+
require 'pagerduty/models/note'
|
29
|
+
require 'pagerduty/models/incident'
|
30
|
+
require 'pagerduty/models/services'
|
31
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'pagerduty/pagerduty'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "pagerduty-sdk"
|
8
|
+
gem.version = '1.0.0'
|
9
|
+
gem.authors = ["Alfred Moreno"]
|
10
|
+
gem.email = ["kryptek@gmail.com"]
|
11
|
+
gem.description = %q{An SDK for Pagerduty's API}
|
12
|
+
gem.summary = %q{An SDK for communication with the entire Pagerduty API}
|
13
|
+
gem.homepage = "https://github.com/kryptek/pagerduty-sdk"
|
14
|
+
|
15
|
+
#gem.files = `git ls-files`.split($/)
|
16
|
+
gem.files = `find .`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
gem.add_dependency 'active_support'
|
22
|
+
gem.add_dependency 'json'
|
23
|
+
gem.add_dependency 'virtus'
|
24
|
+
|
25
|
+
gem.license = 'MIT'
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pagerduty-sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alfred Moreno
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: active_support
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: virtus
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: An SDK for Pagerduty's API
|
56
|
+
email:
|
57
|
+
- kryptek@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- "./.DS_Store"
|
63
|
+
- "./.git/config"
|
64
|
+
- "./.git/description"
|
65
|
+
- "./.git/HEAD"
|
66
|
+
- "./.git/hooks/applypatch-msg.sample"
|
67
|
+
- "./.git/hooks/commit-msg.sample"
|
68
|
+
- "./.git/hooks/post-update.sample"
|
69
|
+
- "./.git/hooks/pre-applypatch.sample"
|
70
|
+
- "./.git/hooks/pre-commit.sample"
|
71
|
+
- "./.git/hooks/pre-push.sample"
|
72
|
+
- "./.git/hooks/pre-rebase.sample"
|
73
|
+
- "./.git/hooks/prepare-commit-msg.sample"
|
74
|
+
- "./.git/hooks/update.sample"
|
75
|
+
- "./.git/index"
|
76
|
+
- "./.git/info/exclude"
|
77
|
+
- "./.git/logs/HEAD"
|
78
|
+
- "./.git/logs/refs/heads/master"
|
79
|
+
- "./.git/logs/refs/remotes/origin/HEAD"
|
80
|
+
- "./.git/objects/pack/pack-ef303a32b278847aabbf3023e493ea7a4ca5888f.idx"
|
81
|
+
- "./.git/objects/pack/pack-ef303a32b278847aabbf3023e493ea7a4ca5888f.pack"
|
82
|
+
- "./.git/packed-refs"
|
83
|
+
- "./.git/refs/heads/master"
|
84
|
+
- "./.git/refs/remotes/origin/HEAD"
|
85
|
+
- "./.gitignore"
|
86
|
+
- "./lib/.DS_Store"
|
87
|
+
- "./lib/.yardoc/checksums"
|
88
|
+
- "./lib/.yardoc/object_types"
|
89
|
+
- "./lib/.yardoc/objects/root.dat"
|
90
|
+
- "./lib/.yardoc/proxy_types"
|
91
|
+
- "./lib/pagerduty/.DS_Store"
|
92
|
+
- "./lib/pagerduty/core.rb"
|
93
|
+
- "./lib/pagerduty/models/agent.rb"
|
94
|
+
- "./lib/pagerduty/models/alert.rb"
|
95
|
+
- "./lib/pagerduty/models/assigneduser.rb"
|
96
|
+
- "./lib/pagerduty/models/channels.rb"
|
97
|
+
- "./lib/pagerduty/models/escalationpolicies.rb"
|
98
|
+
- "./lib/pagerduty/models/incident.rb"
|
99
|
+
- "./lib/pagerduty/models/laststatuschangeby.rb"
|
100
|
+
- "./lib/pagerduty/models/log_entry.rb"
|
101
|
+
- "./lib/pagerduty/models/maintenance_window.rb"
|
102
|
+
- "./lib/pagerduty/models/note.rb"
|
103
|
+
- "./lib/pagerduty/models/notification.rb"
|
104
|
+
- "./lib/pagerduty/models/report.rb"
|
105
|
+
- "./lib/pagerduty/models/resolvedbyuser.rb"
|
106
|
+
- "./lib/pagerduty/models/schedule.rb"
|
107
|
+
- "./lib/pagerduty/models/service.rb"
|
108
|
+
- "./lib/pagerduty/models/services.rb"
|
109
|
+
- "./lib/pagerduty/models/triggersummarydata.rb"
|
110
|
+
- "./lib/pagerduty/models/user.rb"
|
111
|
+
- "./lib/pagerduty/pagerduty.rb"
|
112
|
+
- "./lib/pagerduty.rb"
|
113
|
+
- "./LICENSE"
|
114
|
+
- "./pagerduty-sdk.gemspec"
|
115
|
+
- "./README.md"
|
116
|
+
homepage: https://github.com/kryptek/pagerduty-sdk
|
117
|
+
licenses:
|
118
|
+
- MIT
|
119
|
+
metadata: {}
|
120
|
+
post_install_message:
|
121
|
+
rdoc_options: []
|
122
|
+
require_paths:
|
123
|
+
- lib
|
124
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
requirements: []
|
135
|
+
rubyforge_project:
|
136
|
+
rubygems_version: 2.0.2
|
137
|
+
signing_key:
|
138
|
+
specification_version: 4
|
139
|
+
summary: An SDK for communication with the entire Pagerduty API
|
140
|
+
test_files: []
|
141
|
+
has_rdoc:
|