smsaero 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -4
- data/lib/smsaero.rb +7 -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: e63e6937b5b5448c3cc2fe84b7e58a4ac3751b86
|
4
|
+
data.tar.gz: e466b2261b42aa65fa9cc21fcafdfefafcf5cb58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d98395edd84c32bcda3c3c3a1eab50dd23dcdaa1908990e82e7649c54fba230ebbd13740abadb81da6392e5b228de38eeee0e756a843ba7c483577644e82f7b
|
7
|
+
data.tar.gz: 918ea95e5206a6e5f25a443da84cfc61cfdc9b78681214e8c98d29da12330da58d47a7a2869c765a31b5a457f9c2c662127fa29442fc51a714e7d98163c76726
|
data/README.md
CHANGED
data/lib/smsaero.rb
CHANGED
@@ -12,8 +12,15 @@ class SMSAero
|
|
12
12
|
@password_hash = Digest::MD5.hexdigest(options[:password])
|
13
13
|
end
|
14
14
|
|
15
|
+
def send_message(options={})
|
16
|
+
process_request :send, options
|
17
|
+
end
|
18
|
+
|
15
19
|
def method_missing(action, *args, &block)
|
20
|
+
process_request(action, *args, &block)
|
21
|
+
end
|
16
22
|
|
23
|
+
def process_request(action, *args, &block)
|
17
24
|
options = args.extract_options!
|
18
25
|
options.reverse_merge! answer: :json
|
19
26
|
|
@@ -23,5 +30,4 @@ class SMSAero
|
|
23
30
|
result = Net::HTTP.post_form uri, user: @user, password: @password_hash
|
24
31
|
JSON.parse(result.body)
|
25
32
|
end
|
26
|
-
|
27
33
|
end
|