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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODIwYjVhMWYyZWVjNDJlOTU1ZTllNjkyZGQwN2Q3OTczZjUxYTVlYQ==
4
+ NzcwOTAzYjY0YmRhMTc2NTMzYTczMjEzZTczZjgzM2E4M2Y5N2M5YQ==
5
5
  data.tar.gz: !binary |-
6
- MjgxNTViMWJhZWUwNWY0MjJjMTZjNzRmY2NjODUzM2JhNWE0ZTk5ZQ==
6
+ OTcxZWZiOTUwZjc4OTA2ZWMwYWU3NzIyYjIzZjhhNjhiYWNlZWIxYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2QwOTc1YTRkZDkzNmJiNTU0NDIzYzkwOGMzZmNlZGNhMzNmZjk3ODEyOTQ0
10
- YTkxNDA0OTM4ZjQxZWQzNGVhMjQxYzc5NjU3ODdjY2I1ZDRkZTM2OWYxMDUw
11
- OWU1MDVjMzlmYmY2M2UwNWVkMmFlNTEzNDFjNjk0YTUxZTEzMzM=
9
+ NTA1NmNkMTEyMDQzMzYzYjMyZDY2OGM2YjUzYWQzOWE3NDlhZmY2YjRkNjg4
10
+ ZjQ2Y2YzZWQ3ZTRhNTEzMDFhYTM5ZDhiYTBlOTM2NTQ2YzY2NTc2N2RiNDAz
11
+ MGFhZmQ2MTdiMDVjNzI0Zjg3NzMzOGI0ZWJjYmFkMmU2ZThhNzU=
12
12
  data.tar.gz: !binary |-
13
- MGU3Mzc5MDExNGE3MGIxMTM1YjcyYjdkNjMwODZmYzgyNTE0OTdmMzMyZTdk
14
- YTdiNjhjYzQ0YzBjZWU1ZjFlYTZhZDllMmJmMTNmMTIzNjM2MDI3MTdhZDk5
15
- MTk3NjhhM2QxY2RiMjc3OTNlZTU5YzBjYjhlNjgyZjU5MDQ4ODI=
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 an Error Notification
28
+ ### Deliver a Notification
29
29
 
30
- AlerteRouge.report('your_unique_key_for_whatever_you_monitor', "Any useful human readable message", true)
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
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'alerte_rouge'
3
- s.version = '0.0.5'
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"
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alerte_rouge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - philib_j