ofx_for_ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ofx/1.0.2/banking_message_set.rb +1 -1
- data/lib/ofx/http/ofx_http_client.rb +2 -2
- data/lib/ofx/version.rb +19 -15
- data/test/test_ofx_version.rb +1 -1
- metadata +4 -4
@@ -113,7 +113,7 @@ module OFX
|
|
113
113
|
body << " <ACCTID>#{account_identifier}"
|
114
114
|
body << " <ACCTTYPE>#{BankingAccount.account_type_to_ofx_102_s(account_type)}"
|
115
115
|
body << " <ACCTKEY>#{account_key}" if account_key
|
116
|
-
body << " </BANKACCTFROM
|
116
|
+
body << " </BANKACCTFROM>\n"
|
117
117
|
body.join("\n")
|
118
118
|
end
|
119
119
|
|
@@ -30,14 +30,14 @@ module OFX
|
|
30
30
|
def send(ofx_body)
|
31
31
|
http_request = Net::HTTP::Post.new(@ofx_uri.request_uri)
|
32
32
|
|
33
|
-
http_request['User-Agent'] =
|
33
|
+
http_request['User-Agent'] = "OFX for Ruby #{OFX::VERSION.to_dotted_s}"
|
34
34
|
http_request['Content-Type'] = 'application/x-ofx'
|
35
35
|
http_request['Accept'] = "*/*, application/x-ofx"
|
36
36
|
http_request['Content-Length'] = ofx_body.length.to_s
|
37
37
|
|
38
38
|
http_request.body = ofx_body.gsub("\n", "\r\n")
|
39
39
|
|
40
|
-
#print_request http_request
|
40
|
+
# print_request http_request
|
41
41
|
|
42
42
|
http = Net::HTTP.new(@ofx_uri.host, @ofx_uri.port)
|
43
43
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
data/lib/ofx/version.rb
CHANGED
@@ -21,21 +21,25 @@ module OFX
|
|
21
21
|
|
22
22
|
def initialize(version)
|
23
23
|
@version = [0, 0, 0]
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
24
|
+
|
25
|
+
return if version.nil?
|
26
|
+
|
27
|
+
parts = case version
|
28
|
+
when Version
|
29
|
+
version.to_a
|
30
|
+
when Integer
|
31
|
+
[version, 0, 0]
|
32
|
+
when Array
|
33
|
+
version
|
34
|
+
when /\./
|
35
|
+
version.split(".")
|
36
|
+
else
|
37
|
+
[version[0..0], version[1..1], version[2..2]]
|
38
38
|
end
|
39
|
+
|
40
|
+
@version[0] = parts[0].to_i
|
41
|
+
@version[1] = parts[1].to_i
|
42
|
+
@version[2] = parts[2].to_i
|
39
43
|
end
|
40
44
|
|
41
45
|
def major
|
@@ -78,5 +82,5 @@ module OFX
|
|
78
82
|
end
|
79
83
|
end
|
80
84
|
|
81
|
-
VERSION = Version.new('0.1.
|
85
|
+
VERSION = Version.new('0.1.2')
|
82
86
|
end
|
data/test/test_ofx_version.rb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
# You should have received a copy of the GNU General Public License
|
16
16
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
|
18
|
-
require File.dirname(__FILE__) + '/test_helper'
|
18
|
+
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
19
19
|
|
20
20
|
class OFXVersionTest < Test::Unit::TestCase
|
21
21
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ofx_for_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Guidry
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-16 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|