mo_sms 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9147759aef11b41acfbd1592a5f8159c5cba06a
4
- data.tar.gz: 7be4ffb69e168a18540722552bd13ccb087542b0
3
+ metadata.gz: 59d96a45b307b5232c100dbcf4bfbe0291d09a48
4
+ data.tar.gz: 171cf60c36ce7630648e419c2781fc6a68b90582
5
5
  SHA512:
6
- metadata.gz: 3a44cdbc5f2ec4abe9d94fc7acc305dc3856bdb860d5c5a580e88e89b096fb9bc0deb30e581973808a901096301f47fa8526136941bcffa338678bd4b879766c
7
- data.tar.gz: 44c2e582b6d5b303048e3936d26a98d521a57af3138993198847ed597875b034fa3eaed66d004f0a8fb9f98e11029ae97057dc5a723533a37db9bfd7dc34aee6
6
+ metadata.gz: a1a13efe52b159151166dd995ccdc2e61a2794ba4e669ddfc36e0733c70965bb10091f6c7c2bcd75b555b1315e722f24d3525776cc2a3d2fb128b0605de7bf26
7
+ data.tar.gz: 97d4d0db0d52ef46ae80e1179b0ab43c9d52b5d84361730e67e22e7afa7b637ccabe3076579293584f2a6cb89087ec818ac531e5e3a5a517d62c99db9a7a1f98
data/README.md CHANGED
@@ -26,16 +26,17 @@ To fire the class just
26
26
 
27
27
  To send a text sms, call the .send() method. **Watch out for the Exceptions that can be thrown here :)**
28
28
 
29
- - The first argument is the phone number to send the SMS to.
30
- - The second one is the type of the message (Can be either :text or :wap).
31
- - The third argument is the content of the message.
32
-
33
- sms.send("072123123", :text, "This is my message")
29
+ + The first argument is the phone number to send the SMS to
30
+ + The second one is the type of the message (Can be either :text or :wap)
31
+ + The third argument is the content of the message
34
32
 
33
+ ```
34
+ sms.send("072123123", :text, "This is my message")
35
+ ```
35
36
 
36
37
  Other attributes are added to the class (read the API specification) like...
37
38
 
38
39
  sms.tariff = false #or true
39
- sms.allow_long_messages = false #or true
40
+ sms.allow_long_message = false #or true
40
41
  sms.custom_sender = false #or true
41
42
 
@@ -3,13 +3,13 @@ require "net/http"
3
3
 
4
4
  module MoSms
5
5
  class SMSSender
6
- attr_accessor :username, :password, :tariff, :allow_long_messages, :custom_sender
6
+ attr_accessor :username, :password, :tariff, :allow_long_message, :custom_sender
7
7
 
8
8
  def initialize(username, password)
9
9
  @username = username
10
10
  @password = password
11
11
  @tariff = false
12
- @allow_long_messages = false
12
+ @allow_long_message = false
13
13
  @custom_sender = false
14
14
  end
15
15
 
@@ -35,14 +35,14 @@ module MoSms
35
35
  private
36
36
  def set_uri(phone_number, data, message_type)
37
37
  tariff = ""
38
- allow_long_messages = ""
39
- custom_sender
38
+ allow_long_message = ""
39
+ custom_sender = ""
40
40
 
41
41
  tariff = "&tariff=1" if @tariff
42
- allow_long_messages = "&allowlong=1" if @allow_long_messages
42
+ allow_long_message = "&allowlong=1" if @allow_long_message
43
43
  custom_sender = "&customsender=1" if @custom_sender
44
44
 
45
- @api_uri = "http://www.mosms.com/se/sms-send.php?username=#{@username}&password=#{password}&nr=#{phone_number}&type=#{message_type}&data=#{data}#{tariff}#{allow_long_messages}#{custom_sender}"
45
+ @api_uri = "http://www.mosms.com/se/sms-send.php?username=#{@username}&password=#{password}&nr=#{phone_number}&type=#{message_type}&data=#{data}#{tariff}#{allow_long_message}#{custom_sender}"
46
46
  @api_uri = URI.escape(@api_uri)
47
47
  end
48
48
 
@@ -1,3 +1,3 @@
1
1
  module MoSms
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mo_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jone Samra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler