finapps_core 3.0.6 → 4.0.0

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
  SHA256:
3
- metadata.gz: dc265faba0f375f0f83fe357fdcdadfb5499f1311015039160715523f3463a92
4
- data.tar.gz: e06536b9eb01a627340f862f6592dade9acf5cfd2482ac707851306d7ff71b7e
3
+ metadata.gz: 96d7a4d630928d28cae45e1aa056d384f3ea1eb3a68c0d609f4d41ab8f099aa5
4
+ data.tar.gz: 1b076ce2d77fe18607eff40229b1247572bcbc46e4f14f2d56a42a055a5885f6
5
5
  SHA512:
6
- metadata.gz: becdd0c64ab55bfc3bbd1b272452979db7012765df96d052e9fc3e06496077f1cb13b7e639242149d10f1b228d3d7e4d35fe3f014c945cc3e96dc252811804ff
7
- data.tar.gz: a461eee345e25dc09c843584f1f2a068f803c6be5ff9f0a960c2696e3009b2baf1c1e6bb01e43cfdaa89084ea25d1b3877d8d5f273b032a385be50979ac89874
6
+ metadata.gz: 62466071fddf710839f9b731831d8c063bc96fd2c55592694d4b79a97ad0b7f4af8ee883771c82f19bfae9de87eb7b175febdd3f0522e07ea0e0c729ab6b4e17
7
+ data.tar.gz: 21ac2a4503f836043123380eee90510a308b36fdf414499a48b6b39d890db651d13e619dcebde0f1c29bb8a4b66edfe523c250bd0daf279fb938cb225fa95be7
data/.rubocop.yml CHANGED
@@ -14,10 +14,10 @@ AllCops:
14
14
  Metrics/LineLength:
15
15
  Max: 120
16
16
 
17
- # No space makes the method definition shorter and differentiates
18
- # from a regular assignment.
19
- Layout/SpaceAroundEqualsInParameterDefault:
20
- EnforcedStyle: no_space
17
+ # Re-enable this when the following is resolved:
18
+ # https://github.com/rubocop-hq/rubocop/issues/5953
19
+ Style/AccessModifierDeclarations:
20
+ Enabled: false
21
21
 
22
22
  Layout/SpaceInsideBlockBraces:
23
23
  # The space here provides no real gain in readability while consuming
@@ -25,12 +25,6 @@ Layout/SpaceInsideBlockBraces:
25
25
  # Also {| differentiates better from a hash than { | does.
26
26
  SpaceBeforeBlockParameters: false
27
27
 
28
- # No trailing space differentiates better from the block:
29
- # foo} means hash, foo } means block.
30
- Layout/SpaceInsideHashLiteralBraces:
31
- EnforcedStyle: no_space
32
-
33
-
34
28
  Style/CollectionMethods:
35
29
  Description: Preferred collection methods.
36
30
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
@@ -41,47 +35,10 @@ Style/CollectionMethods:
41
35
  find: detect
42
36
  find_all: select
43
37
  reduce: inject
44
- Layout/DotPosition:
45
- Description: Checks the position of the dot in multi-line method calls.
46
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
47
- Enabled: true
48
- EnforcedStyle: leading
49
- SupportedStyles:
50
- - leading
51
- - trailing
52
- Style/FileName:
53
- Description: Use snake_case for source file names.
54
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
55
- Enabled: false
56
- Exclude: []
57
- Style/GuardClause:
58
- Description: Check for conditionals that can be replaced with guard clauses
59
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
60
- Enabled: false
61
- MinBodyLength: 1
62
- Style/IfUnlessModifier:
63
- Description: Favor modifier if/unless usage when you have a single-line body.
64
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
65
- Enabled: false
66
- MaxLineLength: 80
67
38
  Style/OptionHash:
68
39
  Description: Don't use option hashes when you can use keyword arguments.
69
40
  Enabled: false
70
- Style/PercentLiteralDelimiters:
71
- Description: Use `%`-literal delimiters consistently
72
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
73
- Enabled: false
74
- PreferredDelimiters:
75
- "%": "()"
76
- "%i": "()"
77
- "%q": "()"
78
- "%Q": "()"
79
- "%r": "{}"
80
- "%s": "()"
81
- "%w": "()"
82
- "%W": "()"
83
- "%x": "()"
84
- Style/PredicateName:
41
+ Naming/PredicateName:
85
42
  Description: Check the names of predicate methods.
86
43
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
87
44
  Enabled: true
@@ -93,55 +50,6 @@ Style/PredicateName:
93
50
  - is_
94
51
  Exclude:
95
52
  - spec/**/*
96
- Style/RaiseArgs:
97
- Description: Checks the arguments passed to raise/fail.
98
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
99
- Enabled: false
100
- EnforcedStyle: exploded
101
- SupportedStyles:
102
- - compact
103
- - exploded
104
- Style/SignalException:
105
- Description: Checks for proper usage of fail and raise.
106
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
107
- Enabled: false
108
- EnforcedStyle: semantic
109
- SupportedStyles:
110
- - only_raise
111
- - only_fail
112
- - semantic
113
- Style/SingleLineBlockParams:
114
- Description: Enforces the names of some block params.
115
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
116
- Enabled: false
117
- Methods:
118
- - reduce:
119
- - a
120
- - e
121
- - inject:
122
- - a
123
- - e
124
- Style/SingleLineMethods:
125
- Description: Avoid single-line methods.
126
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
127
- Enabled: false
128
- AllowIfMethodIsEmpty: true
129
- Style/StringLiterals:
130
- Description: Checks if uses of quotes match the configured preference.
131
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
132
- Enabled: true
133
- EnforcedStyle: single_quotes
134
- SupportedStyles:
135
- - single_quotes
136
- - double_quotes
137
- Style/StringLiteralsInInterpolation:
138
- Description: Checks if uses of quotes inside expressions in interpolated strings
139
- match the configured preference.
140
- Enabled: true
141
- EnforcedStyle: single_quotes
142
- SupportedStyles:
143
- - single_quotes
144
- - double_quotes
145
53
  Metrics/AbcSize:
