mailqun 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/mailqun +17 -1
- 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: ead41ae24dd509793e62692c85d3c53be8e69520
|
4
|
+
data.tar.gz: 52b23a756cf113add2ede8e6a4e77217a75e504c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 614e070d9c683ebab47472175baaf21a8b2029d05caa13c198f82398ea6c56cbbf31cd0af69cfd10d6c6c192112348c7cdd048b97925cae81d41995da9865450
|
7
|
+
data.tar.gz: 7ef3f9951fcc3cb75d924f70853cfa8349b49b24b23b61e288536b298c51ea8939b36ab808844306fab1b94cf14b554d26f244db174172e1f3ca36639bf3c38c
|
data/mailqun
CHANGED
@@ -3,11 +3,27 @@ require 'net/http'
|
|
3
3
|
require 'optparse'
|
4
4
|
require 'ostruct'
|
5
5
|
require 'json'
|
6
|
-
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'colorize'
|
9
|
+
rescue LoadError
|
10
|
+
class String
|
11
|
+
def method_missing(name)
|
12
|
+
if ['green', 'red'].include? name.to_s
|
13
|
+
self
|
14
|
+
else
|
15
|
+
super
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
7
20
|
|
8
21
|
def load_env
|
9
22
|
@domain = ENV['MAILGUN_DOMAIN']
|
10
23
|
@secret = ENV['MAILGUN_SECRET']
|
24
|
+
|
25
|
+
abort("Error: Set MAILGUN_DOMAIN") if @domain.nil?
|
26
|
+
abort("Error: Set MAILGUN_SECRET") if @secret.nil?
|
11
27
|
end
|
12
28
|
|
13
29
|
def load_uri
|