pager_duty-connection 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pager_duty/connection/version.rb +1 -1
- data/lib/pager_duty/connection.rb +9 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78f2fad96d2bf01daf854fcc9e0bd8d971801caa7d5615e40c692201be07de5
|
4
|
+
data.tar.gz: 5beac4e604804d404580217c091644839a2aa2f468259b15eced7792cfeb1e52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '012509de4ebd913ec9ffd851ed3ddcb85eb4e9ddb16c6ae624b37bb0e54a31cd36db41014bc0e09b36318c1d6b19c699542aec83f489f5e6598c87029ce98070'
|
7
|
+
data.tar.gz: bf27bc5e64b1730ebbf693a6deb2ea378adb05ccad320a3fa974ebb0cc8b739c70c265f281baae08e5c186cf53873ca41cbc999ff8bd5217713e92409b6c7247
|
@@ -119,6 +119,8 @@ module PagerDuty
|
|
119
119
|
end
|
120
120
|
|
121
121
|
body
|
122
|
+
when Array
|
123
|
+
body.map! { |element| parse(element) }
|
122
124
|
else
|
123
125
|
raise "Can't parse times of #{body.class}: #{body}"
|
124
126
|
end
|
@@ -158,10 +160,6 @@ module PagerDuty
|
|
158
160
|
end
|
159
161
|
conn.authorization(token_type, token_arg)
|
160
162
|
|
161
|
-
conn.use RaiseApiErrorOnNon200
|
162
|
-
conn.use RaiseFileNotFoundOn404
|
163
|
-
conn.use RaiseRateLimitOn429
|
164
|
-
|
165
163
|
conn.use ConvertTimesParametersToISO8601
|
166
164
|
|
167
165
|
# use json
|
@@ -174,6 +172,13 @@ module PagerDuty
|
|
174
172
|
conn.response :json
|
175
173
|
conn.response :logger, ::Logger.new(STDOUT), bodies: true if debug
|
176
174
|
|
175
|
+
# Because Faraday::Middleware executes in reverse order of
|
176
|
+
# calls to conn.use, status code error handling goes at the
|
177
|
+
# end of the block so that it runs first
|
178
|
+
conn.use RaiseApiErrorOnNon200
|
179
|
+
conn.use RaiseFileNotFoundOn404
|
180
|
+
conn.use RaiseRateLimitOn429
|
181
|
+
|
177
182
|
conn.adapter Faraday.default_adapter
|
178
183
|
end
|
179
184
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pager_duty-connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Nichols
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -94,7 +94,7 @@ files:
|
|
94
94
|
homepage: http://github.com/technicalpickles/pager_duty-connection
|
95
95
|
licenses: []
|
96
96
|
metadata: {}
|
97
|
-
post_install_message:
|
97
|
+
post_install_message:
|
98
98
|
rdoc_options: []
|
99
99
|
require_paths:
|
100
100
|
- lib
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubygems_version: 3.0.3
|
113
|
-
signing_key:
|
113
|
+
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Written with the power of faraday, pager_duty-connection tries to be a simple
|
116
116
|
and usable Ruby API wrapper for the PagerDuty REST API
|