146
54
  Description: A calculated magnitude based on number of assignments, branches, and
147
55
  conditions.
@@ -181,75 +89,19 @@ Metrics/PerceivedComplexity:
181
89
  reader.
182
90
  Enabled: false
183
91
  Max: 7
184
- Lint/AssignmentInCondition:
185
- Description: Don't use assignment in conditions.
186
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
187
- Enabled: false
188
- AllowSafeAssignment: true
189
- Style/InlineComment:
190
- Description: Avoid inline comments.
191
- Enabled: false
192
- Style/AccessorMethodName:
193
- Description: Check the naming of accessor methods for get_/set_.
194
- Enabled: false
195
- Style/Alias:
196
- Description: Use alias_method instead of alias.
197
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
198
- Enabled: false
199
92
  Style/Documentation:
200
93
  Description: Document classes and non-namespace modules.
201
94
  Enabled: false
202
- Style/DoubleNegation:
203
- Description: Checks for uses of double negation (!!).
204
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
205
- Enabled: false
206
- Style/EachWithObject:
207
- Description: Prefer `each_with_object` over `inject` or `reduce`.
208
- Enabled: false
209
95
  Style/EmptyLiteral:
210
96
  Description: Prefer literals to Array.new/Hash.new/String.new.
211
97
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
212
98
  Enabled: false
213
- Style/ModuleFunction:
214
- Description: Checks for usage of `extend self` in modules.
215
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
216
- Enabled: false
217
- Style/OneLineConditional:
218
- Description: Favor the ternary operator(?:) over if/then/else/end constructs.
219
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
220
- Enabled: false
221
- Style/PerlBackrefs:
222
- Description: Avoid Perl-style regex back references.
223
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
224
- Enabled: false
225
- Style/Send:
226
- Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
227
- may overlap with existing methods.
228
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
229
- Enabled: false
230
- Style/SpecialGlobalVars:
231
- Description: Avoid Perl-style global variables.
232
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
233
- Enabled: false
234
99
  Style/VariableInterpolation:
235
100
  Description: Don't interpolate global, instance and class variables directly in
236
101
  strings.
237
102
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
238
103
  Enabled: false
239
- Style/WhenThen:
240
- Description: Use when x then ... for one-line cases.
241
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
242
- Enabled: false
243
- Lint/EachWithObjectArgument:
244
- Description: Check for immutable argument given to each_with_object.
245
- Enabled: true
246
104
  Lint/HandleExceptions:
247
105
  Description: Don't suppress exception.
248
106
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
249
107
  Enabled: false
250
- Lint/LiteralInCondition:
251
- Description: Checks of literals used in conditions.
252
- Enabled: false
253
- Lint/LiteralInInterpolation:
254
- Description: Checks for literals used in interpolation.
255
- Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.4.2
1
+ ruby-2.5.1
data/.travis.yml CHANGED
@@ -1,11 +1,12 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
- - 2.4.2
4
+ - 2.5.1
5
5
  before_install:
6
6
  - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
7
7
  - gem update --system
8
8
  - gem --version
9
+ - gem install bundler
9
10
  script:
10
11
  - bundle exec rspec
11
12
  notifications:
data/finapps_core.gemspec CHANGED
@@ -20,20 +20,19 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = Dir['spec/**/*.rb']
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_runtime_dependency 'faraday', '0.13.1'
23
+ spec.add_runtime_dependency 'faraday', '~> 0.15', '>= 0.15.3'
24
24
  spec.add_runtime_dependency 'faraday_middleware', '~> 0.12', '>= 0.12.2'
25
- spec.add_runtime_dependency 'rash_alt', '~> 0.4', '>= 0.4.3'
26
- spec.add_runtime_dependency 'typhoeus', '~> 1.3', '>= 1.3.0'
25
+ spec.add_runtime_dependency 'rash_alt', '~> 0.4', '>= 0.4.7'
27
26
 
28
- spec.add_development_dependency 'bundler', '~> 1.15', '>= 1.15.4'
29
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.8'
30
- spec.add_development_dependency 'gem-release', '~> 0.7', '>= 0.7.4'
31
- spec.add_development_dependency 'rake', '~> 12.1', '>= 12.1.0'
32
- spec.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
33
- spec.add_development_dependency 'rubocop', '~> 0.49.1'
34
- spec.add_development_dependency 'sinatra', '~> 2.0', '>= 2.0.0'
35
- spec.add_development_dependency 'webmock', '~> 3.0', '>= 3.0.1'
27
+ spec.add_development_dependency 'bundler', '~> 1.16', '>= 1.16.6'
28
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.9'
29
+ spec.add_development_dependency 'gem-release', '~> 2.0', '>= 2.0.1'
30
+ spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.1'
31
+ spec.add_development_dependency 'rspec', '~> 3.8', '>= 3.8.0'
32
+ spec.add_development_dependency 'rubocop', '~> 0.59', '>= 0.59.2'
33
+ spec.add_development_dependency 'sinatra', '~> 2.0', '>= 2.0.4'
34
+ spec.add_development_dependency 'webmock', '~> 3.4', '>= 3.4.2'
36
35
 
37
36
  spec.extra_rdoc_files = %w(README.md LICENSE)
38
37
  spec.rdoc_options = %w(--line-numbers --inline-source --title finapps-ruby-core --main README.md)
39
- end
38
+ end
@@ -4,7 +4,7 @@ module ObjectExtensions
4
4
  refine Object do
5
5
  def integer?
6
6
  Integer(self)
7
- rescue
7
+ rescue StandardError
8
8
  false
9
9
  end
10
10
  end
data/lib/finapps_core.rb CHANGED
@@ -4,8 +4,6 @@ require 'finapps_core/version' unless defined?(FinAppsCore::VERSION)
4
4
 
