vtext 0.0.2 → 0.0.3

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.
Files changed (4) hide show
  1. data/README.rdoc +12 -1
  2. data/VERSION +1 -1
  3. data/bin/vtext +74 -0
  4. metadata +6 -5
@@ -1,6 +1,17 @@
1
1
  = vtext
2
2
 
3
- Description goes here.
3
+ Use this class to send text messages to a Verizon phone.
4
+
5
+ require 'vtext'
6
+
7
+ vtext = Vtext.new({ "cell_num" => "5551234567899",
8
+ "username" => "gmail username",
9
+ "password" => "password"}
10
+ )
11
+
12
+ vtext.send('hello world')
13
+
14
+
4
15
 
5
16
  == Copyright
6
17
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ #
4
+ # CLI to use Verizon's vtext email->SMS service
5
+ #
6
+ # Copyright (C) 2009 dougsko
7
+ #
8
+ # This program is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ #
21
+
22
+ require 'rubygems'
23
+ require 'optparse'
24
+ require 'vtext'
25
+
26
+ options = {}
27
+
28
+ opts = OptionParser.new do |opts|
29
+ opts.banner = "vtext is program to use Verizon's vtext email->SMS
30
+ service
31
+ Example: vtext -s smtp.gmail.com --port 587 -u username --pass pass -n
32
+ 5551234567899 -t \"message to send\" "
33
+
34
+ opts.separator ""
35
+ opts.separator "Options:"
36
+
37
+ opts.on("-s <smtp server>", "--server <smtp server>", String, "SMTP
38
+ server") do |server|
39
+ options["server"] = server
40
+ end
41
+
42
+ opts.on("--port <smtp port>", String, "SMTP port") do |port|
43
+ options["port"] = port
44
+ end
45
+
46
+ opts.on("-u <username>", "--user <username>", String, "Email username") do |username|
47
+ options["username"] = username
48
+ end
49
+
50
+ opts.on("--pass <password>", String, "Email password") do |pass|
51
+ options["password"] = pass
52
+ end
53
+
54
+ opts.on("-n <phone number>", "--number <phone number>", String, "Phone number to send text message") do |num|
55
+ options["cell_num"] = num
56
+ end
57
+
58
+ opts.on("-t <text>", "--text <text>", String, "Text to send") do |text|
59
+ options["text"] = text
60
+ end
61
+
62
+ opts.on_tail("-h", "--help", "Show this message") do
63
+ puts opts
64
+ exit
65
+ end
66
+ end
67
+
68
+ opts.parse(ARGV)
69
+
70
+ text = options["text"]
71
+ options.delete("text")
72
+
73
+ vtext = Vtext.new(options)
74
+ vtext.send(text)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vtext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - dougsko
@@ -9,8 +9,8 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-08 00:00:00 -05:00
13
- default_executable:
12
+ date: 2009-12-09 00:00:00 -05:00
13
+ default_executable: vtext
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: smtp-tls
@@ -34,8 +34,8 @@ dependencies:
34
34
  version:
35
35
  description:
36
36
  email: dougtko@gmail.com
37
- executables: []
38
-
37
+ executables:
38
+ - vtext
39
39
  extensions: []
40
40
 
41
41
  extra_rdoc_files:
@@ -48,6 +48,7 @@ files:
48
48
  - README.rdoc
49
49
  - Rakefile
50
50
  - VERSION
51
+ - bin/vtext
51
52
  - lib/vtext.rb
52
53
  - spec/spec_helper.rb
53
54
  - spec/vtext_spec.rb