integrity-notifyio 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/integrity-notifyio.gemspec +1 -1
- data/lib/integrity/notifier/notifyio.rb +8 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/integrity-notifyio.gemspec
CHANGED
@@ -21,14 +21,16 @@ module Integrity
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def post(emails, api_key, title, body)
|
24
|
+
return if emails.nil? || email.empty? || api_key.nil? || api_key.empty?
|
24
25
|
emails.split(',').each do |email|
|
25
26
|
email_hash = MD5.hexdigest(email.strip!)
|
26
|
-
HTTParty.post "http://api.notify.io/v1/notify/#{email_hash}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
HTTParty.post "http://api.notify.io/v1/notify/#{email_hash}", :headers => {'content-type' => 'application/x-www-form-urlencoded'},
|
28
|
+
:body => {:api_key => api_key},
|
29
|
+
:query => {
|
30
|
+
:api_key => api_key,
|
31
|
+
:title => title,
|
32
|
+
:text => body
|
33
|
+
}
|
32
34
|
|
33
35
|
end
|
34
36
|
end
|