5
5
  require 'faraday'
6
6
  require 'faraday_middleware'
7
- require 'typhoeus'
8
- require 'typhoeus/adapters/faraday'
9
7
 
10
8
  require 'core_extensions/object/is_integer'
11
9
  require 'core_extensions/string/json_to_hash'
@@ -20,8 +20,8 @@ module FinAppsCore # :nodoc:
20
20
  # Raised whenever the connection fails.
21
21
  class ConnectionFailedError < Error; end
22
22
 
23
- %i(InvalidArgumentsError MissingArgumentsError ApiSessionTimeoutError
24
- UnsupportedHttpMethodError ConnectionFailedError).each do |const|
23
+ %i[InvalidArgumentsError MissingArgumentsError ApiSessionTimeoutError
24
+ UnsupportedHttpMethodError ConnectionFailedError].each do |const|
25
25
  Error.const_set(const, FinAppsCore.const_get(const))
26
26
  end
27
27
  end
@@ -4,56 +4,26 @@ require 'logger'
4
4
 
5
5
  module FinAppsCore
6
6
  module Middleware
7
- class CustomLogger < Faraday::Response::Middleware
8
- extend Forwardable
7
+ class CustomLogger < Faraday::Response::Logger
9
8
  include FinAppsCore::Utils::ParameterFilter
10
9
 
11
- DEFAULT_OPTIONS = {bodies: false}.freeze
12
-
13
- def initialize(app, logger=nil, options={})
14
- super(app)
15
- @logger = logger || new_logger
16
- @options = DEFAULT_OPTIONS.merge(options)
17
- end
18
-
19
- def_delegators :@logger, :debug
10
+ private
20
11
 
21
- def call(env)
22
- debug "#{self.class.name}##{__method__} => URL: #{env.method.upcase} #{env.url}"
23
- debug "#{self.class.name}##{__method__} => Request Headers: #{dump env.request_headers}"
24
- if env[:body] && log_body?(:request)
25
- debug "#{self.class.name}##{__method__} => Request Response: #{dump env[:body]}"
26
- end
27
- super
12
+ def dump_headers(headers)
13
+ dump headers
28
14
  end
29
15
 
30
- def on_complete(env)
31
- debug "#{self.class.name}##{__method__} => Response Headers: #{dump env.response_headers}"
32
- if env.body && log_body?(:response)
33
- debug "#{self.class.name}##{__method__} => Response Body: #{dump env.body}"
34
- end
16
+ def dump_body(body)
17
+ dump body
35
18
  end
36
19
 
37
- private
38
-
39
20
  def dump(value)
40
- s = skip_sensitive_data(value.is_a?(Array) ? value.to_h : value)
41
- s.nil? ? 'NO-CONTENT' : s.to_json
42
- end
43
-
44
- def log_body?(type)
45
- case @options[:bodies]
46
- when Hash then
47
- @options[:bodies][type]
48
- else
49
- @options[:bodies]
50
- end
21
+ s = skip_sensitive_data value
22
+ s.respond_to?(:to_json) ? s.to_json : s
51
23
  end
52
24
 
53
- def new_logger
54
- logger = Logger.new(STDOUT)
55
- logger.level = FinAppsCore::REST::Defaults::DEFAULTS[:log_level]
56
- logger
25
+ def apply_filters(value)
26
+ value
57
27
  end
58
28
  end
59
29
  end
@@ -14,12 +14,13 @@ module FinAppsCore
14
14
  return if SUCCESS_STATUSES.include?(env[:status])
15
15
 
16
16
  if env[:status] == API_SESSION_TIMEOUT
17
- raise(FinAppsCore::Error::ApiSessionTimeoutError, 'Api Session Timed out')
18
- elsif env[:status] == CONNECTION_FAILED_STATUS
17
+ raise(FinAppsCore::Error::ApiSessionTimeoutError, 'API Session Timed out')
18
+ end
19
+ if env[:status] == CONNECTION_FAILED_STATUS
19
20
  raise(FinAppsCore::Error::ConnectionFailedError, 'Connection Failed')
20
- else
21
- raise(Faraday::Error::ClientError, response_values(env))
22
21
  end
22
+
23
+ raise(Faraday::Error::ClientError, response_values(env))
23
24
  end
24
25
 
25
26
  def response_values(env)
@@ -35,22 +36,25 @@ module FinAppsCore
35
36
 
36
37
  def error_messages(body)
37
38
  return nil if empty?(body)
39
+
38
40
  hash = to_hash body
39
41
  messages hash
40
42
  end
41
43
 
42
44
  def messages(hash)
43
45
  return nil unless hash.respond_to?(:key?) && hash.key?('messages')
46
+
44
47
  hash['messages']
45
48
  end
46
49
 
47
50
  def to_hash(source)
48
51
  return source unless source.is_a?(String)
52
+
49
53
  source.json_to_hash
50
54
  end
51
55
 
52
- def empty?(o)
53
- o.nil? || (o.respond_to?(:empty?) && o.empty?)
56
+ def empty?(obj)
57
+ obj.nil? || (obj.respond_to?(:empty?) && obj.empty?)
54
58
  end
55
59
  end
56
60
  end
@@ -18,7 +18,7 @@ module FinAppsCore
18
18
 
19
19
  attr_reader :config
20
20
 
21
- def initialize(options, logger=nil)
21
+ def initialize(options, logger = nil)
22
22
  @config = ::FinAppsCore::REST::Configuration.new options
23
23
  @logger = logger
24
24
  end
@@ -38,7 +38,7 @@ module FinAppsCore
38
38
  # @param [String] method
39
39
  # @param [Hash] params
40
40
  # @return [Hash,Array<String>]
41
- def send_request(path, method, params={})
41
+ def send_request(path, method, params = {})
42
42
  not_blank(path, :path)
43
43
  not_blank(method, :method)
44
44
 
@@ -56,22 +56,26 @@ module FinAppsCore
56
56
  # Returns a hash obtained from parsing the JSON object in the response body.
