luka-multiinfo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/multiinfo.rb +11 -0
- data/lib/multiinfo/api/response.rb +2 -2
- data/multiinfo.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lib/multiinfo.rb
CHANGED
@@ -6,3 +6,14 @@ module MultiInfo end
|
|
6
6
|
).each do |lib|
|
7
7
|
require File.join(File.dirname(__FILE__), lib)
|
8
8
|
end
|
9
|
+
|
10
|
+
# MultiInfo::API.test_mode = true
|
11
|
+
# MultiInfo::API.debug_mode = true
|
12
|
+
config = MultiInfo::API.load_auth_options
|
13
|
+
|
14
|
+
# MultiInfo::API.test_mode = true
|
15
|
+
# MultiInfo::API.debug_mode = true
|
16
|
+
api = MultiInfo::API.new(config)
|
17
|
+
|
18
|
+
# p api.send_message('48601711377', 'Hello from MultiInfo!')
|
19
|
+
p api.cancel_message('29066226')
|
@@ -9,12 +9,12 @@ module MultiInfo
|
|
9
9
|
def parse(response_arr)
|
10
10
|
return { :status => 'OK' } if API.test_mode
|
11
11
|
command, http_response = response_arr
|
12
|
-
response_rows = http_response.split("\
|
12
|
+
response_rows = http_response.split("\n")
|
13
13
|
response_status, response_body = response_rows[0], response_rows[1..-1]
|
14
14
|
if response_status.to_i < 0
|
15
15
|
raise MultiInfo::API::Error.new(response_status, response_body.first)
|
16
16
|
else
|
17
|
-
response_hash(command, response_body).merge({:status => response_status})
|
17
|
+
response_hash(command, response_body).merge({:status => response_status.chop})
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/multiinfo.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{multiinfo}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["\305\201ukasz \305\201uczak"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-08-04}
|
10
10
|
s.description = %q{This gem is Ruby interface to the Polkomtel's MultiInfo SMS gateway service, based on Luke Redpath's clickatel library. To use this gem, you will need an access to Polkomtel's MultiInfo service. You need user, password, sercvice_id and certificate for ssl connection. Contact Polkomtel sales reps for info how to obtain acces to MultiInfo service.}
|
11
11
|
s.email = %q{luka@weblify.pl}
|
12
12
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luka-multiinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "\xC5\x81ukasz \xC5\x81uczak"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-04 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|