opsgenie-send 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/opsgenie/send.rb +5 -0
- data/lib/opsgenie/send/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf3a3f7642e79b7ab9f1ff6770202c3fafe01139
|
4
|
+
data.tar.gz: cb38e66d2ba8b747f8d485cdf0713ada1eefa24e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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.
|
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-
|
11
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|