57
57
  #
58
58
  def method_missing(method_id, *arguments, &block)
59
- if %i(get post put delete).include? method_id
60
- connection.send(method_id) do |req|
61
- req.url arguments.first
62
- req.body = arguments[1] unless method_id == :get
63
- end
59
+ if %i[get post put delete].include? method_id
60
+ send_to_connection method_id, arguments
64
61
  else
65
62
  super
66
63
  end
67
64
  end
68
65
 
69
- def respond_to_missing?(method_sym, include_private=false)
70
- %i(get post put delete).include?(method_sym) ? true : super
66
+ def respond_to_missing?(method_sym, include_private = false)
67
+ %i[get post put delete].include?(method_sym) ? true : super
71
68
  end
72
69
 
73
70
  private
74
71
 
72
+ def send_to_connection(method_id, arguments)
73
+ connection.send(method_id) do |req|
74
+ req.url arguments.first
75
+ req.body = arguments[1] unless method_id == :get
76
+ end
77
+ end
78
+
75
79
  def empty?(response)
76
80
  !response || empty_body?(response)
77
81
  end
@@ -119,7 +123,7 @@ module FinAppsCore
119
123
  when :delete
120
124
  delete(path, params)
121
125
  else
122
- raise FinAppsCore::UnsupportedHttpMethodError.new "Method not supported: #{method}."
126
+ raise FinAppsCore::UnsupportedHttpMethodError, "Method not supported: #{method}."
123
127
  end
124
128
  end
125
129
  end
@@ -10,12 +10,12 @@ module FinAppsCore
10
10
  :host, :proxy, :timeout, :retry_limit, :rashify,
11
11
  :log_level, :request_id
12
12
 
13
- def initialize(options={})
13
+ def initialize(options = {})
14
14
  FinAppsCore::REST::Defaults::DEFAULTS.merge(remove_empty_options(options))
15
15
  .each {|key, value| public_send("#{key}=", value) }
16
16
 
17
- raise FinAppsCore::InvalidArgumentsError.new "Invalid argument. {host: #{host}}" unless valid_host?
18
- raise FinAppsCore::InvalidArgumentsError.new "Invalid argument. {timeout: #{timeout}}" unless timeout.integer?
17
+ raise FinAppsCore::InvalidArgumentsError, "Invalid argument. {host: #{host}}" unless valid_host?
18
+ raise FinAppsCore::InvalidArgumentsError, "Invalid argument. {timeout: #{timeout}}" unless timeout.integer?
19
19
  end
20
20
 
21
21
  def valid_user_credentials?
@@ -5,33 +5,41 @@ module FinAppsCore
5
5
  module Connection # :nodoc:
6
6
  # @return [Faraday::Connection]
7
7
  def faraday(config, logger)
8
- options = {
9
- url: "#{config.host}/v#{Defaults::API_VERSION}/",
10
- request: {open_timeout: config.timeout,
11
- timeout: config.timeout}
12
- }
8
+ options = connection_options config
13
9
 
14
10
  Faraday.new(options) do |conn|
15
11
  conn.request :accept_json
16
12
  conn.request :user_agent
17
- conn.request :tenant_authentication, config.tenant_token unless config.valid_user_credentials?
13
+ if config.valid_user_credentials?
14
+ conn.request :no_encoding_basic_authentication, config.user_token
15
+ else
16
+ conn.request :tenant_authentication, config.tenant_token
17
+ end
18
18
  conn.request :json
19
19
  conn.request :retry
20
20
  conn.request :multipart
21
21
  conn.request :url_encoded
22
- conn.request :no_encoding_basic_authentication, config.user_token if config.valid_user_credentials?
23
22
  conn.request :request_id, config.request_id if config.request_id
24
23
 
25
24
  conn.use FinAppsCore::Middleware::RaiseError
26
25
  conn.response :rashify if config.rashify
27
26
  conn.response :json, content_type: /\bjson$/
28
- conn.response :custom_logger, logger, bodies: (ENV['SILENT_LOG_BODIES'] != 'true')
27
+ conn.response :custom_logger, logger, bodies: true
29
28
 
30
29
  # Adapter (ensure that the adapter is always last.)
31
- conn.adapter :typhoeus
30
+ conn.adapter Faraday.default_adapter
32
31
  end
33
32
  end
34
- module_function :faraday # becomes available as a *private instance method* to classes that mix in the module
33
+ module_function :faraday
34
+
35
+ def connection_options(config)
36
+ {
37
+ url: "#{config.host}/v#{Defaults::API_VERSION}/",
38
+ request: { open_timeout: config.timeout,
39
+ timeout: config.timeout }
40
+ }
41
+ end
42
+ module_function :connection_options
35
43
  end
36
44
  end
37
45
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'logger'
4
+
3
5
  module FinAppsCore
4
6
  module REST
5
7
  module Defaults
@@ -10,7 +12,6 @@ module FinAppsCore
10
12
  host: 'https://api.financialapps.com',
11
13
  timeout: 30,
12
14
  proxy: nil,
13
- retry_limit: 1,
14
15
  log_level: Logger::INFO
15
16
  }.freeze
16
17
  end
@@ -22,24 +22,24 @@ module FinAppsCore
22
22
  @logger = client.logger if client.respond_to?(:logger)
23
23
  end
24
24
 
25
- def list(path=nil)
25
+ def list(path = nil)
26
26
  path = end_point.to_s if path.nil?
27
27
  send_request path, :get
28
28
  end
29
29
 
30
- def show(id=nil, path=nil)
30
+ def show(id = nil, path = nil)
31
31
  send_request_for_id path, :get, id
32
32
  end
33
33
 
34
- def create(params={}, path=nil)
34
+ def create(params = {}, path = nil)
35
35
  send_request path, :post, params
36
36
  end
37
37
 
38
- def update(params={}, path=nil)
38
+ def update(params = {}, path = nil)
39
39
  send_request path, :put, params
