upstreamstatus 0.3.1 → 0.4.0

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
  SHA1:
3
- metadata.gz: a07d7b9030584178c66bf0c8a32216e1c9b59aab
4
- data.tar.gz: 6c8b6334190be4e8b156cce734de64a264add30b
3
+ metadata.gz: ef5044e79defd768b4025d6174301b3a726d6f16
4
+ data.tar.gz: 664dc56b3f95d0a759b75b3be95044069ceb5626
5
5
  SHA512:
6
- metadata.gz: 09491e9f56e96c9681961a16b23397ada3e1a21e0d1f72e764bd2212eb04aa0af716da00c768af70f7c2d960ac8b650897f0e03a2c4f34ea4b3de3b724961ea2
7
- data.tar.gz: 1fe28e22508894a9a4f9b358d6373aa64313e0840fce9ad89f3a6b14bf8d55d65e69fcc3e59b7a724c0404bc2c62411c00ca2ca192402db90b6f6b16678d7381
6
+ metadata.gz: 7d369903baab9059b51b272db1fe2e5e715e7631ade8bee938bc4d4dde92326f6960ab9ea38e5fd83663d2221696e8063ed74c8dffb8220e5772927adf2a5e5e
7
+ data.tar.gz: 4be7a4354decbc9c8978fd0553457b712cc9627ed144a094dfc1025167056082e14e989d27b9ed3affb3bbf41ab0826e35eafe4b22fad30add6094b5488239bb
@@ -43,6 +43,7 @@ class Upstreamstatus
43
43
  Unirest.default_header 'Authorization',
44
44
  "Token token=#{pagerduty_rest_api_key}"
45
45
  Unirest.default_header 'Content-type', 'application/json'
46
+ Unirest.default_header 'Accept', 'application/vnd.pagerduty+json;version=2'
46
47
 
47
48
  Raven.configure do |config|
48
49
  config.dsn = sentry_dsn
@@ -133,12 +134,7 @@ class Upstreamstatus
133
134
 
134
135
  def active_alerts_paged(offset = 0)
135
136
  r = Unirest.get(
136
- "#{pagerduty_api_url}/incidents",
137
- parameters: {
138
- service: pagerduty_service_id,
139
- status: 'triggered,acknowledged',
140
- offset: offset
141
- }
137
+ "#{pagerduty_api_url}/incidents?service_ids[]=#{pagerduty_service_id}&statuses[]=triggered&statuses[]=acknowledged&offset=#{offset}"
142
138
  )
143
139
  fail "Result: #{r.inspect}" unless (200..299).include?(r.code)
144
140
  pointer = r.body['limit'] + offset
@@ -1,3 +1,3 @@
1
1
  class Upstreamstatus
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upstreamstatus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Herot
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-10 00:00:00.000000000 Z
11
+ date: 2018-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unirest
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
- rubygems_version: 2.5.1
182
+ rubygems_version: 2.4.5
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Parse the output of the Nginx Upstream Check plugin