alerte_rouge 0.0.0 → 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 +8 -8
- data/alerte_rouge.gemspec +14 -0
- data/lib/alerte_rouge.rb +28 -3
- data/nota.rb +5 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmZmZjdhNTViMTgwNzc3ODRiM2NjMjMxMGEyZTM1MTBiZThiMTJkMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzRmYjIxMTJjNDdlYTY3NjQwZDQwODY2ZjRhZTBlYjRlMWU5YTU0Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTQxMjI4N2Q0YmE2MmJkYWY5NzhlMTIwMjMyOTVjY2EwYmI1ZDg0NTUxM2Fk
|
10
|
+
NGM3Yzc4OWQ3OTdiMDk3NTg5M2U2NDIwYjhmYTNiNGViM2ViNTUxYjM0MGQz
|
11
|
+
ZGRlMzIzOWI4ZGI4MTlmYTczODRmM2RlNWE2NTRiZTk0MTdiMDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2QwYmRlOWMzYmVkYWNjNzIyYjQxODIwZmExNTE0MWZmZmJjZDcwNzQ5ZDA0
|
14
|
+
NjdmNGQ2OTAzZTdjNmNkZGY4ZDU5NDJhYjA5NmRiNmE0YzZmZjAwNDg1ODc0
|
15
|
+
ZDE3ZTNjYzkxOThhNGMzNTk5OWQxZDkwMDgxMTBjNTAxOWJmNWU=
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'alerte_rouge'
|
3
|
+
s.version = '0.0.2'
|
4
|
+
s.date = '2014-02-11'
|
5
|
+
s.summary = "Alerte-rouge.fr | Progressive Admin Notification System"
|
6
|
+
s.description = "A simple Gem that allows you to report your monitoring events to www.alerte-rouge.fr"
|
7
|
+
s.authors = ["philib_j"]
|
8
|
+
s.email = 'philib_j@modulotech.fr'
|
9
|
+
s.files = `git ls-files`.split($\)
|
10
|
+
s.homepage = 'http://rubygems.org/gems/alerte_rouge'
|
11
|
+
s.license = 'MIT'
|
12
|
+
|
13
|
+
s.add_runtime_dependency 'httparty'
|
14
|
+
end
|
data/lib/alerte_rouge.rb
CHANGED
@@ -1,5 +1,30 @@
|
|
1
|
+
require 'httparty'
|
1
2
|
class AlerteRouge
|
2
|
-
|
3
|
-
|
3
|
+
|
4
|
+
@key = nil
|
5
|
+
@pass = nil
|
6
|
+
|
7
|
+
@server_url = 'http://www.alerte-rouge.fr/api/events'
|
8
|
+
|
9
|
+
def self.key=(key)
|
10
|
+
@key = key
|
4
11
|
end
|
5
|
-
|
12
|
+
|
13
|
+
def self.pass=(pass)
|
14
|
+
@pass = pass
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.report(uid, message, is_error = false)
|
18
|
+
raise Exception.new("You need to provide a key and a pass") if @key.nil? || @pass.nil?
|
19
|
+
|
20
|
+
r = HTTParty.post(@server_url,
|
21
|
+
:body => {p: @pass,
|
22
|
+
k: @key,
|
23
|
+
uid: uid,
|
24
|
+
description: message,
|
25
|
+
is_error: is_error} )
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
#pass '21l4jsdjas0f9sfaLKDLF2299121231=sdafa-asdf'
|
30
|
+
#key '2131241kl4j1l2k0--0sadf-2-211!!jlj141241'
|
data/nota.rb
ADDED
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.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- philib_j
|
@@ -9,15 +9,31 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-02-11 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: A simple Gem that allows you to report your monitoring events to www.alerte-rouge.fr
|
14
28
|
email: philib_j@modulotech.fr
|
15
29
|
executables: []
|
16
30
|
extensions: []
|
17
31
|
extra_rdoc_files: []
|
18
32
|
files:
|
33
|
+
- alerte_rouge.gemspec
|
19
34
|
- lib/alerte_rouge.rb
|
20
|
-
|
35
|
+
- nota.rb
|
36
|
+
homepage: http://rubygems.org/gems/alerte_rouge
|
21
37
|
licenses:
|
22
38
|
- MIT
|
23
39
|
metadata: {}
|