40
40
  end
41
41
 
42
- def destroy(id=nil, path=nil)
42
+ def destroy(id = nil, path = nil)
43
43
  send_request_for_id path, :delete, id
44
44
  end
45
45
 
@@ -61,7 +61,7 @@ module FinAppsCore
61
61
  "#{end_point}/#{ERB::Util.url_encode(id)}"
62
62
  end
63
63
 
64
- def send_request(path, method, params={})
64
+ def send_request(path, method, params = {})
65
65
  path = end_point if path.nil?
66
66
  logger.debug "#{self.class.name}##{__method__} => path: #{path} params: #{skip_sensitive_data(params)}"
67
67
 
@@ -3,31 +3,48 @@
3
3
  module FinAppsCore
4
4
  module Utils
5
5
  module ParameterFilter
6
+ include ::FinAppsCore::Utils::Loggeable
6
7
  using StringExtensions
7
- PROTECTED_KEYS = %w(login login1 username password password1 password_confirm token
8
- x-tenant-token authorization routing_no account_no tpr_id).freeze
8
+ PROTECTED_KEYS = %w[login login1 username password password1 password_confirm token
9
+ x-tenant-token authorization routing_no account_no tpr_id].freeze
9
10
 
10
- def skip_sensitive_data(hash)
11
- if hash.is_a? String
12
- hash = hash.json_to_hash
13
- end
11
+ def skip_sensitive_data(param)
12
+ hash = param_to_hash param
14
13
  if hash.is_a? Hash
15
- filtered_hash = hash.clone
16
- filtered_hash.each do |key, value|
17
- if PROTECTED_KEYS.include? key.to_s.downcase
18
- filtered_hash[key] = '[REDACTED]'
19
- elsif value.is_a?(Hash)
20
- filtered_hash[key] = skip_sensitive_data(value)
21
- elsif value.is_a?(Array)
22
- filtered_hash[key] = value.map {|v| v.is_a?(Hash) ? skip_sensitive_data(v) : v }
23
- end
24
- end
25
-
26
- filtered_hash
14
+ clone_and_redact hash
15
+ else
16
+ replace_nil hash
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def param_to_hash(param)
23
+ param.is_a?(String) ? param.json_to_hash : param
24
+ end
25
+
26
+ def clone_and_redact(hash)
27
+ redact_each hash.clone
28
+ end
29
+
30
+ def redact_each(hash)
31
+ hash.each {|key, value| hash[key] = redact(key, value) }
32
+ hash
33
+ end
34
+
35
+ def redact(key, value)
36
+ if PROTECTED_KEYS.include? key.to_s.downcase
37
+ '[REDACTED]'
38
+ elsif value.is_a? Hash
39
+ redact_each value
27
40
  else
28
- hash
41
+ replace_nil value
29
42
  end
30
43
  end
44
+
45
+ def replace_nil(value)
46
+ value || 'NO-CONTENT'
47
+ end
31
48
  end
32
49
  end
33
50
  end
@@ -7,15 +7,12 @@ module FinAppsCore
7
7
  module Utils
8
8
  # Adds validation capabilities when included into other classes
9
9
  module Validatable
10
- def not_blank(value, name=nil)
11
- if nil_or_empty?(value)
12
- argument_name = name.nil? ? nil : ": #{name}"
13
- raise FinAppsCore::MissingArgumentsError.new "Missing argument#{argument_name}"
14
- end
10
+ def not_blank(value, name = nil)
11
+ raise FinAppsCore::MissingArgumentsError, name.nil? ? nil : ": #{name}" if nil_or_empty?(value)
15
12
  end
16
13
 
17
14
  def nil_or_empty?(value)
18
- !value || (value.respond_to?(:empty?) && value.empty?)
15
+ !value || value.respond_to?(:empty?) && value.empty?
19
16
  end
20
17
  end
21
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinAppsCore
4
- VERSION = '3.0.6'
4
+ VERSION = '4.0.1'
5
5
  end
@@ -6,7 +6,7 @@ RSpec.describe ObjectExtensions do
6
6
 
7
7
  describe '#integer?' do
8
8
  context 'for integers' do
9
- subject { 1 + rand(10) }
9
+ subject { rand(1..10) }
10
10
  it { expect(subject.integer?).to eq(true) }
11
11
  end
12
12
  context 'for non integers' do
@@ -4,7 +4,7 @@ RSpec.describe FinAppsCore::Middleware::AcceptJson do
4
4
  let(:fake_app) { proc {|env| env } }
5
5
  describe '#call' do
6
6
  subject { FinAppsCore::Middleware::AcceptJson.new(fake_app) }
7
- env = {request_headers: {}}
7
+ env = { request_headers: {} }
8
8
 
9
9
  it('generates a UserAgent header') do
10
10
  expect(subject.call(env)[:request_headers][FinAppsCore::Middleware::AcceptJson::KEY]).to eq('application/json')
@@ -8,17 +8,17 @@ RSpec.describe FinAppsCore::Middleware::NoEncodingBasicAuthentication do
8
8
 
9
9
  context 'when credentials were provided' do
10
10
  let(:middleware) { FinAppsCore::Middleware::NoEncodingBasicAuthentication.new(app, :token) }
11
- let(:expected_header_value) { "Bearer #{:token}" }
11
+ let(:expected_header_value) { 'Bearer token' }
12
12
 
13
13
  context 'when header was not previously set' do
14
- let(:request_env) { {request_headers: {}} }
14
+ let(:request_env) { { request_headers: {} } }
15
15
  subject(:result) { middleware.call(request_env) }
16
16
 
17
17
  it('generates a header') { expect(result[:request_headers][key]).to eq(expected_header_value) }
18
18
  end
19
19
 
20
20
  context 'when header was previously set' do
21
- let(:request_env) { {request_headers: {key => 'foo'}} }
21
+ let(:request_env) { { request_headers: { key => 'foo' } } }
22
22
  subject(:result) { middleware.call(request_env) }
