nifty_alert 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 +4 -4
- data/lib/nifty_alert/version.rb +1 -1
- data/lib/nifty_alert.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94b5bb14220d54a7b90773972048a442564a07eb
|
4
|
+
data.tar.gz: 74fb323064bbc39bafa541822d4d190f5f388529
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c17f5652b2820dc221e357b4bd0a3655857c63ad4dfc4783afbd3df8ca85161ff0f932474aa1fc59b5e608c283d57071e0a88805a49eea69bc60e94e37f887a
|
7
|
+
data.tar.gz: 0ca72797c9a63f859223683efb02a9cda4d37e246a0c1390bc8b091cb4c26406de5e7a1f2602b7509ccc77f3f9c07211f69dffc41c4b4c0bc7fad13de65d84b0
|
data/lib/nifty_alert/version.rb
CHANGED
data/lib/nifty_alert.rb
CHANGED
@@ -3,13 +3,13 @@ require "faraday"
|
|
3
3
|
class NiftyAlert
|
4
4
|
SERVICE_URL = "https://nifty-alert-production.herokuapp.com/alerts"
|
5
5
|
|
6
|
-
def initialize(
|
7
|
-
@
|
6
|
+
def initialize(description)
|
7
|
+
@description = description
|
8
8
|
end
|
9
9
|
|
10
10
|
def report(number, threshold)
|
11
11
|
if number > threshold
|
12
|
-
Faraday.post(SERVICE_URL,
|
12
|
+
Faraday.post(SERVICE_URL, description: @description, recipients: self.class.recipients)
|
13
13
|
end
|
14
14
|
rescue
|
15
15
|
nil
|