finapps_core 2.0.20 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/Gemfile +1 -0
- data/Rakefile +1 -0
- data/finapps_core.gemspec +9 -10
- data/lib/core_extensions/object/is_integer.rb +1 -0
- data/lib/core_extensions/string/json_to_hash.rb +1 -0
- data/lib/finapps_core.rb +1 -0
- data/lib/finapps_core/error.rb +1 -0
- data/lib/finapps_core/middleware/middleware.rb +1 -0
- data/lib/finapps_core/middleware/request/accept_json.rb +1 -0
- data/lib/finapps_core/middleware/request/no_encoding_basic_authentication.rb +1 -0
- data/lib/finapps_core/middleware/request/tenant_authentication.rb +1 -0
- data/lib/finapps_core/middleware/request/user_agent.rb +1 -0
- data/lib/finapps_core/middleware/response/custom_logger.rb +1 -0
- data/lib/finapps_core/middleware/response/raise_error.rb +1 -0
- data/lib/finapps_core/rest/base_client.rb +2 -1
- data/lib/finapps_core/rest/configuration.rb +2 -1
- data/lib/finapps_core/rest/connection.rb +1 -0
- data/lib/finapps_core/rest/credentials.rb +1 -0
- data/lib/finapps_core/rest/defaults.rb +1 -0
- data/lib/finapps_core/rest/resources.rb +1 -0
- data/lib/finapps_core/utils/loggeable.rb +1 -0
- data/lib/finapps_core/utils/parameter_filter.rb +1 -0
- data/lib/finapps_core/utils/validatable.rb +1 -0
- data/lib/finapps_core/version.rb +2 -1
- data/lib/tasks/releaser.rake +1 -0
- data/spec/core_extensions/object/is_integer_spec.rb +1 -0
- data/spec/middleware/request/accept_json_spec.rb +1 -0
- data/spec/middleware/request/no_encoding_basic_authentication_spec.rb +1 -0
- data/spec/middleware/request/tenant_authentication_spec.rb +1 -0
- data/spec/middleware/request/user_agent_spec.rb +1 -0
- data/spec/middleware/response/raise_error_spec.rb +1 -0
- data/spec/rest/base_client_spec.rb +2 -1
- data/spec/rest/configuration_spec.rb +1 -0
- data/spec/rest/credentials_spec.rb +1 -0
- data/spec/rest/resources_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/spec_helpers/client.rb +1 -0
- data/spec/support/fake_api.rb +1 -0
- data/spec/utils/parameter_filter_spec.rb +1 -0
- data/spec/utils/validatable_spec.rb +1 -0
- metadata +55 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dccff941fb23d4e52867d5895707394afbd1964b
|
4
|
+
data.tar.gz: 855768812fb098270db4b006a30c954c76c45c7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b638cf49af713d61eb982e8ee8e53e8e085e87b4d1b87b406b8e3e2c67c10f885eb6e49e2f1bed4536ec5ab099ad3ce11162eb1d561152a667500485db4ff3
|
7
|
+
data.tar.gz: 25949fba5f1303c77ec2234377addaa265761b81b09abb44817c1ca885aa55134b2f6bb7a409ccf08f2204c43af3c17eb5cf7ba89bdb780a79fbe2b8e6b2b643
|
data/.rubocop.yml
CHANGED
@@ -16,10 +16,10 @@ Metrics/LineLength:
|
|
16
16
|
|
17
17
|
# No space makes the method definition shorter and differentiates
|
18
18
|
# from a regular assignment.
|
19
|
-
|
19
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
20
20
|
EnforcedStyle: no_space
|
21
21
|
|
22
|
-
|
22
|
+
Layout/SpaceInsideBlockBraces:
|
23
23
|
# The space here provides no real gain in readability while consuming
|
24
24
|
# horizontal space that could be used for a better parameter name.
|
25
25
|
# Also {| differentiates better from a hash than { | does.
|
@@ -27,7 +27,7 @@ Style/SpaceInsideBlockBraces:
|
|
27
27
|
|
28
28
|
# No trailing space differentiates better from the block:
|
29
29
|
# foo} means hash, foo } means block.
|
30
|
-
|
30
|
+
Layout/SpaceInsideHashLiteralBraces:
|
31
31
|
EnforcedStyle: no_space
|
32
32
|
|
33
33
|
|
@@ -41,7 +41,7 @@ Style/CollectionMethods:
|
|
41
41
|
find: detect
|
42
42
|
find_all: select
|
43
43
|
reduce: inject
|
44
|
-
|
44
|
+
Layout/DotPosition:
|
45
45
|
Description: Checks the position of the dot in multi-line method calls.
|
46
46
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
47
47
|
Enabled: true
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.4.2
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
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.
|
24
|
-
spec.add_runtime_dependency 'faraday_middleware', '~> 0.
|
25
|
-
spec.add_runtime_dependency 'typhoeus', '~> 1.1', '>= 1.1.2'
|
23
|
+
spec.add_runtime_dependency 'faraday', '~> 0.13', '>= 0.13.1'
|
24
|
+
spec.add_runtime_dependency 'faraday_middleware', '~> 0.12', '>= 0.12.2'
|
26
25
|
spec.add_runtime_dependency 'rash_alt', '~> 0.4', '>= 0.4.3'
|
26
|
+
spec.add_runtime_dependency 'typhoeus', '~> 1.3', '>= 1.3.0'
|
27
27
|
|
28
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.15', '>= 1.15.4'
|
29
|
+
spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.8'
|
29
30
|
spec.add_development_dependency 'gem-release', '~> 0.7', '>= 0.7.4'
|
30
|
-
spec.add_development_dependency 'rake', '~> 12.
|
31
|
+
spec.add_development_dependency 'rake', '~> 12.1', '>= 12.1.0'
|
31
32
|
spec.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
|
32
|
-
spec.add_development_dependency '
|
33
|
-
spec.add_development_dependency 'sinatra', '~>
|
34
|
-
spec.add_development_dependency '
|
35
|
-
spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.5'
|
36
|
-
spec.add_development_dependency 'rubocop', '~> 0.47', '>= 0.47.1'
|
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'
|
37
36
|
|
38
37
|
spec.extra_rdoc_files = %w(README.md LICENSE)
|
39
38
|
spec.rdoc_options = %w(--line-numbers --inline-source --title finapps-ruby-core --main README.md)
|
data/lib/finapps_core.rb
CHANGED
data/lib/finapps_core/error.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require_relative './configuration.rb'
|
3
4
|
require_relative './connection.rb'
|
4
5
|
require_relative '../utils/loggeable'
|
@@ -66,7 +67,7 @@ module FinAppsCore
|
|
66
67
|
end
|
67
68
|
|
68
69
|
def respond_to_missing?(method_sym, include_private=false)
|
69
|
-
|
70
|
+
%i(get post put delete).include?(method_sym) ? true : super
|
70
71
|
end
|
71
72
|
|
72
73
|
private
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module FinAppsCore
|
3
4
|
module REST
|
4
5
|
# Represents the client configuration options
|
@@ -28,7 +29,7 @@ module FinAppsCore
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def remove_empty_options(hash)
|
31
|
-
hash.
|
32
|
+
hash.reject {|_, value| value.nil? }
|
32
33
|
end
|
33
34
|
end
|
34
35
|
end
|
data/lib/finapps_core/version.rb
CHANGED
data/lib/tasks/releaser.rake
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
RSpec.describe FinAppsCore::REST::BaseClient do
|
3
4
|
let(:valid_tenant_options) { {tenant_token: VALID_CREDENTIALS[:token]} }
|
4
5
|
subject { FinAppsCore::REST::BaseClient.new(valid_tenant_options) }
|
@@ -88,7 +89,7 @@ RSpec.describe FinAppsCore::REST::BaseClient do
|
|
88
89
|
|
89
90
|
describe '#respond_to_missing?' do
|
90
91
|
context 'for supported methods' do
|
91
|
-
|
92
|
+
%i(get post put delete).each do |method|
|
92
93
|
it("responds to #{method}") { expect(subject).to respond_to(method) }
|
93
94
|
end
|
94
95
|
end
|
data/spec/rest/resources_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/spec_helpers/client.rb
CHANGED
data/spec/support/fake_api.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,60 +16,40 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.13'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.13.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.13'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.13.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: faraday_middleware
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.12'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.
|
42
|
+
version: 0.12.2
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '0.
|
49
|
+
version: '0.12'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0.
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: typhoeus
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '1.1'
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 1.1.2
|
63
|
-
type: :runtime
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '1.1'
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 1.1.2
|
52
|
+
version: 0.12.2
|
73
53
|
- !ruby/object:Gem::Dependency
|
74
54
|
name: rash_alt
|
75
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,185 +71,179 @@ dependencies:
|
|
91
71
|
- !ruby/object:Gem::Version
|
92
72
|
version: 0.4.3
|
93
73
|
- !ruby/object:Gem::Dependency
|
94
|
-
name:
|
74
|
+
name: typhoeus
|
95
75
|
requirement: !ruby/object:Gem::Requirement
|
96
76
|
requirements:
|
97
77
|
- - "~>"
|
98
78
|
- !ruby/object:Gem::Version
|
99
|
-
version: '1.
|
79
|
+
version: '1.3'
|
100
80
|
- - ">="
|
101
81
|
- !ruby/object:Gem::Version
|
102
|
-
version: 1.
|
103
|
-
type: :
|
82
|
+
version: 1.3.0
|
83
|
+
type: :runtime
|
104
84
|
prerelease: false
|
105
85
|
version_requirements: !ruby/object:Gem::Requirement
|
106
86
|
requirements:
|
107
87
|
- - "~>"
|
108
88
|
- !ruby/object:Gem::Version
|
109
|
-
version: '1.
|
89
|
+
version: '1.3'
|
110
90
|
- - ">="
|
111
91
|
- !ruby/object:Gem::Version
|
112
|
-
version: 1.
|
92
|
+
version: 1.3.0
|
113
93
|
- !ruby/object:Gem::Dependency
|
114
|
-
name:
|
94
|
+
name: bundler
|
115
95
|
requirement: !ruby/object:Gem::Requirement
|
116
96
|
requirements:
|
117
97
|
- - "~>"
|
118
98
|
- !ruby/object:Gem::Version
|
119
|
-
version: '
|
99
|
+
version: '1.15'
|
120
100
|
- - ">="
|
121
101
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
102
|
+
version: 1.15.4
|
123
103
|
type: :development
|
124
104
|
prerelease: false
|
125
105
|
version_requirements: !ruby/object:Gem::Requirement
|
126
106
|
requirements:
|
127
107
|
- - "~>"
|
128
108
|
- !ruby/object:Gem::Version
|
129
|
-
version: '
|
109
|
+
version: '1.15'
|
130
110
|
- - ">="
|
131
111
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
112
|
+
version: 1.15.4
|
133
113
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
114
|
+
name: codeclimate-test-reporter
|
135
115
|
requirement: !ruby/object:Gem::Requirement
|
136
116
|
requirements:
|
137
117
|
- - "~>"
|
138
118
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
119
|
+
version: '1.0'
|
140
120
|
- - ">="
|
141
121
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
122
|
+
version: 1.0.8
|
143
123
|
type: :development
|
144
124
|
prerelease: false
|
145
125
|
version_requirements: !ruby/object:Gem::Requirement
|
146
126
|
requirements:
|
147
127
|
- - "~>"
|
148
128
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
129
|
+
version: '1.0'
|
150
130
|
- - ">="
|
151
131
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
132
|
+
version: 1.0.8
|
153
133
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
134
|
+
name: gem-release
|
155
135
|
requirement: !ruby/object:Gem::Requirement
|
156
136
|
requirements:
|
157
137
|
- - "~>"
|
158
138
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
139
|
+
version: '0.7'
|
160
140
|
- - ">="
|
161
141
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
142
|
+
version: 0.7.4
|
163
143
|
type: :development
|
164
144
|
prerelease: false
|
165
145
|
version_requirements: !ruby/object:Gem::Requirement
|
166
146
|
requirements:
|
167
147
|
- - "~>"
|
168
148
|
- !ruby/object:Gem::Version
|
169
|
-
version: '
|
149
|
+
version: '0.7'
|
170
150
|
- - ">="
|
171
151
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
152
|
+
version: 0.7.4
|
173
153
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
154
|
+
name: rake
|
175
155
|
requirement: !ruby/object:Gem::Requirement
|
176
156
|
requirements:
|
177
157
|
- - "~>"
|
178
158
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
159
|
+
version: '12.1'
|
180
160
|
- - ">="
|
181
161
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
162
|
+
version: 12.1.0
|
183
163
|
type: :development
|
184
164
|
prerelease: false
|
185
165
|
version_requirements: !ruby/object:Gem::Requirement
|
186
166
|
requirements:
|
187
167
|
- - "~>"
|
188
168
|
- !ruby/object:Gem::Version
|
189
|
-
version: '
|
169
|
+
version: '12.1'
|
190
170
|
- - ">="
|
191
171
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
172
|
+
version: 12.1.0
|
193
173
|
- !ruby/object:Gem::Dependency
|
194
|
-
name:
|
174
|
+
name: rspec
|
195
175
|
requirement: !ruby/object:Gem::Requirement
|
196
176
|
requirements:
|
197
177
|
- - "~>"
|
198
178
|
- !ruby/object:Gem::Version
|
199
|
-
version: '
|
179
|
+
version: '3.5'
|
200
180
|
- - ">="
|
201
181
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
182
|
+
version: 3.5.0
|
203
183
|
type: :development
|
204
184
|
prerelease: false
|
205
185
|
version_requirements: !ruby/object:Gem::Requirement
|
206
186
|
requirements:
|
207
187
|
- - "~>"
|
208
188
|
- !ruby/object:Gem::Version
|
209
|
-
version: '
|
189
|
+
version: '3.5'
|
210
190
|
- - ">="
|
211
191
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
192
|
+
version: 3.5.0
|
213
193
|
- !ruby/object:Gem::Dependency
|
214
|
-
name:
|
194
|
+
name: rubocop
|
215
195
|
requirement: !ruby/object:Gem::Requirement
|
216
196
|
requirements:
|
217
197
|
- - "~>"
|
218
198
|
- !ruby/object:Gem::Version
|
219
|
-
version:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 0.11.2
|
199
|
+
version: 0.49.1
|
223
200
|
type: :development
|
224
201
|
prerelease: false
|
225
202
|
version_requirements: !ruby/object:Gem::Requirement
|
226
203
|
requirements:
|
227
204
|
- - "~>"
|
228
205
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
230
|
-
- - ">="
|
231
|
-
- !ruby/object:Gem::Version
|
232
|
-
version: 0.11.2
|
206
|
+
version: 0.49.1
|
233
207
|
- !ruby/object:Gem::Dependency
|
234
|
-
name:
|
208
|
+
name: sinatra
|
235
209
|
requirement: !ruby/object:Gem::Requirement
|
236
210
|
requirements:
|
237
211
|
- - "~>"
|
238
212
|
- !ruby/object:Gem::Version
|
239
|
-
version: '
|
213
|
+
version: '2.0'
|
240
214
|
- - ">="
|
241
215
|
- !ruby/object:Gem::Version
|
242
|
-
version:
|
216
|
+
version: 2.0.0
|
243
217
|
type: :development
|
244
218
|
prerelease: false
|
245
219
|
version_requirements: !ruby/object:Gem::Requirement
|
246
220
|
requirements:
|
247
221
|
- - "~>"
|
248
222
|
- !ruby/object:Gem::Version
|
249
|
-
version: '
|
223
|
+
version: '2.0'
|
250
224
|
- - ">="
|
251
225
|
- !ruby/object:Gem::Version
|
252
|
-
version:
|
226
|
+
version: 2.0.0
|
253
227
|
- !ruby/object:Gem::Dependency
|
254
|
-
name:
|
228
|
+
name: webmock
|
255
229
|
requirement: !ruby/object:Gem::Requirement
|
256
230
|
requirements:
|
257
231
|
- - "~>"
|
258
232
|
- !ruby/object:Gem::Version
|
259
|
-
version: '0
|
233
|
+
version: '3.0'
|
260
234
|
- - ">="
|
261
235
|
- !ruby/object:Gem::Version
|
262
|
-
version: 0.
|
236
|
+
version: 3.0.1
|
263
237
|
type: :development
|
264
238
|
prerelease: false
|
265
239
|
version_requirements: !ruby/object:Gem::Requirement
|
266
240
|
requirements:
|
267
241
|
- - "~>"
|
268
242
|
- !ruby/object:Gem::Version
|
269
|
-
version: '0
|
243
|
+
version: '3.0'
|
270
244
|
- - ">="
|
271
245
|
- !ruby/object:Gem::Version
|
272
|
-
version: 0.
|
246
|
+
version: 3.0.1
|
273
247
|
description: A simple library for communicating with the FinApps REST API. Core functionality.
|
274
248
|
email:
|
275
249
|
- erich@financialapps.com
|
@@ -361,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
361
335
|
version: '0'
|
362
336
|
requirements: []
|
363
337
|
rubyforge_project:
|
364
|
-
rubygems_version: 2.6.
|
338
|
+
rubygems_version: 2.6.13
|
365
339
|
signing_key:
|
366
340
|
specification_version: 4
|
367
341
|
summary: FinApps REST API ruby client - Core.
|