23
23
 
24
24
  it('does not override existing header') { expect(result[:request_headers][key]).to eq('foo') }
@@ -4,7 +4,7 @@ RSpec.describe FinAppsCore::Middleware::RequestId do
4
4
  let(:key) { FinAppsCore::Middleware::RequestId::KEY }
5
5
  let(:id) { 'request_id' }
6
6
  let(:fake_app) { proc {|env| env } }
7
- let(:env) { {request_headers: {}} }
7
+ let(:env) { { request_headers: {} } }
8
8
 
9
9
  describe '#call' do
10
10
  subject { FinAppsCore::Middleware::RequestId.new(fake_app, id) }
@@ -12,15 +12,15 @@ RSpec.describe FinAppsCore::Middleware::TenantAuthentication do
12
12
  let(:expected_header) { valid_tenant_options[:token] }
13
13
 
14
14
  context 'when header was not previously set' do
15
- let(:request_env) { {request_headers: {}} }
15
+ let(:request_env) { { request_headers: {} } }
16
16
  subject(:actual_header) { middleware.call(request_env)[:request_headers][key] }
17
17
 
18
18
  it('generates a Tenant Authentication header') { expect(actual_header).to eq(expected_header) }
19
19
  end
20
20
 
21
21
  context 'when header was previously set' do
22
- let(:existing_header) { {FinAppsCore::Middleware::TenantAuthentication::KEY => 'foo'} }
23
- let(:request_env) { {request_headers: existing_header} }
22
+ let(:existing_header) { { FinAppsCore::Middleware::TenantAuthentication::KEY => 'foo' } }
23
+ let(:request_env) { { request_headers: existing_header } }
24
24
  subject(:actual_header) { middleware.call(request_env)[:request_headers][key] }
25
25
 
26
26
  it('does not override existing Tenant Authentication header') { expect(actual_header).to eq('foo') }
@@ -4,7 +4,7 @@ RSpec.describe FinAppsCore::Middleware::UserAgent do
4
4
  let(:fake_app) { proc {|env| env } }
5
5
  describe '#call' do
6
6
  subject { FinAppsCore::Middleware::UserAgent.new(fake_app) }
7
- env = {request_headers: {}}
7
+ env = { request_headers: {} }
8
8
 
9
9
  it('generates a UserAgent header') do
10
10
  expect(subject.call(env)[:request_headers][FinAppsCore::Middleware::UserAgent::KEY]).to start_with('finapps-ruby')
@@ -23,7 +23,7 @@ RSpec.describe FinAppsCore::Middleware::RaiseError do
23
23
  end
24
24
  context 'for connection failed error' do
25
25
  let(:env) { Env.new(419) }
26
- error_message = 'Api Session Timed out'
26
+ error_message = 'API Session Timed out'
27
27
  it { expect { subject.on_complete(env) }.to raise_error(FinAppsCore::ApiSessionTimeoutError, error_message) }
28
28
  end
29
29
  end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe FinAppsCore::REST::BaseClient do
4
- let(:valid_tenant_options) { {tenant_token: VALID_CREDENTIALS[:token]} }
4
+ let(:valid_tenant_options) { { tenant_token: VALID_CREDENTIALS[:token] } }
5
5
  subject { FinAppsCore::REST::BaseClient.new(valid_tenant_options) }
6
6
 
7
7
  RESPONSE = 0
8
8
  ERROR_MESSAGES = 1
9
- let(:return_array) { %i(RESPONSE ERROR_MESSAGES) }
9
+ let(:return_array) { %i[RESPONSE ERROR_MESSAGES] }
10
10
 
11
11
  describe '#new' do
12
12
  it 'assigns @config' do
@@ -34,17 +34,17 @@ RSpec.describe FinAppsCore::REST::BaseClient do
34
34
 
35
35
  it 'should raise FinAppsCore::MissingArgumentsError if method is NOT provided' do
36
36
  expect { subject.send_request(nil, :get) }.to raise_error(FinAppsCore::MissingArgumentsError,
37
- 'Missing argument: path')
37
+ ': path')
38
38
  end
39
39
 
40
40
  it 'should raise FinAppsCore::MissingArgumentsError if path is NOT provided' do
41
41
  expect { subject.send_request('fake_path', nil) }.to raise_error(FinAppsCore::MissingArgumentsError,
42
- 'Missing argument: method')
42
+ ': method')
43
43
  end
44
44
 
45
45
  context 'when method and path are provided' do
46
46
  subject { FinAppsCore::REST::BaseClient.new(valid_tenant_options).send_request('relevance/ruleset/names', :get) }
47
- let(:return_array) { %i(RESPONSE ERROR_MESSAGES) }
47
+ let(:return_array) { %i[RESPONSE ERROR_MESSAGES] }
48
48
 
49
49
  it('returns an array of 2 items') do
50
50
  expect(subject).to be_a(Array)
@@ -89,7 +89,7 @@ RSpec.describe FinAppsCore::REST::BaseClient do
89
89
 
90
90
  describe '#respond_to_missing?' do
91
91
  context 'for supported methods' do
92
- %i(get post put delete).each do |method|
92
+ %i[get post put delete].each do |method|
93
93
  it("responds to #{method}") { expect(subject).to respond_to(method) }
94
94
  end
95
95
  end
@@ -12,7 +12,6 @@ RSpec.describe FinAppsCore::REST::Defaults do
12
12
  it('sets DEFAULTS[:host]') { expect(described_class::DEFAULTS[:host]).to eq 'https://api.financialapps.com' }
13
13
  it('sets DEFAULTS[:timeout]') { expect(described_class::DEFAULTS[:timeout]).to eq 30 }
14
14
  it('does not set DEFAULTS[:proxy]') { expect(described_class::DEFAULTS[:proxy]).to be_nil }
