alerte_rouge 0.0.5 → 0.0.6
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 +8 -8
- data/README.md +2 -5
- data/alerte_rouge.gemspec +1 -1
- data/lib/alerte_rouge.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NzcwOTAzYjY0YmRhMTc2NTMzYTczMjEzZTczZjgzM2E4M2Y5N2M5YQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OTcxZWZiOTUwZjc4OTA2ZWMwYWU3NzIyYjIzZjhhNjhiYWNlZWIxYw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NTA1NmNkMTEyMDQzMzYzYjMyZDY2OGM2YjUzYWQzOWE3NDlhZmY2YjRkNjg4
|
|
10
|
+
ZjQ2Y2YzZWQ3ZTRhNTEzMDFhYTM5ZDhiYTBlOTM2NTQ2YzY2NTc2N2RiNDAz
|
|
11
|
+
MGFhZmQ2MTdiMDVjNzI0Zjg3NzMzOGI0ZWJjYmFkMmU2ZThhNzU=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MzI0NTkxNTFlODIyYjQ1ODRkNDFlNWM5NTA0YmY0YTM3NTI0M2FlZWZkMDg5
|
|
14
|
+
MTY1ZWNiOGQ4NmUyMTQ3ZDM1ZWUzMDFmM2E3NTZkYzljYWUwMTI3MjI1YTgy
|
|
15
|
+
N2E2YWExYWI5YmI5Mzk0ODA5NTYxMWYxOWFjOTAxY2Q2ZDZlOTg=
|
data/README.md
CHANGED
|
@@ -25,13 +25,10 @@ Rails: create the following file **/config/initializers/alerte_rouge.rb**
|
|
|
25
25
|
AlerteRouge.key = ENV['your-key']
|
|
26
26
|
AlerteRouge.pass = ENV['your-pass']
|
|
27
27
|
|
|
28
|
-
### Deliver
|
|
28
|
+
### Deliver a Notification
|
|
29
29
|
|
|
30
|
-
AlerteRouge.report('your_unique_key_for_whatever_you_monitor', "Any useful human readable message",
|
|
30
|
+
AlerteRouge.report('your_unique_key_for_whatever_you_monitor', "Any useful human readable message", [OPTIONAL is_error], [OPTIONAL force_notify_now])
|
|
31
31
|
|
|
32
|
-
### Deliver an OK Notification
|
|
33
|
-
|
|
34
|
-
AlerteRouge.report('your_unique_key_for_whatever_you_monitor', "Any useful human readable message", false)
|
|
35
32
|
|
|
36
33
|
### Configure Alerte-rouge
|
|
37
34
|
|
data/alerte_rouge.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'alerte_rouge'
|
|
3
|
-
s.version = '0.0.
|
|
3
|
+
s.version = '0.0.6'
|
|
4
4
|
s.date = '2014-02-11'
|
|
5
5
|
s.summary = "Alerte-rouge.fr | Progressive Admin Notification System"
|
|
6
6
|
s.description = "A simple Gem that allows you to report your monitoring events to www.alerte-rouge.fr"
|
data/lib/alerte_rouge.rb
CHANGED
|
@@ -17,7 +17,7 @@ class AlerteRouge
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def self.report(uid, message, is_error = false)
|
|
20
|
+
def self.report(uid, message, is_error = false, force_notify_now = false)
|
|
21
21
|
begin
|
|
22
22
|
r = HTTParty.post(@server_url,
|
|
23
23
|
:body => {p: @pass,
|
|
@@ -25,7 +25,8 @@ class AlerteRouge
|
|
|
25
25
|
uid: uid,
|
|
26
26
|
description: message,
|
|
27
27
|
is_error: is_error,
|
|
28
|
-
hostname: @hostname
|
|
28
|
+
hostname: @hostname,
|
|
29
|
+
notify_now: force_notify_now} )
|
|
29
30
|
rescue Exception => e
|
|
30
31
|
puts "Following error happened #{e.message}\n\nBacktrace:\n#{e.backtrace.join('\n')}"
|
|
31
32
|
return false
|