finapps_core 2.0.12 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/finapps_core/middleware/request/no_encoding_basic_authentication.rb +1 -1
- data/lib/finapps_core/rest/connection.rb +1 -1
- data/lib/finapps_core/version.rb +1 -1
- data/spec/middleware/request/no_encoding_basic_authentication_spec.rb +2 -2
- data/spec/middleware/response/raise_error_spec.rb +5 -0
- data/spec/rest/resources_spec.rb +15 -0
- metadata +4 -5
- data/Gemfile.lock +0 -100
- data/spec/rest/timeout_spec.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90478e31895efdc90a8bc6fca3192ab1750f874b
|
4
|
+
data.tar.gz: acd6717dee8d64d947501cdc78494d458d77994a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f3a25411c86c43ca9a943686cf33fdeb5c76c89236c2b17173a3e0ec2e8d483191e5872c20eef8540de9a9490bbf3ba08b1646e12589b03c48bdfd00b3af7d7
|
7
|
+
data.tar.gz: e51a1b5e8e9c174f9b41e364773a14c96972ee2130b478cbc1e15e8e60c5be34156e6146a44464dfbbf2e07ef50c25c0394b1808519cb67e9f70970dd5ca6ea0
|
data/.gitignore
CHANGED
@@ -13,7 +13,7 @@ module FinAppsCore
|
|
13
13
|
Faraday.new(options) do |conn|
|
14
14
|
conn.request :accept_json
|
15
15
|
conn.request :user_agent
|
16
|
-
conn.request :tenant_authentication, config.tenant_token
|
16
|
+
conn.request :tenant_authentication, config.tenant_token unless config.valid_user_credentials?
|
17
17
|
conn.request :json
|
18
18
|
conn.request :retry
|
19
19
|
conn.request :multipart
|
data/lib/finapps_core/version.rb
CHANGED
@@ -6,8 +6,8 @@ RSpec.describe FinAppsCore::Middleware::NoEncodingBasicAuthentication do
|
|
6
6
|
app = proc {|env| env }
|
7
7
|
|
8
8
|
context 'when credentials were provided' do
|
9
|
-
let(:middleware) { FinAppsCore::Middleware::NoEncodingBasicAuthentication.new(app,
|
10
|
-
let(:expected_header_value) { "
|
9
|
+
let(:middleware) { FinAppsCore::Middleware::NoEncodingBasicAuthentication.new(app, :token) }
|
10
|
+
let(:expected_header_value) { "Bearer #{:token}" }
|
11
11
|
|
12
12
|
context 'when header was not previously set' do
|
13
13
|
let(:request_env) { {request_headers: {}} }
|
@@ -20,5 +20,10 @@ RSpec.describe FinAppsCore::Middleware::RaiseError do
|
|
20
20
|
error_message = 'Connection Failed'
|
21
21
|
it { expect { subject.on_complete(env) }.to raise_error(FinAppsCore::ConnectionFailedError, error_message) }
|
22
22
|
end
|
23
|
+
context 'for connection failed error' do
|
24
|
+
let(:env) { Env.new(419) }
|
25
|
+
error_message = 'Api Session Timed out'
|
26
|
+
it { expect { subject.on_complete(env) }.to raise_error(FinAppsCore::ApiSessionTimeoutError, error_message) }
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
RSpec.describe FinAppsCore::REST::Resources do
|
3
|
+
describe '#new' do
|
4
|
+
end
|
5
|
+
describe '#list' do
|
6
|
+
end
|
7
|
+
describe '#create' do
|
8
|
+
end
|
9
|
+
describe '#update' do
|
10
|
+
end
|
11
|
+
describe '#show' do
|
12
|
+
end
|
13
|
+
describe '#destroy' do
|
14
|
+
end
|
15
|
+
end
|
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.0.
|
4
|
+
version: 2.0.13
|
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-02-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -288,7 +288,6 @@ files:
|
|
288
288
|
- ".ruby-version"
|
289
289
|
- ".travis.yml"
|
290
290
|
- Gemfile
|
291
|
-
- Gemfile.lock
|
292
291
|
- LICENSE
|
293
292
|
- README.md
|
294
293
|
- Rakefile
|
@@ -326,7 +325,7 @@ files:
|
|
326
325
|
- spec/rest/base_client_spec.rb
|
327
326
|
- spec/rest/configuration_spec.rb
|
328
327
|
- spec/rest/credentials_spec.rb
|
329
|
-
- spec/rest/
|
328
|
+
- spec/rest/resources_spec.rb
|
330
329
|
- spec/spec_helper.rb
|
331
330
|
- spec/spec_helpers/client.rb
|
332
331
|
- spec/support/fake_api.rb
|
@@ -372,7 +371,7 @@ test_files:
|
|
372
371
|
- spec/rest/base_client_spec.rb
|
373
372
|
- spec/rest/credentials_spec.rb
|
374
373
|
- spec/rest/configuration_spec.rb
|
375
|
-
- spec/rest/
|
374
|
+
- spec/rest/resources_spec.rb
|
376
375
|
- spec/support/fake_api.rb
|
377
376
|
- spec/utils/parameter_filter_spec.rb
|
378
377
|
- spec/utils/validatable_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
finapps_core (2.0.11)
|
5
|
-
faraday (~> 0.11, >= 0.11.0)
|
6
|
-
faraday_middleware (~> 0.11, >= 0.11.0.1)
|
7
|
-
rash (~> 0.4, >= 0.4.0)
|
8
|
-
typhoeus (~> 1.1, >= 1.1.2)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
addressable (2.5.0)
|
14
|
-
public_suffix (~> 2.0, >= 2.0.2)
|
15
|
-
ast (2.3.0)
|
16
|
-
codeclimate-test-reporter (1.0.5)
|
17
|
-
simplecov
|
18
|
-
crack (0.4.3)
|
19
|
-
safe_yaml (~> 1.0.0)
|
20
|
-
diff-lcs (1.3)
|
21
|
-
docile (1.1.5)
|
22
|
-
ethon (0.10.1)
|
23
|
-
ffi (>= 1.3.0)
|
24
|
-
faraday (0.11.0)
|
25
|
-
multipart-post (>= 1.2, < 3)
|
26
|
-
faraday_middleware (0.11.0.1)
|
27
|
-
faraday (>= 0.7.4, < 1.0)
|
28
|
-
ffi (1.9.17)
|
29
|
-
gem-release (0.7.4)
|
30
|
-
hashdiff (0.3.2)
|
31
|
-
hashie (2.0.5)
|
32
|
-
json (2.0.3)
|
33
|
-
multipart-post (2.0.0)
|
34
|
-
parser (2.4.0.0)
|
35
|
-
ast (~> 2.2)
|
36
|
-
powerpack (0.1.1)
|
37
|
-
public_suffix (2.0.5)
|
38
|
-
rack (1.6.5)
|
39
|
-
rack-protection (1.5.3)
|
40
|
-
rack
|
41
|
-
rainbow (2.2.1)
|
42
|
-
rake (12.0.0)
|
43
|
-
rash (0.4.0)
|
44
|
-
hashie (~> 2.0.0)
|
45
|
-
rspec (3.5.0)
|
46
|
-
rspec-core (~> 3.5.0)
|
47
|
-
rspec-expectations (~> 3.5.0)
|
48
|
-
rspec-mocks (~> 3.5.0)
|
49
|
-
rspec-core (3.5.4)
|
50
|
-
rspec-support (~> 3.5.0)
|
51
|
-
rspec-expectations (3.5.0)
|
52
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
-
rspec-support (~> 3.5.0)
|
54
|
-
rspec-mocks (3.5.0)
|
55
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
-
rspec-support (~> 3.5.0)
|
57
|
-
rspec-support (3.5.0)
|
58
|
-
rubocop (0.47.1)
|
59
|
-
parser (>= 2.3.3.1, < 3.0)
|
60
|
-
powerpack (~> 0.1)
|
61
|
-
rainbow (>= 1.99.1, < 3.0)
|
62
|
-
ruby-progressbar (~> 1.7)
|
63
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
64
|
-
ruby-progressbar (1.8.1)
|
65
|
-
safe_yaml (1.0.4)
|
66
|
-
simplecov (0.13.0)
|
67
|
-
docile (~> 1.1.0)
|
68
|
-
json (>= 1.8, < 3)
|
69
|
-
simplecov-html (~> 0.10.0)
|
70
|
-
simplecov-html (0.10.0)
|
71
|
-
sinatra (1.4.8)
|
72
|
-
rack (~> 1.5)
|
73
|
-
rack-protection (~> 1.4)
|
74
|
-
tilt (>= 1.3, < 3)
|
75
|
-
tilt (2.0.6)
|
76
|
-
typhoeus (1.1.2)
|
77
|
-
ethon (>= 0.9.0)
|
78
|
-
unicode-display_width (1.1.3)
|
79
|
-
webmock (2.3.2)
|
80
|
-
addressable (>= 2.3.6)
|
81
|
-
crack (>= 0.3.2)
|
82
|
-
hashdiff
|
83
|
-
|
84
|
-
PLATFORMS
|
85
|
-
ruby
|
86
|
-
|
87
|
-
DEPENDENCIES
|
88
|
-
bundler (~> 1.14, >= 1.14.3)
|
89
|
-
codeclimate-test-reporter (~> 1.0, >= 1.0.5)
|
90
|
-
finapps_core!
|
91
|
-
gem-release (~> 0.7, >= 0.7.4)
|
92
|
-
rake (~> 12.0, >= 12.0.0)
|
93
|
-
rspec (~> 3.5, >= 3.5.0)
|
94
|
-
rubocop (~> 0.47, >= 0.47.1)
|
95
|
-
simplecov (~> 0.11, >= 0.11.2)
|
96
|
-
sinatra (~> 1.4, >= 1.4.7)
|
97
|
-
webmock (~> 2.3, >= 2.3.2)
|
98
|
-
|
99
|
-
BUNDLED WITH
|
100
|
-
1.14.3
|
data/spec/rest/timeout_spec.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
RSpec.describe FinAppsCore::REST::Resources do
|
3
|
-
describe 'timeout' do
|
4
|
-
subject { FinAppsCore::REST::Resources.new(FinAppsCore::REST::BaseClient.new({})).show(:timeout) }
|
5
|
-
it { expect { subject }.to raise_error(FinAppsCore::ApiSessionTimeoutError) }
|
6
|
-
end
|
7
|
-
end
|