15
- it('sets DEFAULTS[:retry_limit]') { expect(described_class::DEFAULTS[:retry_limit]).to eq 1 }
16
15
  it('sets DEFAULTS[:log_level]') { expect(described_class::DEFAULTS[:log_level]).to eq Logger::INFO }
17
16
  end
18
17
  end
data/spec/spec_helper.rb CHANGED
@@ -36,5 +36,5 @@ RSpec.configure do |config|
36
36
  WebMock.disable_net_connect!(allow: 'codeclimate.com')
37
37
  end
38
38
 
39
- VALID_CREDENTIALS = {identifier: '49fb918d-7e71-44dd-7378-58f19606df2a',
40
- token: 'hohoho='}.freeze
39
+ VALID_CREDENTIALS = { identifier: '49fb918d-7e71-44dd-7378-58f19606df2a',
40
+ token: 'hohoho=' }.freeze
@@ -15,8 +15,10 @@ RSpec.describe FinAppsCore::Utils::ParameterFilter do
15
15
  login: 'sammysosa',
16
16
  username: 'johnny',
17
17
  name: 'george',
18
- routing_no: '2316151651',
19
- account_no: '987984654',
18
+ account: {
19
+ routing_no: '2316151651',
20
+ account_no: '987984654'
21
+ },
20
22
  tpr_id: 'asdfasdf5465w1e65r4we654r',
21
23
  'x-tenant-token': '498798465132154987498'
22
24
  }
@@ -29,8 +31,10 @@ RSpec.describe FinAppsCore::Utils::ParameterFilter do
29
31
  login: '[REDACTED]',
30
32
  username: '[REDACTED]',
31
33
  name: 'george',
32
- routing_no: '[REDACTED]',
33
- account_no: '[REDACTED]',
34
+ account: {
35
+ routing_no: '[REDACTED]',
36
+ account_no: '[REDACTED]'
37
+ },
34
38
  tpr_id: '[REDACTED]',
35
39
  'x-tenant-token': '[REDACTED]'
36
40
  }
@@ -8,13 +8,12 @@ RSpec.describe FinAppsCore::Utils::Validatable do
8
8
  describe '#not_blank' do
9
9
  context 'for null values' do
10
10
  it 'should raise FinAppsCore::MissingArgumentsError' do
11
- expect { FakeClass.new.not_blank(nil) }.to raise_error(FinAppsCore::MissingArgumentsError,
12
- 'Missing argument')
11
+ expect { FakeClass.new.not_blank(nil) }.to raise_error(FinAppsCore::MissingArgumentsError)
13
12
  end
14
13
 
15
14
  it 'should describe the argument name when provided' do
16
15
  expect { FakeClass.new.not_blank(nil, :name) }.to raise_error(FinAppsCore::MissingArgumentsError,
17
- 'Missing argument: name')
16
+ ': name')
18
17
  end
19
18
  end
20
19
 
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
11
+ date: 2018-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.15'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
- version: 0.13.1
22
+ version: 0.15.3
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '='
27
+ - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 0.13.1
29
+ version: '0.15'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.15.3
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: faraday_middleware
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +59,7 @@ dependencies:
53
59
  version: '0.4'
54
60
  - - ">="
55
61
  - !ruby/object:Gem::Version
56
- version: 0.4.3
62
+ version: 0.4.7
57
63
  type: :runtime
58
64
  prerelease: false
59
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,47 +69,27 @@ dependencies:
63
69
  version: '0.4'
64
70
  - - ">="
65
71
  - !ruby/object:Gem::Version
66
- version: 0.4.3
67
- - !ruby/object:Gem::Dependency
68
- name: typhoeus
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '1.3'
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 1.3.0
77
- type: :runtime
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '1.3'
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: 1.3.0
72
+ version: 0.4.7
87
73
  - !ruby/object:Gem::Dependency
88
74
  name: bundler
89
75
  requirement: !ruby/object:Gem::Requirement
90
76
  requirements:
91
77
  - - "~>"
92
78
  - !ruby/object:Gem::Version
93
- version: '1.15'
79
+ version: '1.16'
94
80
  - - ">="
95
81
  - !ruby/object:Gem::Version
96
- version: 1.15.4
82
+ version: 1.16.6
97
83
  type: :development
98
84
  prerelease: false
99
85
  version_requirements: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '1.15'
89
+ version: '1.16'
104
90
  - - ">="
105
91
  - !ruby/object:Gem::Version
106
- version: 1.15.4
92
+ version: 1.16.6
107
93
  - !ruby/object:Gem::Dependency
108
94
  name: codeclimate-test-reporter
109
95
  requirement: !ruby/object:Gem::Requirement
@@ -113,7 +99,7 @@ dependencies:
113
99
  version: '1.0'
114
100
  - - ">="
115
101
  - !ruby/object:Gem::Version
116
- version: 1.0.8
102
+ version: 1.0.9
117
103
  type: :development
118
104
  prerelease: false
119
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -123,81 +109,87 @@ dependencies:
123
109
  version: '1.0'
124
110
  - - ">="
125
111
  - !ruby/object:Gem::Version
126
- version: 1.0.8
112
+ version: 1.0.9
127
113
  - !ruby/object:Gem::Dependency
128
114
  name: gem-release
129
115
  requirement: !ruby/object:Gem::Requirement
130
116
  requirements:
131
117
  - - "~>"
132
118
  - !ruby/object:Gem::Version
133
- version: '0.7'
119
+ version: '2.0'
134
120
  - - ">="
135
121
  - !ruby/object:Gem::Version
136
- version: 0.7.4
122
+ version: 2.0.1
137
123
  type: :development
138
124
  prerelease: false
139
125
  version_requirements: !ruby/object:Gem::Requirement
140
126
  requirements:
141
127
  - - "~>"
142
128
  - !ruby/object:Gem::Version
143
- version: '0.7'
129
+ version: '2.0'
144
130
  - - ">="
145
131
  - !ruby/object:Gem::Version
