valdemaximus-conduit 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.3.0
@@ -13,14 +13,13 @@ module ValdeMaximus
13
13
  assign_properties(p)
14
14
  end
15
15
 
16
- def send_message(msg, list, properties={})
17
- assign_properties(properties)
18
-
16
+ def send_message(msg, list, node_id='')
19
17
  @http ||= Net::HTTP.new(@domain, @port)
20
18
  @http.use_ssl = false
21
19
 
22
20
  data = ValdeMaximus::UriUtil.to_url_param({:user_credentials => @creds,
23
21
  :body => msg,
22
+ :node_id => node_id.to_s,
24
23
  'to[]' => list})
25
24
  @headers = {
26
25
  'Content-Type' => ValdeMaximus::UriUtil::CONTENT_TYPE
data/test/tc_conduit.rb CHANGED
@@ -5,10 +5,25 @@ require 'valdemaximus-conduit'
5
5
  class TestValdeMaximusConduit < Test::Unit::TestCase
6
6
  def test_message_with_phone_numbers
7
7
  c = ValdeMaximus::Conduit.new(:domain => 'localhost', :port => 3000, :creds => 'f_Le6kzsCJi5tNP7rFpQ')
8
- res = c.send_message('hello world 12',
9
- ['8016946634, Tom Johnson',
8
+ res = c.send_message('hello world',
9
+ ['8016946634',
10
10
  '8016946632, Little T Johnson',
11
11
  '8016946633, Big T Johnson'])
12
12
  assert_equal('SUCCESS', res[1])
13
13
  end
14
+
15
+ def test_message_with_node_id
16
+ c = ValdeMaximus::Conduit.new(:domain => 'localhost', :port => 3000, :creds => 'f_Le6kzsCJi5tNP7rFpQ')
17
+ res = c.send_message('hello world',
18
+ ['8016946634',
19
+ '8016946632, Little T Johnson',
20
+ '8016946633, Big T Johnson'], 1)
21
+ assert_equal('SUCCESS', res[1])
22
+
23
+ res = c.send_message('hello world',
24
+ ['8016946634',
25
+ '8016946632, Little T Johnson',
26
+ '8016946633, Big T Johnson'], 2)
27
+ assert_equal('FAILURE', res[1])
28
+ end
14
29
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{valdemaximus-conduit}
8
- s.version = "0.2.1"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tom Johnson"]
12
- s.date = %q{2009-12-17}
12
+ s.date = %q{2009-12-18}
13
13
  s.description = %q{A Library to programmatically interface with portal}
14
14
  s.email = %q{valde.maximus@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valdemaximus-conduit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Johnson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-17 00:00:00 -07:00
12
+ date: 2009-12-18 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency