finapps_core 2.1.2 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finapps_core/rest/defaults.rb +1 -1
- data/lib/finapps_core/version.rb +1 -1
- data/spec/rest/defaults_spec.rb +1 -1
- data/spec/support/fake_api.rb +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea3eada86db869992dfca6efc65c5b9ab2149f7e
|
4
|
+
data.tar.gz: daad0cf30c7314b65eb59c7af5b05d76014b99c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 618d8d3b29cb46d87cf18951bc853ff4893a75e474d547d1cb30b0b21b41c63616230c62bbfa4a811bdf101e3059a7743c9cc0b2474176f9afe2bdc01f8affc2
|
7
|
+
data.tar.gz: b3839f978d8f8d6514e7c7b549933c3bc83621e486468b6291c4376eda292de7a4c3873b24311814a0cbc8f6f3b4de6db47459969fd8d2fbd0297902ddc79b30
|
data/lib/finapps_core/version.rb
CHANGED
data/spec/rest/defaults_spec.rb
CHANGED
@@ -6,7 +6,7 @@ RSpec.describe FinAppsCore::REST::Defaults do
|
|
6
6
|
describe 'set constants' do
|
7
7
|
before { stub_const(described_class.to_s, fake_class) }
|
8
8
|
|
9
|
-
it('sets API_VERSION') { expect(described_class::API_VERSION).to eq '
|
9
|
+
it('sets API_VERSION') { expect(described_class::API_VERSION).to eq '3' }
|
10
10
|
it('sets DEFAULTS') { expect(described_class::DEFAULTS).to be_a(Hash) }
|
11
11
|
it('freezes DEFAULTS') { expect(described_class::DEFAULTS).to be_frozen }
|
12
12
|
it('sets DEFAULTS[:host]') { expect(described_class::DEFAULTS[:host]).to eq 'https://api.financialapps.com' }
|
data/spec/support/fake_api.rb
CHANGED
@@ -5,25 +5,25 @@ require 'sinatra/base'
|
|
5
5
|
# the FakeApi class is used to mock API requests while testing.
|
6
6
|
class FakeApi < Sinatra::Base
|
7
7
|
# timeout
|
8
|
-
get('/
|
8
|
+
get('/v3/resources/timeout') { status 419 }
|
9
9
|
|
10
10
|
# resource
|
11
|
-
post('/
|
12
|
-
get('/
|
13
|
-
get('/
|
14
|
-
put('/
|
15
|
-
delete('/
|
11
|
+
post('/v3/resources') { json_response 201, 'resource.json' }
|
12
|
+
get('/v3/resources/:id') { json_response 200, 'resource.json' }
|
13
|
+
get('/v3/resources') { json_response 200, 'resources.json' }
|
14
|
+
put('/v3/resources') { json_response 201, 'resource.json' }
|
15
|
+
delete('/v3/resources/:id') { status 202 }
|
16
16
|
|
17
17
|
# version
|
18
|
-
get('/
|
18
|
+
get('/v3/version') { 'Version => 2.1.29-.20161208.172810' }
|
19
19
|
|
20
20
|
# errors
|
21
|
-
get('/
|
22
|
-
get('/
|
23
|
-
get('/
|
21
|
+
get('/v3/client_error') { json_response 400, 'error.json' }
|
22
|
+
get('/v3/server_error') { status 500 }
|
23
|
+
get('/v3/proxy_error') { status 407 }
|
24
24
|
|
25
25
|
# relevance
|
26
|
-
get('/
|
26
|
+
get('/v3/relevance/ruleset/names') { json_response 200, 'relevance_ruleset_names.json' }
|
27
27
|
|
28
28
|
private
|
29
29
|
|
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:
|
4
|
+
version: 3.0.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:
|
11
|
+
date: 2018-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|