opsgenie-send 0.0.1 → 0.0.2

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: c6d47e7f6e09da52ca627e6a1927a90ceb6d8293
4
- data.tar.gz: bee2175003ce945bf6cab03abf2f27b220ff20dc
3
+ metadata.gz: bf3a3f7642e79b7ab9f1ff6770202c3fafe01139
4
+ data.tar.gz: cb38e66d2ba8b747f8d485cdf0713ada1eefa24e
5
5
  SHA512:
6
- metadata.gz: d98b97b28f5eccd67acba550cf259f14152a39e2a765d7fa97b888f870c1d640b1a0db483a1398e287463b194d1e7e9deae4e61da8beb391c7faeb0f69d1a643
7
- data.tar.gz: 1e79e101fffe69193b90cac9226012b9ad8c7b5e30f640bec623af63ba2be64184d02726ac2dc8b1c354c11fbd112362895a2a660e59ce943b92801eb4caa4cc
6
+ metadata.gz: cf810dd1f27fd841fccfc0484c1db3c775eaa2eb757aa7548300b0799830fa2eaa04b19b82e6d8a9d4595098f35f81ea5e67699bb5234021e2d0df7519cd8778
7
+ data.tar.gz: b9c0980e6465c99c169e1ba4af278f0c68a4ae764f00189e4b7daee2813bb2b2e6663e87844c19ce01708f7744e5415a2ad2ac037b55d71d0e6daa2c4e2ef202
data/README.md CHANGED
@@ -48,7 +48,7 @@ Opsgenie::Send.heartbeat('Test heartbeat')
48
48
  Opsgenie::Send.alert('Test alert')
49
49
  ```
50
50
 
51
- The methods return the response from Opsgenie as a hash.
51
+ The methods return the JSON string response from Opsgenie.
52
52
 
53
53
  You may pass optional parameters to alerts (see the list at
54
54
  https://www.opsgenie.com/docs/web-api/alert-api#createAlertRequest):
@@ -57,6 +57,13 @@ https://www.opsgenie.com/docs/web-api/alert-api#createAlertRequest):
57
57
  Opsgenie::Send.alert('Test alert', tags: %w[foo bar])
58
58
  ```
59
59
 
60
+ You can send, and then close an alert by using an alias:
61
+
62
+ ```ruby
63
+ Opsgenie::Send.alert('Test alert', alias: 'test')
64
+ Opsgenie::Send.close(alias: 'test')
65
+ ```
66
+
60
67
  ## Development
61
68
 
62
69
  After checking out the repo, run `bin/setup` to install
data/lib/opsgenie/send.rb CHANGED
@@ -19,5 +19,10 @@ module Opsgenie
19
19
  def self.alert(message, options = {})
20
20
  Opsgenie::Send.post('alert', {message: message}.merge(options))
21
21
  end
22
+
23
+ ## need to pass either id or alias option
24
+ def self.close(options = {})
25
+ Opsgenie::Send.post('alert/close', options)
26
+ end
22
27
  end
23
28
  end
@@ -1,5 +1,5 @@
1
1
  module Opsgenie
2
2
  module Send
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsgenie-send
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-02 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler