sms-easy 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +32 -11
- data/lib/sms-easy.rb +2 -0
- data/lib/sms/easy/version.rb +1 -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: 985dce18eafc6e06622c8a672931123ae5aeb37d
|
4
|
+
data.tar.gz: c954e6c222a5fb423d5d276f4e7c01f8967df4c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 238745332733c7842fd5fced9f7dad943b20f5cb3bfabf0ffdf846bdf60fbf9e3ca0085a063b9f427d1cd0f6f9dcbd2313851c361a74231428424c1ea0bb021f
|
7
|
+
data.tar.gz: dbbe55470f25238f424e880a1286c8e8d396f7997974d61bca482ffc5a3ae970830615674e7ccce791d1547e9fb93a26bf3438383253170c549a4b7759199181
|
data/README.rdoc
CHANGED
@@ -56,29 +56,50 @@ limitation. Some of these carriers are include, Mobitel, Etisalat, T-Mobile (Ne
|
|
56
56
|
== Usage
|
57
57
|
|
58
58
|
|
59
|
-
* Basic
|
59
|
+
* Basic Ruby Use Case (non-Rails)
|
60
60
|
|
61
|
-
|
61
|
+
#SMSEasy will use actionmailer's default configuration, which can be overriden if needed:
|
62
|
+
ActionMailer::Base.smtp_settings = {
|
63
|
+
:address => 'smtp.example.com',
|
64
|
+
# :port => '587',
|
65
|
+
:domain => 'example.com',
|
66
|
+
:enable_starttls_auto => false
|
67
|
+
}
|
62
68
|
|
63
|
-
|
64
|
-
|
69
|
+
# Configure SMSEasy's "from" address:
|
70
|
+
SMSEasy::Client.config['from_address'] = "noreply@example.com"
|
65
71
|
|
66
|
-
|
72
|
+
# Optionally override the carries list using your own data file.
|
73
|
+
# SMSEasy::Client.configure(YAML.load(...))
|
67
74
|
|
68
|
-
|
69
|
-
|
70
|
-
specify the limit option.
|
75
|
+
# Create the client
|
76
|
+
easy = SMSEasy::Client.new
|
71
77
|
|
72
|
-
|
78
|
+
# Deliver a simple message.
|
79
|
+
easy.deliver("5551234567", "verizon", "Hey!")
|
80
|
+
|
81
|
+
|
82
|
+
# TO set a custom from e-mail per SMS message:
|
83
|
+
easy.deliver("5551234567", "verizon", "Sup.", :from => "bob@test.com")
|
84
|
+
|
85
|
+
# You can set the maximum length of the SMS message, which is not set by default. Most phones can only accept 128 characters. To do this just specify the limit option.
|
86
|
+
|
87
|
+
easy.deliver("5551234567", "verizon", "Boo-yaa!", :limit => 128)
|
73
88
|
|
74
89
|
* You can retrieve just the formatted address to use in your own mailer.
|
75
90
|
|
76
|
-
SMSEasy.sms_address("5558675309","at&t") # => "5558675309@txt.att.net"
|
91
|
+
SMSEasy::Client.sms_address("5558675309","at&t") # => "5558675309@txt.att.net"
|
77
92
|
|
78
93
|
== View Helpers (Rails)
|
79
94
|
|
80
|
-
*
|
95
|
+
* Include view helpers in application_helper.rb:
|
96
|
+
|
97
|
+
module ApplicationHelper
|
98
|
+
include SMSEasyHelper
|
99
|
+
end
|
81
100
|
|
101
|
+
* Retrieve a collection of all carriers
|
102
|
+
|
82
103
|
<%= carrier_collection %>
|
83
104
|
|
84
105
|
* Display a select box with mobile carriers
|
data/lib/sms-easy.rb
CHANGED
data/lib/sms/easy/version.rb
CHANGED