pagerduty 1.3.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/pagerduty.rb +11 -3
- data/lib/pagerduty/version.rb +1 -1
- metadata +11 -15
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8a21cba28253d63d4b26aecb45783434ae59fa83
|
4
|
+
data.tar.gz: 44a5dc31dbc4e08d30b3e5253d6ffd37c23a2996
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d4ad387665a715603f984b707987e126f9f90436d5f19ba690f4596cc0f75eb14dcbc8e5b6c3a85b7d74df21c769d177271e458f9034ea72c9c7315f726bcba6
|
7
|
+
data.tar.gz: 7599fd83260348840ea8ce61dedb6e982ce0fab3b3b7467913f86c997bc91b7cf419d3300c9c4bf96baef6e6c9042010dec540469e509fa636105a0ca1d3d0c8
|
data/lib/pagerduty.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'net/http'
|
3
|
+
require 'net/https'
|
3
4
|
require 'pagerduty/version'
|
4
5
|
|
5
6
|
class PagerdutyException < Exception
|
@@ -36,10 +37,17 @@ protected
|
|
36
37
|
params = { :event_type => event_type, :service_key => @service_key, :description => description, :details => details }
|
37
38
|
params.merge!({ :incident_key => @incident_key }) unless @incident_key == nil
|
38
39
|
|
39
|
-
url = URI.parse("
|
40
|
-
|
41
|
-
|
40
|
+
url = URI.parse("https://events.pagerduty.com/generic/2010-04-15/create_event.json")
|
42
41
|
http = Net::HTTP.new(url.host, url.port)
|
42
|
+
http.use_ssl = (url.scheme == 'https')
|
43
|
+
rootca = '/etc/ssl/certs'
|
44
|
+
if (File.directory?(rootca) && http.use_ssl?)
|
45
|
+
http.ca_path = rootca
|
46
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
47
|
+
http.verify_depth = 5
|
48
|
+
else
|
49
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
50
|
+
end
|
43
51
|
|
44
52
|
req = Net::HTTP::Post.new(url.request_uri)
|
45
53
|
req.body = JSON.generate(params)
|
data/lib/pagerduty/version.rb
CHANGED
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagerduty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Charlie Somerville
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 1.7.7
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 1.7.7
|
30
27
|
description: Provides a simple interface for calling into the Pagerduty API
|
@@ -34,8 +31,8 @@ executables: []
|
|
34
31
|
extensions: []
|
35
32
|
extra_rdoc_files: []
|
36
33
|
files:
|
37
|
-
- .document
|
38
|
-
- .gitignore
|
34
|
+
- ".document"
|
35
|
+
- ".gitignore"
|
39
36
|
- Gemfile
|
40
37
|
- LICENSE.txt
|
41
38
|
- README.md
|
@@ -46,26 +43,25 @@ files:
|
|
46
43
|
homepage: http://github.com/envato/pagerduty
|
47
44
|
licenses:
|
48
45
|
- MIT
|
46
|
+
metadata: {}
|
49
47
|
post_install_message:
|
50
48
|
rdoc_options: []
|
51
49
|
require_paths:
|
52
50
|
- lib
|
53
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
52
|
requirements:
|
56
|
-
- -
|
53
|
+
- - ">="
|
57
54
|
- !ruby/object:Gem::Version
|
58
55
|
version: '0'
|
59
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
57
|
requirements:
|
62
|
-
- -
|
58
|
+
- - ">="
|
63
59
|
- !ruby/object:Gem::Version
|
64
60
|
version: '0'
|
65
61
|
requirements: []
|
66
62
|
rubyforge_project:
|
67
|
-
rubygems_version:
|
63
|
+
rubygems_version: 2.2.0
|
68
64
|
signing_key:
|
69
|
-
specification_version:
|
65
|
+
specification_version: 4
|
70
66
|
summary: Pagerduty API client library
|
71
67
|
test_files: []
|