activesms 0.6.0 → 0.6.1

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.
@@ -102,7 +102,7 @@ module ActiveSms #:nodoc:
102
102
  cattr_accessor :deliveries
103
103
 
104
104
  # The recipient numbers for the message, either as a string (for a single
105
- # recipient) or an array (for multiple recipients).
105
+ # recipient) or an array (for multiple recipientipients).
106
106
  adv_attr_accessor :recipients
107
107
 
108
108
  # Specify the from number or identifier for the message.
@@ -23,11 +23,13 @@ module ActiveSms
23
23
  super(logger)
24
24
  @config = config.dup
25
25
  @config.symbolize_keys!
26
-
27
- unless @config.member?(:subscriber_id)
26
+ @subscriber_id = @config[:subscriber_id]
27
+ @subscriber_password = @config[:subscriber_password]
28
+
29
+ if @subscriber_id.nil?
28
30
  raise "subscriber_id is required for simplewire"
29
31
  end
30
- unless @config.member?(:subscriber_password)
32
+ if @subscriber_password.nil?
31
33
  raise "subscriber_password is required for simplewire"
32
34
  end
33
35
  end
@@ -39,7 +41,7 @@ module ActiveSms
39
41
 
40
42
  # Send the sms message using the simplewire adapter
41
43
  def deliver(sms)
42
- create_sms(sms).submit()
44
+ create_sms(sms).msg_send()
43
45
  end
44
46
 
45
47
  def parse(sms)
@@ -48,8 +50,10 @@ module ActiveSms
48
50
  # Create the simplewire sms message to send
49
51
  def create_sms(sms)
50
52
  s = SMS.new
51
- s.destination_addr = sms.recipients
52
- s.source_addr = sms.from
53
+ s.subscriber_id = @subscriber_id
54
+ s.subscriber_password = @subscriber_password
55
+ s.msg_pin = sms.recipients
56
+ s.msg_callback = sms.from
53
57
  s.msg_text = sms.body
54
58
  s
55
59
  end
@@ -2,7 +2,7 @@ module ActiveSms #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 6
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -16,12 +16,16 @@ if RUBY_PLATFORM =~ /java/
16
16
 
17
17
  def test_create_sms
18
18
  sms = flexmock("sms")
19
+ sms.should_receive(:subscriber_id).and_return("id")
20
+ sms.should_receive(:subscriber_password).and_return("password")
19
21
  sms.should_receive(:recipients).and_return("4081234567")
20
22
  sms.should_receive(:from).and_return("6502435555")
21
23
  sms.should_receive(:body).and_return("This is the body of the sms")
22
24
 
23
25
  s = @simplewire_adapter.create_sms(sms)
24
26
 
27
+ assert_equal "id", s.subscriber_id
28
+ assert_equal "password", s.subscriber_password
25
29
  assert_equal "4081234567", s.destination_addr.address
26
30
  assert_equal "6502435555", s.source_addr.address
27
31
  assert_equal "This is the body of the sms", s.msg_text
@@ -33,7 +33,7 @@
33
33
  <h1>ActiveSms</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/activesms"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/activesms" class="numbers">0.0.2</a>
36
+ <a href="http://rubyforge.org/projects/activesms" class="numbers">0.6.0</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
39
 
@@ -52,6 +52,12 @@
52
52
  <p><span class="caps">TBD</span>.</p>
53
53
 
54
54
 
55
+ <h2><span class="caps">API</span> Documentation</h2>
56
+
57
+
58
+ <p>Check out the <a href="http://activesms.rubyforge.org/rdoc/">rdocs.</a></p>
59
+
60
+
55
61
  <h2>Supported Gateways</h2>
56
62
 
57
63
 
@@ -12,6 +12,10 @@ h2. Demonstration of usage
12
12
 
13
13
  TBD.
14
14
 
15
+ h2. API Documentation
16
+
17
+ Check out the "rdocs.":http://activesms.rubyforge.org/rdoc/
18
+
15
19
  h2. Supported Gateways
16
20
 
17
21
  Active SMS will require a valid account from a third party SMS gateway to
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: activesms
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.6.0
7
- date: 2007-07-26 00:00:00 -07:00
6
+ version: 0.6.1
7
+ date: 2007-08-30 00:00:00 -07:00
8
8
  summary: Active SMS is a framework for sending and receiving SMS messages
9
9
  require_paths:
10
10
  - lib