textr 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,10 @@
1
1
  # textr
2
+
3
+ Simple gem for sending SMS
4
+
2
5
  ## Install
3
6
  ### RubyGems.org
4
- coming soon
7
+ $ gem install textr
5
8
 
6
9
  ### from source
7
10
  $ git clone http://github.com/forrestgrant/textr
@@ -17,69 +20,69 @@ You can use textr with an ActiveRecord model, standalone, or on any object.
17
20
 
18
21
  Just add `extends_textr` to your model.
19
22
 
20
- class User < ActiveRecord::Base
21
- extends_textr
22
- end
23
+ class User < ActiveRecord::Base
24
+ extends_textr
25
+ end
23
26
 
24
27
  You can then send an SMS like this
25
28
 
26
- User.first.send_notification :carrier => 'att', :body => 'Hello World!'
29
+ User.first.send_notification :carrier => 'att', :body => 'Hello World!'
27
30
 
28
31
  Your model must have a `phone` attribute. If you wish to change this to something else (like `number` for example), simply pass it like this `extends_textr :number`
29
32
 
30
- class User < ActiveRecord::Base
31
- extends_textr :number
32
- end
33
+ class User < ActiveRecord::Base
34
+ extends_textr :number
35
+ end
33
36
 
34
37
  Or you can override the `phone` attribute
35
38
 
36
- User.first.send_notification :number => '098-765-4321', :carrier => 'att', :body => 'Hello World!'
39
+ >> User.first.send_notification :number => '098-765-4321', :carrier => 'att', :body => 'Hello World!'
37
40
 
38
41
  ### Standalone
39
42
 
40
43
  Simply call `Textr.send_sms` and pass the number with the hash.
41
44
 
42
- $ rails c
43
- >> Textr.send_sms :number => '123-456-7890', :body => 'Hello World!', :carrier => 'att'
44
- => #<Mail::Message:12345>
45
+ $ rails c
46
+ >> Textr.send_sms :number => '123-456-7890', :body => 'Hello World!', :carrier => 'att'
47
+ => #<Mail::Message:12345>
45
48
 
46
49
  ### Transport
47
50
 
48
51
  textr relies on Pony (https://github.com/benprew/pony) for mail transport which uses /usr/sbin/sendmail to send mail if it is available, otherwise it uses SMTP to localhost. To add custom SMTP config
49
52
 
50
- rake textr:config:smtp
53
+ $ rake textr:config:smtp
51
54
 
52
55
  This will generate `config/textr_smtp.yml`, add your custom SMTP settings
53
56
 
54
- development:
55
- protocol: smtp
56
- from: email@example.com
57
- address: smtp.yourserver.com
58
- port: 25
59
- ssl: true
60
- username: user
61
- password: password
62
- authentication: plain
63
- domain: localhost.localdomain
64
-
65
- test:
66
- protocol: smtp
67
- from: email@example.com
68
- address: smtp.yourserver.com
69
- port: 25
70
- ssl: true
71
- username: user
72
- password: password
73
- authentication: plain
74
- domain: localhost.localdomain
75
-
76
- production:
77
- protocol: smtp
78
- from: email@example.com
79
- address: smtp.yourserver.com
80
- port: 25
81
- ssl: true
82
- username: user
83
- password: password
84
- authentication: plain
85
- domain: localhost.localdomain
57
+ development:
58
+ protocol: smtp
59
+ from: email@example.com
60
+ address: smtp.yourserver.com
61
+ port: 25
62
+ ssl: true
63
+ username: user
64
+ password: password
65
+ authentication: plain
66
+ domain: localhost.localdomain
67
+
68
+ test:
69
+ protocol: smtp
70
+ from: email@example.com
71
+ address: smtp.yourserver.com
72
+ port: 25
73
+ ssl: true
74
+ username: user
75
+ password: password
76
+ authentication: plain
77
+ domain: localhost.localdomain
78
+
79
+ production:
80
+ protocol: smtp
81
+ from: email@example.com
82
+ address: smtp.yourserver.com
83
+ port: 25
84
+ ssl: true
85
+ username: user
86
+ password: password
87
+ authentication: plain
88
+ domain: localhost.localdomain
@@ -24,9 +24,15 @@ module Textr
24
24
 
25
25
  @@carriers = {
26
26
  :att => 'txt.att.net',
27
+ :alltel => 'message.alltel.com',
27
28
  :boost => 'myboostmobile.com',
28
- :tmobile => 'tmomail.net',
29
+ :cellone => 'mobile.celloneusa.com',
30
+ :metropcs => 'mymetropcs.com',
31
+ :nextel => 'messaging.nextel.com',
32
+ :rogers => 'pcs.rogers.com',
29
33
  :sprint => 'messaging.sprintpcs.com',
34
+ :tmobile => 'tmomail.net',
35
+ :uscellular => 'email.uscc.net',
30
36
  :verizon => 'vtext.com',
31
37
  :virgin => 'vmobl.com'
32
38
  }
@@ -1,3 +1,3 @@
1
1
  module Textr
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -21,5 +21,5 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'rake', '0.8.7'
22
22
  s.add_development_dependency 'rspec-rails'
23
23
  s.add_development_dependency 'sqlite3'
24
- s.add_development_dependency 'activerecord', '3.0.7'
24
+ s.add_development_dependency 'activerecord', '>= 3.0.0'
25
25
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 9
10
- version: 0.0.9
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Forrest Grant
@@ -15,12 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-10 00:00:00 Z
18
+ date: 2011-06-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: pony
22
22
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
26
  - - ">="
@@ -30,11 +30,11 @@ dependencies:
30
30
  - 0
31
31
  version: "0"
32
32
  type: :runtime
33
- version_requirements: *id001
33
+ requirement: *id001
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
36
36
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
38
  none: false
39
39
  requirements:
40
40
  - - "="
@@ -46,11 +46,11 @@ dependencies:
46
46
  - 7
47
47
  version: 0.8.7
48
48
  type: :runtime
49
- version_requirements: *id002
49
+ requirement: *id002
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: rspec-rails
52
52
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
56
  - - ">="
@@ -60,11 +60,11 @@ dependencies:
60
60
  - 0
61
61
  version: "0"
62
62
  type: :development
63
- version_requirements: *id003
63
+ requirement: *id003
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: sqlite3
66
66
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
68
68
  none: false
69
69
  requirements:
70
70
  - - ">="
@@ -74,23 +74,23 @@ dependencies:
74
74
  - 0
75
75
  version: "0"
76
76
  type: :development
77
- version_requirements: *id004
77
+ requirement: *id004
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: activerecord
80
80
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
81
+ version_requirements: &id005 !ruby/object:Gem::Requirement
82
82
  none: false
83
83
  requirements:
84
- - - "="
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
- hash: 9
86
+ hash: 7
87
87
  segments:
88
88
  - 3
89
89
  - 0
90
- - 7
91
- version: 3.0.7
90
+ - 0
91
+ version: 3.0.0
92
92
  type: :development
93
- version_requirements: *id005
93
+ requirement: *id005
94
94
  description: Send SMS either via `phone` column in class, or by calling Textr directly
95
95
  email:
96
96
  - forrest@forrestgrant.com
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  requirements: []
144
144
 
145
145
  rubyforge_project: textr
146
- rubygems_version: 1.8.4
146
+ rubygems_version: 1.8.5
147
147
  signing_key:
148
148
  specification_version: 3
149
149
  summary: Simple gem for sending SMS