ofx_for_ruby 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ module OFX
27
27
  @ofx_uri = ofx_uri
28
28
  end
29
29
 
30
- def send(ofx_body)
30
+ def send(ofx_body, ssl_version=nil, do_print_request=false, do_print_response=false)
31
31
  http_request = Net::HTTP::Post.new(@ofx_uri.request_uri)
32
32
 
33
33
  http_request['User-Agent'] = "OFX for Ruby #{OFX::VERSION.to_dotted_s}"
@@ -37,9 +37,18 @@ module OFX
37
37
 
38
38
  http_request.body = ofx_body.gsub("\n", "\r\n")
39
39
 
40
- # print_request http_request
40
+ if (do_print_request)
41
+ print_request http_request
42
+ end
41
43
 
42
44
  http = Net::HTTP.new(@ofx_uri.host, @ofx_uri.port)
45
+
46
+ if (ssl_version)
47
+ # supported in Ruby 1.9 or patched into 1.8
48
+ if (Net::HTTP.method_defined?(:ssl_version=))
49
+ http.ssl_version=ssl_version
50
+ end
51
+ end
43
52
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER
44
53
  http.ca_file = File.join(File.dirname(__FILE__), "cacert.pem")
45
54
  http.use_ssl = true
@@ -47,12 +56,12 @@ module OFX
47
56
  http.request(http_request)
48
57
  end
49
58
 
50
- #print_response http_response
51
-
52
59
  case http_response
53
60
  when Net::HTTPSuccess
61
+ print_response http_response if do_print_response
54
62
  http_response.body
55
63
  else
64
+ print_response http_response
56
65
  http_response.error!
57
66
  end
58
67
  end
@@ -81,4 +90,4 @@ module OFX
81
90
  puts http_response.body
82
91
  end
83
92
  end
84
- end
93
+ end
@@ -82,5 +82,5 @@ module OFX
82
82
  end
83
83
  end
84
84
 
85
- VERSION = Version.new('0.1.3')
85
+ VERSION = Version.new('0.1.4')
86
86
  end
@@ -0,0 +1,60 @@
1
+ # Copyright © 2007 Chris Guidry <chrisguidry@gmail.com>
2
+ #
3
+ # This file is part of OFX for Ruby.
4
+ #
5
+ # OFX for Ruby is free software; you can redistribute it and/or modify
6
+ # it under the terms of the GNU General Public License as published by
7
+ # the Free Software Foundation; either version 3 of the License, or
8
+ # (at your option) any later version.
9
+ #
10
+ # OFX for Ruby is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ # GNU General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU General Public License
16
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+
18
+ require 'active_support'
19
+ require 'uri'
20
+ require 'cgi'
21
+
22
+ require 'bigdecimal'
23
+ require 'bigdecimal/util'
24
+
25
+ require 'ofx/version'
26
+ require 'ofx/status'
27
+ require 'ofx/file_unique_identifier'
28
+ require 'ofx/transaction_unique_identifier'
29
+ require 'ofx/header'
30
+ require 'ofx/message_set'
31
+ require 'ofx/document'
32
+ require 'ofx/statements'
33
+
34
+ require 'ofx/financial_institution'
35
+ require 'ofx/financial_client'
36
+
37
+ require 'ofx/signon_message_set'
38
+ require 'ofx/signup_message_set'
39
+ require 'ofx/banking_message_set'
40
+ require 'ofx/credit_card_statement_message_set'
41
+ require 'ofx/investment_statement_message_set'
42
+ require 'ofx/interbank_funds_transfer_message_set'
43
+ require 'ofx/wire_funds_transfer_message_set'
44
+ require 'ofx/payment_message_set'
45
+ require 'ofx/email_message_set'
46
+ require 'ofx/investment_security_list_message_set'
47
+ require 'ofx/financial_institution_profile_message_set'
48
+
49
+ require 'ofx/serializer'
50
+
51
+ require 'ofx/http/ofx_http_client.rb'
52
+
53
+ # = Summary
54
+ # An implementation of the OFX specification for financial systems
55
+ # integration.
56
+ #
57
+ # = Specifications
58
+ # OFX 1.0.2:: http://www.ofx.net/ofx/downloads/ofx102spec.zip
59
+ module OFX
60
+ end
@@ -19,7 +19,8 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.add_dependency "activesupport"
21
21
 
22
- s.add_development_dependency "racc"
23
- s.add_development_dependency "rexical"
22
+ s.add_development_dependency "racc", "1.4.6"
23
+ s.add_development_dependency "rexical", "1.0.5"
24
24
  s.add_development_dependency "pry"
