burstsms 0.1.3 → 0.1.4
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.
- data/README.md +5 -0
- data/lib/burstsms/messages_add.rb +1 -0
- data/lib/burstsms/messages_multiple.rb +1 -0
- data/lib/burstsms/version.rb +1 -1
- data/spec/burst_sms_spec.rb +14 -0
- metadata +3 -3
data/README.md
CHANGED
@@ -153,6 +153,11 @@ The `burstsms` gem uses:
|
|
153
153
|
- Complete 'contact-lists.add-multiple-recipients'
|
154
154
|
- Add reseller API functions.
|
155
155
|
|
156
|
+
Contributors
|
157
|
+
------------
|
158
|
+
|
159
|
+
[Burst Sms Contributors](https://github.com/madeindata/Burst-Sms/contributors)
|
160
|
+
|
156
161
|
Licence
|
157
162
|
-------
|
158
163
|
|
@@ -13,6 +13,7 @@ module BurstSms
|
|
13
13
|
:caller_id => check_valid_sender(from),
|
14
14
|
:message => encode_msg(message),
|
15
15
|
:sendtime => (options.has_key?(:sendtime) ? options[:sendtime] : nil),
|
16
|
+
:validity => (options.has_key?(:validity) ? options[:validity] : nil),
|
16
17
|
:contact_list => (options.has_key?(:contact_list) ? options[:contact_list] : nil)
|
17
18
|
)
|
18
19
|
end
|
@@ -13,6 +13,7 @@ module BurstSms
|
|
13
13
|
:caller_id => check_valid_sender(from),
|
14
14
|
:message => encode_msg(message),
|
15
15
|
:sendtime => (options.has_key?(:sendtime) ? options[:sendtime] : nil),
|
16
|
+
:validity => (options.has_key?(:validity) ? options[:validity] : nil),
|
16
17
|
:contact_list => (options.has_key?(:contact_list) ? options[:contact_list] : nil))
|
17
18
|
end
|
18
19
|
|
data/lib/burstsms/version.rb
CHANGED
data/spec/burst_sms_spec.rb
CHANGED
@@ -73,6 +73,13 @@ describe BurstSms do
|
|
73
73
|
@response.result.should == nil
|
74
74
|
@response.error.should == 'Authentication failed - key: 797987, secret: x'
|
75
75
|
end
|
76
|
+
|
77
|
+
it "supports validity param" do
|
78
|
+
@request_body = @burst.send_message_body('6147779990', @numbers_cocktail,
|
79
|
+
"Validity test", validity: 10)
|
80
|
+
@nok_parsed = Nokogiri::XML(@request_body)
|
81
|
+
@nok_parsed.should have_xml('//request/params/validity', '10')
|
82
|
+
end
|
76
83
|
end
|
77
84
|
|
78
85
|
context "'messages.get' - http://burstsms.com/api-documentation/messages.get" do
|
@@ -111,6 +118,13 @@ describe BurstSms do
|
|
111
118
|
nodes.each { |n| @nok_parsed.should have_xml(n)}
|
112
119
|
end
|
113
120
|
|
121
|
+
it "supports validity param" do
|
122
|
+
@request_body = @burst.add_message_body('6147779990', 123, "Validity test",
|
123
|
+
validity: 10)
|
124
|
+
@nok_parsed = Nokogiri::XML(@request_body)
|
125
|
+
@nok_parsed.should have_xml('//request/params/validity', '10')
|
126
|
+
end
|
127
|
+
|
114
128
|
it "Sends correct API request and parses XML response to ruby object" do
|
115
129
|
# This has the potential to fail in ruby-1.8 due to Hash ordering... or lack of it.
|
116
130
|
stub_request(:post, BurstSms::API_URL).with(:body => File.read('spec/fixtures/api_requests/messages_add.txt')).to_return(:status => 200, :body => File.read('spec/fixtures/api_responses/messages_add_success.txt'))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: burstsms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: unhappymapper
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
|
-
rubygems_version: 1.8.
|
168
|
+
rubygems_version: 1.8.25
|
169
169
|
signing_key:
|
170
170
|
specification_version: 3
|
171
171
|
summary: Ruby Interface for the Burst SMS gateway
|