finapps 0.1.3.pre → 0.1.4.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: 99cd7ddf830a2d8c35a06fef3f9b5c4eabbeca72
4
- data.tar.gz: 9a8642d314bb53aa6cc2da3749c946169c54ca08
3
+ metadata.gz: f3b45b9cc556f59f4224a3d18193fa614486dbca
4
+ data.tar.gz: 08397fe85f3d53571b7d84847f3352889802eca3
5
5
  SHA512:
6
- metadata.gz: d15af3d2f89f0eafce4728b633afb7fd3d04fb08cd0e356126bc126715756e349151ab47473205aa2f652f89d65b50d441bf3656da3557f2c99fa58ad1346433
7
- data.tar.gz: 9ff7c89d5ca32ac09145a7d27510313c3502eb401b0f45826a9ff6e04afa9f46cd20fcbaee86c59d819c17de0cffabd0b3224a32099e799ba2d5803e38d69dab
6
+ metadata.gz: b20f03ac687efb45337efc28d77ce0a03a35e12eaac2c72be5e35448f889cc636122dfa2f6a729c07f91d6ae9b579016137d71e6f9f0836659926d3577f71545
7
+ data.tar.gz: 2862ff57af92a26e9ddb3da191db3d82d9372de61ca53452b29ec9c7ece6360e90173f675edaf1f747b1d3ebd0f38acc83cef9f8287db100a8da0bb5f07e628a
@@ -41,9 +41,13 @@ module FinApps
41
41
  raise FinApps::REST::Error, response_values(env, 'Unexpected error.')
42
42
 
43
43
  else
44
- # 200..206 Success codes
45
- # all good!
46
- logger.debug "##{__method__.to_s} => Status code: [#{env[:status]}]."
44
+ if body.present? && body.kind_of?(String)
45
+ # 200..206 Success codes
46
+ # all good!
47
+ logger.debug "##{__method__.to_s} => Status code: [#{env[:status]}]."
48
+ else
49
+ raise FinApps::REST::InternalServerError, response_values(env, 'Unexpected technical condition was encountered.')
50
+ end
47
51
  end
48
52
 
49
53
  end
@@ -23,7 +23,7 @@ module FinApps
23
23
 
24
24
  def filter_sensitive_header_values(key, value)
25
25
  case key
26
- when 'X-FinApps-Token', 'Basic-Authorization'
26
+ when 'X-FinApps-Token', 'Authorization'
27
27
  '[REDACTED]'
28
28
  else
29
29
  value.inspect
@@ -21,7 +21,13 @@ 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 ) { |r| UserInstitution.new(r.body) }
24
+ user_institution, error_messages = @client.post(path, :parameters => parameters ) do |r|
25
+ if r.body.present?
26
+ UserInstitution.new(r.body)
27
+ else
28
+ raise InternalServerError.new 'Unable to parse response.'
29
+ end
30
+ end
25
31
 
26
32
  logger.debug "##{__method__.to_s} => Completed"
27
33
  return user_institution, error_messages
@@ -30,7 +36,7 @@ module FinApps
30
36
  end
31
37
 
32
38
  class UserInstitution < FinApps::REST::Resource
33
- attr_accessor :_id, :account_id, :user_public_id, :institution_name, :status, :status_message
39
+ attr_accessor :_id, :account_id, :user_public_id, :institution_name, :status, :status_message, :last_refreshed
34
40
  end
35
41
 
36
42
  end
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.1.3.pre'
2
+ VERSION = '0.1.4.pre'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.pre
4
+ version: 0.1.4.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-23 00:00:00.000000000 Z
11
+ date: 2014-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor