finapps 4.0.5 → 4.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/finapps.gemspec +1 -1
- data/lib/finapps/rest/sessions.rb +7 -2
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/order_tokens_spec.rb +2 -0
- data/spec/rest/sessions_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/fake_api.rb +2 -2
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e1e6ff1a8379127a67c120835e11aa5d02b4a250341583e6bb31d340b9eb6527
|
4
|
+
data.tar.gz: a0599c41a38248aaa2180a005cc6020666280e1b92137744d3143691fa39c1e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a728f579cc44d56586cb0fd05e4949c38305791687dd6e9e231021477809cab9f5896f2e67974c82a6460f6d9f66b7a6b5ab5c235980a0a0c8fb4a6c0828ea95
|
7
|
+
data.tar.gz: 6a4721575df2270662974814db05af130ed69038ce6acfcccbd9841b47bbbba787d05b5d15ec603277e3adf81614a8b89939e8e4a7388aa772dcfe52e5443458
|
data/finapps.gemspec
CHANGED
@@ -20,7 +20,7 @@ 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 'finapps_core', '~> 4.0', '>= 4.0.
|
23
|
+
spec.add_runtime_dependency 'finapps_core', '~> 4.0', '>= 4.0.5'
|
24
24
|
|
25
25
|
spec.add_development_dependency 'bundler', '~> 1.16', '>= 1.16.6'
|
26
26
|
spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.9'
|
@@ -3,15 +3,20 @@
|
|
3
3
|
module FinApps
|
4
4
|
module REST
|
5
5
|
class Sessions < FinAppsCore::REST::Resources # :nodoc:
|
6
|
+
CONSUMER_LOGIN = 'login'
|
6
7
|
LOGOUT = 'logout'
|
7
8
|
|
8
9
|
def create(params, path = nil)
|
9
10
|
return super nil, path if path == LOGOUT
|
10
11
|
raise FinAppsCore::InvalidArgumentsError, 'Invalid argument: params.' unless validates params
|
11
12
|
|
12
|
-
path ||=
|
13
|
+
path ||= CONSUMER_LOGIN
|
13
14
|
|
14
|
-
|
15
|
+
begin
|
16
|
+
super params, path
|
17
|
+
rescue FinAppsCore::ApiUnauthenticatedError
|
18
|
+
return [nil, ["Invalid #{path == CONSUMER_LOGIN ? 'Consumer' : 'Operator'} Identifier or Credentials"]]
|
19
|
+
end
|
15
20
|
end
|
16
21
|
|
17
22
|
def destroy
|
data/lib/finapps/version.rb
CHANGED
data/spec/rest/sessions_spec.rb
CHANGED
@@ -28,7 +28,7 @@ RSpec.describe FinApps::REST::Sessions, 'initialized with valid FinApps::Client
|
|
28
28
|
|
29
29
|
it { expect { create }.not_to raise_error }
|
30
30
|
it('results is nil') { expect(results).to be_nil }
|
31
|
-
error_message = 'Invalid
|
31
|
+
error_message = 'Invalid Consumer Identifier or Credentials'
|
32
32
|
it('error_messages are populated') { expect(error_messages.first).to eq(error_message) }
|
33
33
|
end
|
34
34
|
|
data/spec/spec_helper.rb
CHANGED
data/spec/support/fake_api.rb
CHANGED
@@ -20,7 +20,7 @@ class FakeApi < Sinatra::Base
|
|
20
20
|
request.body.rewind
|
21
21
|
request_payload = JSON.parse request.body.read
|
22
22
|
if request_payload['bad_params']
|
23
|
-
json_response
|
23
|
+
json_response 404, 'resource_not_found.json'
|
24
24
|
else
|
25
25
|
status 204
|
26
26
|
end
|
@@ -32,7 +32,7 @@ class FakeApi < Sinatra::Base
|
|
32
32
|
if request_payload['pdf_statement_months']
|
33
33
|
status 204
|
34
34
|
else
|
35
|
-
json_response
|
35
|
+
json_response 404, 'resource_not_found.json'
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
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: 4.0.
|
4
|
+
version: 4.0.6
|
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-
|
11
|
+
date: 2018-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.0'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 4.0.
|
22
|
+
version: 4.0.5
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.0'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 4.0.
|
32
|
+
version: 4.0.5
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -348,36 +348,36 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
348
348
|
version: '0'
|
349
349
|
requirements: []
|
350
350
|
rubyforge_project:
|
351
|
-
rubygems_version: 2.6
|
351
|
+
rubygems_version: 2.7.6
|
352
352
|
signing_key:
|
353
353
|
specification_version: 4
|
354
354
|
summary: FinApps REST API ruby client.
|
355
355
|
test_files:
|
356
|
-
- spec/rest/
|
357
|
-
- spec/rest/
|
358
|
-
- spec/rest/
|
359
|
-
- spec/rest/
|
360
|
-
- spec/rest/user_institutions_forms_spec.rb
|
361
|
-
- spec/rest/consumers_spec.rb
|
362
|
-
- spec/rest/orders_spec.rb
|
363
|
-
- spec/rest/order_tokens_spec.rb
|
364
|
-
- spec/rest/institutions_forms_spec.rb
|
356
|
+
- spec/rest/institutions_spec.rb
|
357
|
+
- spec/rest/consumer_institution_refreshes_spec.rb
|
358
|
+
- spec/rest/order_assignments_spec.rb
|
359
|
+
- spec/rest/tenant_settings_spec.rb
|
365
360
|
- spec/rest/tenant_app_settings_spec.rb
|
366
|
-
- spec/rest/
|
367
|
-
- spec/rest/user_institutions_statuses_spec.rb
|
361
|
+
- spec/rest/user_institutions_forms_spec.rb
|
368
362
|
- spec/rest/client_spec.rb
|
369
|
-
- spec/rest/
|
370
|
-
- spec/rest/user_institutions_spec.rb
|
371
|
-
- spec/rest/consumer_institution_refreshes_spec.rb
|
363
|
+
- spec/rest/version_spec.rb
|
372
364
|
- spec/rest/password_resets_spec.rb
|
373
|
-
- spec/rest/
|
374
|
-
- spec/rest/institutions_spec.rb
|
365
|
+
- spec/rest/operators_spec.rb
|
375
366
|
- spec/rest/order_statuses_spec.rb
|
367
|
+
- spec/rest/order_reports_spec.rb
|
368
|
+
- spec/rest/consumers_spec.rb
|
369
|
+
- spec/rest/sessions_spec.rb
|
370
|
+
- spec/rest/user_institutions_statuses_spec.rb
|
371
|
+
- spec/rest/orders_spec.rb
|
372
|
+
- spec/rest/operators_password_resets_spec.rb
|
373
|
+
- spec/rest/institutions_forms_spec.rb
|
376
374
|
- spec/rest/order_refreshes_spec.rb
|
377
375
|
- spec/rest/order_notifications_spec.rb
|
378
|
-
- spec/rest/
|
379
|
-
- spec/rest/
|
380
|
-
- spec/
|
376
|
+
- spec/rest/statements_spec.rb
|
377
|
+
- spec/rest/order_tokens_spec.rb
|
378
|
+
- spec/rest/user_institutions_spec.rb
|
379
|
+
- spec/rest/products_spec.rb
|
381
380
|
- spec/utils/query_builder_spec.rb
|
382
|
-
- spec/
|
381
|
+
- spec/support/fake_api.rb
|
383
382
|
- spec/spec_helper.rb
|
383
|
+
- spec/spec_helpers/client.rb
|