146
- version: 0.7.4
132
+ version: 2.0.1
147
133
  - !ruby/object:Gem::Dependency
148
134
  name: rake
149
135
  requirement: !ruby/object:Gem::Requirement
150
136
  requirements:
151
137
  - - "~>"
152
138
  - !ruby/object:Gem::Version
153
- version: '12.1'
139
+ version: '12.3'
154
140
  - - ">="
155
141
  - !ruby/object:Gem::Version
156
- version: 12.1.0
142
+ version: 12.3.1
157
143
  type: :development
158
144
  prerelease: false
159
145
  version_requirements: !ruby/object:Gem::Requirement
160
146
  requirements:
161
147
  - - "~>"
162
148
  - !ruby/object:Gem::Version
163
- version: '12.1'
149
+ version: '12.3'
164
150
  - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: 12.1.0
152
+ version: 12.3.1
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: rspec
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: '3.5'
159
+ version: '3.8'
174
160
  - - ">="
175
161
  - !ruby/object:Gem::Version
176
- version: 3.5.0
162
+ version: 3.8.0
177
163
  type: :development
178
164
  prerelease: false
179
165
  version_requirements: !ruby/object:Gem::Requirement
180
166
  requirements:
181
167
  - - "~>"
182
168
  - !ruby/object:Gem::Version
183
- version: '3.5'
169
+ version: '3.8'
184
170
  - - ">="
185
171
  - !ruby/object:Gem::Version
186
- version: 3.5.0
172
+ version: 3.8.0
187
173
  - !ruby/object:Gem::Dependency
188
174
  name: rubocop
189
175
  requirement: !ruby/object:Gem::Requirement
190
176
  requirements:
191
177
  - - "~>"
192
178
  - !ruby/object:Gem::Version
193
- version: 0.49.1
179
+ version: '0.59'
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 0.59.2
194
183
  type: :development
195
184
  prerelease: false
196
185
  version_requirements: !ruby/object:Gem::Requirement
197
186
  requirements:
198
187
  - - "~>"
199
188
  - !ruby/object:Gem::Version
200
- version: 0.49.1
189
+ version: '0.59'
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: 0.59.2
201
193
  - !ruby/object:Gem::Dependency
202
194
  name: sinatra
203
195
  requirement: !ruby/object:Gem::Requirement
@@ -207,7 +199,7 @@ dependencies:
207
199
  version: '2.0'
208
200
  - - ">="
209
201
  - !ruby/object:Gem::Version
210
- version: 2.0.0
202
+ version: 2.0.4
211
203
  type: :development
212
204
  prerelease: false
213
205
  version_requirements: !ruby/object:Gem::Requirement
@@ -217,27 +209,27 @@ dependencies:
217
209
  version: '2.0'
218
210
  - - ">="
219
211
  - !ruby/object:Gem::Version
220
- version: 2.0.0
212
+ version: 2.0.4
221
213
  - !ruby/object:Gem::Dependency
222
214
  name: webmock
223
215
  requirement: !ruby/object:Gem::Requirement
224
216
  requirements:
225
217
  - - "~>"
226
218
  - !ruby/object:Gem::Version
227
- version: '3.0'
219
+ version: '3.4'
228
220
  - - ">="
229
221
  - !ruby/object:Gem::Version
230
- version: 3.0.1
222
+ version: 3.4.2
231
223
  type: :development
232
224
  prerelease: false
233
225
  version_requirements: !ruby/object:Gem::Requirement
234
226
  requirements:
235
227
  - - "~>"
236
228
  - !ruby/object:Gem::Version
237
- version: '3.0'
229
+ version: '3.4'
238
230
  - - ">="
239
231
  - !ruby/object:Gem::Version
240
- version: 3.0.1
232
+ version: 3.4.2
241
233
  description: A simple library for communicating with the FinApps REST API. Core functionality.
242
234
  email:
243
235
  - erich@financialapps.com
@@ -332,25 +324,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
324
  version: '0'
333
325
  requirements: []
334
326
  rubyforge_project:
335
- rubygems_version: 2.7.3
327
+ rubygems_version: 2.7.7
336
328
  signing_key:
337
329
  specification_version: 4
338
330
  summary: FinApps REST API ruby client - Core.
339
331
  test_files:
340
- - spec/rest/defaults_spec.rb
341
- - spec/rest/base_client_spec.rb
342
- - spec/rest/credentials_spec.rb
343
- - spec/rest/configuration_spec.rb
344
- - spec/rest/resources_spec.rb
345
- - spec/support/fake_api.rb
346
- - spec/utils/parameter_filter_spec.rb
347
- - spec/utils/validatable_spec.rb
348
- - spec/spec_helpers/client.rb
349
- - spec/spec_helper.rb
350
- - spec/core_extensions/object/is_integer_spec.rb
351
- - spec/middleware/request/no_encoding_basic_authentication_spec.rb
332
+ - spec/middleware/response/raise_error_spec.rb
352
333
  - spec/middleware/request/user_agent_spec.rb
334
+ - spec/middleware/request/request_id_spec.rb
353
335
  - spec/middleware/request/tenant_authentication_spec.rb
354
336
  - spec/middleware/request/accept_json_spec.rb
355
- - spec/middleware/request/request_id_spec.rb
356
- - spec/middleware/response/raise_error_spec.rb
337
+ - spec/middleware/request/no_encoding_basic_authentication_spec.rb
338
+ - spec/spec_helper.rb
339
+ - spec/spec_helpers/client.rb
340
+ - spec/utils/validatable_spec.rb
341
+ - spec/utils/parameter_filter_spec.rb
342
+ - spec/support/fake_api.rb
343
+ - spec/core_extensions/object/is_integer_spec.rb
344
+ - spec/rest/credentials_spec.rb
345
+ - spec/rest/base_client_spec.rb
346
+ - spec/rest/configuration_spec.rb
347
+ - spec/rest/defaults_spec.rb
348
+ - spec/rest/resources_spec.rb