finapps 0.0.16.pre → 0.0.17.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: aa639005439864a888416b3908a32f43b6ec5cc6
4
- data.tar.gz: 958aaeaa6f145a24157c07c30d487fde22769de0
3
+ metadata.gz: 47fcc75ca928b988ae5d066eda4e8220517c516d
4
+ data.tar.gz: c06290cc44ae7027033abca8285a5f3023d7b57c
5
5
  SHA512:
6
- metadata.gz: c427efbe3ae15729770c20461bdc26d9b2343024cf826ff690a67a16a0760c3ee537bcd7b3bc1bca25515fd204c19eece4cb154fbb6936fc9dfd688777661a08
7
- data.tar.gz: 53b2b5d71a263baf95cb29272ccf53af716d7a707fd37635eade8c1a34995d1d8629c9a716d62a50d21264666ae766b5dc77882b0e776c00955950baa4958a53
6
+ metadata.gz: 190fb00200d1e600ba1d7f07ee00f9c7c03aa817ee4cbfad811451785055e403b8a737422c4d249d07fa4fccc84ff43fde2abb32cb9002705b9bbff372355070
7
+ data.tar.gz: 0232a0734e5afeb619c29bb2f869744c8bd5c57e446324d8fafc7c8bf46b5214035defb0e6836cdf907b1a1b405affc1a8ed0dd8951ea90469a8ddf36a91eba2
@@ -43,11 +43,14 @@ module FinApps
43
43
  # @return [Hash,Array<String>]
44
44
  def get(path, &proc)
45
45
  logger.debug "##{__method__.to_s} => Started"
46
+ raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
46
47
  response, result, error_messages = nil, nil, nil
47
48
 
48
49
  begin
49
50
  logger.debug "##{__method__.to_s} => GET path:#{path}"
50
- response = @connection.get { |req| req.url path }
51
+ response = @connection.get do |req|
52
+ req.url path
53
+ end
51
54
  if response.present? && block_given?
52
55
  result = proc.call(response)
53
56
  logger.debug "##{__method__.to_s} => parsed result: #{result.pretty_inspect}" if result.present?
@@ -72,6 +75,7 @@ module FinApps
72
75
  # @return [Hash,Array<String>]
73
76
  def post(path, params = {}, &proc)
74
77
  logger.debug "##{__method__.to_s} => Started"
78
+ raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
75
79
  response, result, error_messages = nil, nil, nil
76
80
 
77
81
  begin
@@ -104,6 +108,7 @@ module FinApps
104
108
  # @return [Hash,Array<String>]
105
109
  def delete(path, params = {}, &proc)
106
110
  logger.debug "##{__method__.to_s} => Started"
111
+ raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
107
112
  response, result, error_messages = nil, nil, nil
108
113
 
109
114
  begin
@@ -2,6 +2,7 @@ module FinApps
2
2
  module REST
3
3
 
4
4
  class Institutions < FinApps::REST::Resources
5
+ include FinApps::REST::Defaults
5
6
 
6
7
  # @param [String] term
7
8
  # @return [Array<FinApps::REST::Institution>, Array<String>]
@@ -11,7 +12,7 @@ module FinApps
11
12
  raise MissingArgumentsError.new 'Missing argument: term.' if term.blank?
12
13
  logger.debug "##{__method__.to_s} => term: #{term}"
13
14
 
14
- path = END_POINTS[:institutions_search].sub! ':search_term', term.to_s
15
+ path = Defaults::END_POINTS[:institutions_search].sub! ':search_term', term.to_s
15
16
  logger.debug "##{__method__.to_s} => path: #{path}"
16
17
 
17
18
  institutions, error_messages = @client.get(path) do |r|
@@ -22,7 +23,6 @@ module FinApps
22
23
  return institutions, error_messages
23
24
  end
24
25
 
25
-
26
26
  end
27
27
 
28
28
  class Institution < FinApps::REST::Resource
@@ -3,6 +3,7 @@ module FinApps
3
3
 
4
4
  class Users < FinApps::REST::Resources
5
5
  include FinApps::Logging
6
+ include FinApps::REST::Defaults
6
7
 
7
8
  # @param [Hash] params
8
9
  # @return [FinApps::REST::User, Array<String>]
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.0.16.pre'
2
+ VERSION = '0.0.17.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.0.16.pre
4
+ version: 0.0.17.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero