finapps 0.1.7.pre → 0.1.8.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c5679a78a0f7bc2a210c2894d709bb20bd73331
4
- data.tar.gz: a2171b887b3ec17c3ca3892d2da9e215e45d18c1
3
+ metadata.gz: 30876b25f377f6c13e4ad4e8c343d5c4c31a11af
4
+ data.tar.gz: b4bb089beffd2bd95adaacbae50aa08e2d72aa1a
5
5
  SHA512:
6
- metadata.gz: b9eb2e3e50717f26d42a862cf25e1a4897e9cae2980f69a1f33f0d9ca6585167630aec771ba03425c21710d13b250dbf688a3170f7fbc1eb67b8ca0d4396c260
7
- data.tar.gz: 992729e551eed93037fae0749370d38c9432cf762034b4b07db13be1012cc492decdfb89127760e17a881eaf081f6e025e8e96b0442173d22437d7b9cd3b8b70
6
+ metadata.gz: f743583ba7756bf02c5026cdf381ba1a3260d0e4383972a801365d37174e0c518e36132635e9ede84b78a0ed5f0d89e9aad369a4f1f4c1d0a56624910decc32d
7
+ data.tar.gz: fd428d18e09e732e0c03f20002f44f1e8e2ad19f79e47cb674e297f4ca091228ae7c27dfd46f48e3e35f7a3ad7b948559bbb2c13cd5f42f74adeab87d74c2705
@@ -119,29 +119,16 @@ module FinApps
119
119
  def post(path, params = {}, &proc)
120
120
  logger.debug "##{__method__.to_s} => Started"
121
121
  raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
122
- response, result, error_messages = nil, nil, nil
122
+ result, error_messages = nil, nil, nil
123
123
 
124
- begin
125
- logger.debug "##{__method__.to_s} => POST path:#{path} params:#{skip_sensitive_data(params)}"
126
- response = @connection.post do |req|
127
- req.url path
128
- req.body = params
129
- end
130
- if response.present? && block_given?
131
- result = proc.call(response)
132
- logger.debug "##{__method__.to_s} => parsed result: #{result.pretty_inspect}" if result.present?
133
- end
134
-
135
- rescue FinApps::REST::Error => error
136
- error_messages = error.error_messages
137
- rescue Faraday::ParsingError => error
138
- error_messages = ['Unable to parse the server response.']
139
- logger.debug "##{__method__.to_s} => Faraday::ParsingError, #{error.to_s}"
140
- rescue Exception => error
141
- error_messages = ['Unexpected error.']
142
- logger.debug "##{__method__.to_s} => Exception, #{error.to_s}"
143
- ensure
144
- logger.debug "##{__method__.to_s} => Failed, error_messages: #{error_messages.pretty_inspect}" if error_messages.present?
124
+ logger.debug "##{__method__.to_s} => POST path:#{path} params:#{skip_sensitive_data(params)}"
125
+ response = @connection.post do |req|
126
+ req.url path
127
+ req.body = params
128
+ end
129
+ if response.present? && block_given?
130
+ result = proc.call(response)
131
+ logger.debug "##{__method__.to_s} => parsed result: #{result.pretty_inspect}" if result.present?
145
132
  end
146
133
 
147
134
  logger.debug "##{__method__.to_s} => Completed"
@@ -21,7 +21,7 @@ module FinApps
21
21
  path = end_point.sub ':site_id', ERB::Util.url_encode(site_id)
22
22
  logger.debug "##{__method__.to_s} => path: #{path}"
23
23
 
24
- user_institution, error_messages = @client.post(path, :parameters => parameters ) do |r|
24
+ user_institution, error_messages = @client.send(path, :post, :parameters => parameters ) do |r|
25
25
  UserInstitution.new(r.body)
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.1.7.pre'
2
+ VERSION = '0.1.8.pre'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7.pre
4
+ version: 0.1.8.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero