fax_finder 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fax_finder.gemspec +1 -1
- data/lib/fax_finder/response.rb +5 -9
- data/lib/fax_finder/send.rb +2 -0
- data/pkg/fax_finder-0.2.0.gem +0 -0
- data/test/send_test.rb +12 -1
- metadata +5 -5
- data/pkg/fax_finder-0.1.0.gem +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/fax_finder.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/fax_finder/request.rb",
|
30
30
|
"lib/fax_finder/response.rb",
|
31
31
|
"lib/fax_finder/send.rb",
|
32
|
-
"pkg/fax_finder-0.
|
32
|
+
"pkg/fax_finder-0.2.0.gem",
|
33
33
|
"test/fixtures/send_request_external.xml",
|
34
34
|
"test/fixtures/send_request_inline.xml",
|
35
35
|
"test/fixtures/send_response_success.xml",
|
data/lib/fax_finder/response.rb
CHANGED
@@ -2,15 +2,6 @@ module FaxFinder
|
|
2
2
|
module Responses
|
3
3
|
ERROR_GSUB='####MESSAGE#####'
|
4
4
|
|
5
|
-
NO_CONNECTION =<<-EOXML
|
6
|
-
<response>
|
7
|
-
<message>No connection to fax server</message>
|
8
|
-
<fax_entry>
|
9
|
-
<state>error</state>
|
10
|
-
</fax_entry>
|
11
|
-
</response>
|
12
|
-
EOXML
|
13
|
-
|
14
5
|
APPLICATION_ERROR =<<-EOXML
|
15
6
|
<response>
|
16
7
|
<message>####MESSAGE#####</message>
|
@@ -19,6 +10,11 @@ module FaxFinder
|
|
19
10
|
</fax_entry>
|
20
11
|
</response>
|
21
12
|
EOXML
|
13
|
+
|
14
|
+
NO_CONNECTION = APPLICATION_ERROR.gsub('####MESSAGE#####', 'No connection to fax server')
|
15
|
+
|
16
|
+
UNAUTHORIZED = APPLICATION_ERROR.gsub('####MESSAGE#####', 'Unauthorized to communicate with fax server.')
|
17
|
+
|
22
18
|
end
|
23
19
|
|
24
20
|
class Response
|
data/lib/fax_finder/send.rb
CHANGED
@@ -68,6 +68,8 @@ module FaxFinder
|
|
68
68
|
builder.content_type(options[:content_type])
|
69
69
|
end
|
70
70
|
end
|
71
|
+
builder.try_interval(options[:try_interval])
|
72
|
+
builder.max_tries(options[:max_tries])
|
71
73
|
builder.schedule_all_at(formatted_fax_finder_time(options[:schedule_all_at]))
|
72
74
|
}
|
73
75
|
xml
|
Binary file
|
data/test/send_test.rb
CHANGED
@@ -10,7 +10,9 @@ module FaxFinder
|
|
10
10
|
:sender_name=>'sender_name',
|
11
11
|
:sender_organization=>'sender_organization',
|
12
12
|
:sender_phone_number=>'0987654321',
|
13
|
-
:schedule_all_at=>Time.now.utc
|
13
|
+
:schedule_all_at=>Time.now.utc,
|
14
|
+
:try_interval=>23,
|
15
|
+
:max_tries=>17
|
14
16
|
}
|
15
17
|
|
16
18
|
class SendPostTest<Test::Unit::TestCase
|
@@ -84,6 +86,15 @@ module FaxFinder
|
|
84
86
|
assert_equal('https://localhost/something', @doc.xpath('//schedule_fax/attachment/url').text)
|
85
87
|
end
|
86
88
|
|
89
|
+
def test_includes_max_tries
|
90
|
+
assert_equal('17', @doc.xpath('//schedule_fax/max_tries').text)
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
def test_includes_try_interval
|
95
|
+
assert_equal('23', @doc.xpath('//schedule_fax/try_interval').text)
|
96
|
+
end
|
97
|
+
|
87
98
|
def test_includes_schedule_all_at
|
88
99
|
assert_equal(Time.now.utc.strftime(Request::TIME_FORMAT), @doc.xpath('//schedule_fax/schedule_all_at').text)
|
89
100
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fax_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Erich L. Timkar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-30 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: nokogiri
|
@@ -101,7 +101,7 @@ files:
|
|
101
101
|
- lib/fax_finder/request.rb
|
102
102
|
- lib/fax_finder/response.rb
|
103
103
|
- lib/fax_finder/send.rb
|
104
|
-
- pkg/fax_finder-0.
|
104
|
+
- pkg/fax_finder-0.2.0.gem
|
105
105
|
- test/fixtures/send_request_external.xml
|
106
106
|
- test/fixtures/send_request_inline.xml
|
107
107
|
- test/fixtures/send_response_success.xml
|
data/pkg/fax_finder-0.1.0.gem
DELETED
Binary file
|