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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abec3bfe5836ee20f161eea5ab25a3c858d1a344
4
- data.tar.gz: 91c5ff410f42418f009b88a3de62c82cb2a20f2a
3
+ metadata.gz: 985dce18eafc6e06622c8a672931123ae5aeb37d
4
+ data.tar.gz: c954e6c222a5fb423d5d276f4e7c01f8967df4c8
5
5
  SHA512:
6
- metadata.gz: 1b3e2c373e3f216853e14211c70a9ee9eacf3e43729fb9ba4faf46877b62367609dd479a3ab063763a91034710009af6ffb8857c4cc67ec2b3a987fa39f004d5
7
- data.tar.gz: 529968ec14df4414545486a6dd8399aae806b60345d6205bb6069c01b6bb529d5b527e3dbbba26598b7e1a98bc90bd0523d34a17b5217aebb3812651d5408580
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 SMS delivery
59
+ * Basic Ruby Use Case (non-Rails)
60
60
 
61
- sms-easy.deliver("5558675309","at&t","message")
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
- * If you want to set a custom from e-mail per SMS message, you can do so
64
- by doing the following.
69
+ # Configure SMSEasy's "from" address:
70
+ SMSEasy::Client.config['from_address'] = "noreply@example.com"
65
71
 
66
- sms-easy.deliver("5558675309","at&t","message", :from => "bob@test.com")
72
+ # Optionally override the carries list using your own data file.
73
+ # SMSEasy::Client.configure(YAML.load(...))
67
74
 
68
- * You can set the maximum length of the SMS message, which is not set by
69
- default. Most phones can only accept 128 characters. To do this just
70
- specify the limit option.
75
+ # Create the client
76
+ easy = SMSEasy::Client.new
71
77
 
72
- sms-easy.deliver("5558675309","at&t","message", :limit => 128)
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
- * Retrieve a collection of all carriers
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
@@ -5,3 +5,5 @@ require_relative 'sms/easy/easy'
5
5
  require_relative 'sms/easy/easy_helper'
6
6
  require_relative 'sms/easy/notifier'
7
7
  require_relative 'sms/easy/exception'
8
+
9
+ SMSEasy::Client.configure
@@ -1,3 +1,3 @@
1
1
  module SMSEasy
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms-easy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan G. Lim