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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db0bc8ef9fe1f88eb06a8359c474473d25341932540d3cf5e1a9323abfd9770b
4
- data.tar.gz: ba80d4afbc89fe9a370dda7fb89cbbf13a72bf8eda0d5a77e184b27a64f91218
3
+ metadata.gz: e78f2fad96d2bf01daf854fcc9e0bd8d971801caa7d5615e40c692201be07de5
4
+ data.tar.gz: 5beac4e604804d404580217c091644839a2aa2f468259b15eced7792cfeb1e52
5
5
  SHA512:
6
- metadata.gz: d1bde5e9cd2890649553e6203c285d8d13e2ee6f9796c8db451de39af9cee02c2914965ac737a2963f1afddca26320942f4e47bdc1e7519b544e589f9e394980
7
- data.tar.gz: f72fd33ba141a6640e0308c6a7cbc0bbacf8bf701220171cc4091be49e3f56b081f26aabe5176a56222795342372290bc4212d609fd84b4378bb153b1000ce15
6
+ metadata.gz: '012509de4ebd913ec9ffd851ed3ddcb85eb4e9ddb16c6ae624b37bb0e54a31cd36db41014bc0e09b36318c1d6b19c699542aec83f489f5e6598c87029ce98070'
7
+ data.tar.gz: bf27bc5e64b1730ebbf693a6deb2ea378adb05ccad320a3fa974ebb0cc8b739c70c265f281baae08e5c186cf53873ca41cbc999ff8bd5217713e92409b6c7247
@@ -1,5 +1,5 @@
1
1
  module PagerDuty
2
2
  class Connection
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
@@ -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.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: 2020-11-13 00:00:00.000000000 Z
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