25
+ s.add_development_dependency "rake"
25
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofx_for_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Guidry
@@ -9,62 +9,76 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-24 00:00:00.000000000 Z
12
+ date: 2020-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: racc
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: '0'
34
+ version: 1.4.6
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: '0'
41
+ version: 1.4.6
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rexical
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - '='
47
+ - !ruby/object:Gem::Version
48
+ version: 1.0.5
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '='
54
+ - !ruby/object:Gem::Version
55
+ version: 1.0.5
56
+ - !ruby/object:Gem::Dependency
57
+ name: pry
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
47
61
  - !ruby/object:Gem::Version
48
62
  version: '0'
49
63
  type: :development
50
64
  prerelease: false
51
65
  version_requirements: !ruby/object:Gem::Requirement
52
66
  requirements:
53
- - - '>='
67
+ - - ">="
54
68
  - !ruby/object:Gem::Version
55
69
  version: '0'
56
70
  - !ruby/object:Gem::Dependency
57
- name: pry
71
+ name: rake
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
- - - '>='
74
+ - - ">="
61
75
  - !ruby/object:Gem::Version
62
76
  version: '0'
63
77
  type: :development
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
- - - '>='
81
+ - - ">="
68
82
  - !ruby/object:Gem::Version
69
83
  version: '0'
70
84
  description: OFX for Ruby is a pure Ruby implementation of Open Financial Exchange
@@ -77,16 +91,17 @@ executables: []
77
91
  extensions: []
78
92
  extra_rdoc_files: []
79
93
  files:
80
- - .externalToolBuilders/Rebuild parsers.launch
81
- - .gitignore
82
- - .loadpath
83
- - .project
84
- - .ruby-version
94
+ - ".externalToolBuilders/Rebuild parsers.launch"
95
+ - ".gitignore"
96
+ - ".loadpath"
97
+ - ".project"
98
+ - ".ruby-version"
85
99
  - COPYING
86
100
  - Gemfile
87
101
  - README
88
102
  - RELEASE_NOTES
89
103
  - Rakefile
104
+ - USAGE
90
105
  - lib/ofx.rb
91
106
  - lib/ofx/1.0.2/banking_message_set.rb
92
107
  - lib/ofx/1.0.2/credit_card_statement_message_set.rb
@@ -133,6 +148,7 @@ files:
133
148
  - lib/ofx/transaction_unique_identifier.rb
134
149
  - lib/ofx/version.rb
135
150
  - lib/ofx/wire_funds_transfer_message_set.rb
151
+ - lib/ofx_for_ruby.rb
136
152
  - ofx_for_ruby.gemspec
137
153
  - planning/OFX Specification completion.ods
138
154
  - test/capital_one/capital_one_helper.rb
@@ -161,35 +177,18 @@ require_paths:
161
177
  - lib
162
178
  required_ruby_version: !ruby/object:Gem::Requirement
163
179
  requirements:
164
- - - '>='
180
+ - - ">="
165
181
  - !ruby/object:Gem::Version
166
182
  version: '0'
167
183
  required_rubygems_version: !ruby/object:Gem::Requirement
168
184
  requirements:
169
- - - '>='
185
+ - - ">="
170
186
  - !ruby/object:Gem::Version
171
187
  version: '0'
172
188
  requirements: []
173
189
  rubyforge_project:
174
- rubygems_version: 2.0.3
190
+ rubygems_version: 2.6.12
175
191
  signing_key:
176
192
  specification_version: 4
177
193
  summary: Pure Ruby implementation of Open Financial Exchange specifications
178
- test_files:
179
- - test/capital_one/capital_one_helper.rb
180
- - test/capital_one/fixtures/README
181
- - test/capital_one/fixtures/fipid-5599.xml
182
- - test/capital_one/test_banking_statement.rb
183
- - test/capital_one/test_financial_institution_profile.rb
184
- - test/capital_one/test_ofx_http_client.rb
185
- - test/capital_one/test_signup_account_information.rb
186
- - test/citi/citi_helper.rb
187
- - test/citi/fixtures/README
188
- - test/citi/fixtures/fipid-6642.xml
189
- - test/citi/test_credit_card_statement.rb
190
- - test/citi/test_financial_institution_profile.rb
191
- - test/citi/test_ofx_http_client.rb
192
- - test/citi/test_signup_account_information.rb
193
- - test/test_helper.rb
194
- - test/test_ofx_version.rb
195
- - test/test_parser.rb
194
+ test_files: []