mfms 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/mfms/sms.rb +4 -8
- data/lib/mfms/version.rb +1 -1
- data/mfms.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae0f1baaa172885bd0fbad2c3bb3e5558a7e328b
|
4
|
+
data.tar.gz: 61cd20689633cac59eb61e8210be03155d2e888a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34b82a1e2ce10bd3ffba47995eddbcf9b97669b467d9e85166f5f11a8a0963057d8d8420f715933b644d28f4ca5d0a551850e405dd3b1f684e3f67ab0d2f0cbb
|
7
|
+
data.tar.gz: d2249789f83bb6fc35c3ec05615876b8b384601a821ba7df26e40ee7867c1b31bc3e5db86b819f20c41faf60f758995fbddc4f496aa6c4feeabc61d721614e40
|
data/README.md
CHANGED
data/lib/mfms/sms.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'net/http'
|
3
3
|
require 'openssl'
|
4
4
|
require 'uri'
|
5
|
-
require '
|
5
|
+
require 'russian'
|
6
6
|
|
7
7
|
module Mfms
|
8
8
|
class SMS
|
@@ -10,11 +10,12 @@ module Mfms
|
|
10
10
|
attr_accessor :phone, :subject, :message
|
11
11
|
attr_reader :id, :status
|
12
12
|
|
13
|
-
def initialize(phone, subject, message)
|
13
|
+
def initialize(phone, subject, message, translit = @@translit)
|
14
14
|
@phone = phone
|
15
15
|
@subject = subject
|
16
16
|
@message = message
|
17
17
|
@status = 'not-sent'
|
18
|
+
@translit = translit
|
18
19
|
|
19
20
|
validate!
|
20
21
|
end
|
@@ -89,11 +90,6 @@ module Mfms
|
|
89
90
|
@status = status
|
90
91
|
end
|
91
92
|
|
92
|
-
# What for?
|
93
|
-
# def to_json
|
94
|
-
# {:url => "#{server}:#{port}#{url}", :sms_message => message}.to_json
|
95
|
-
# end
|
96
|
-
|
97
93
|
private
|
98
94
|
|
99
95
|
def self.establish_connection
|
@@ -130,7 +126,7 @@ module Mfms
|
|
130
126
|
end
|
131
127
|
|
132
128
|
def send_url
|
133
|
-
message =
|
129
|
+
message = @translit ? Russian.translit(@message) : @message
|
134
130
|
"/revoup/connector0/send?login=#{@@login}&password=#{@@password}&" +
|
135
131
|
"subject[0]=#{@subject}&address[0]=#{@phone}&text[0]=#{URI.encode(message)}"
|
136
132
|
end
|
data/lib/mfms/version.rb
CHANGED
data/mfms.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mfms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fokin Eugene
|
@@ -12,19 +12,19 @@ cert_chain: []
|
|
12
12
|
date: 2014-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: russian
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 0.6.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 0.6.0
|
28
28
|
description: This library helps to send sms via mfms service
|
29
29
|
email:
|
30
30
|
- e.fokin@revoup.ru
|