api_six_client 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/api_six_client/base_int.rb +7 -2
- data/lib/api_six_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4770d0b4e1efdb337288881828be1d95b0978e28e08a1035babb505bfad9ebf0
|
4
|
+
data.tar.gz: 2e2c2e717f0c7a728183d46f6a0c328d1113284d94a63e69fb2075256aa6f645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45df367a82295b73aedc9d272c878181807a24f2a4f803912096787acb1e29d6d6e6a43706b8424df239eb3c138e862a98832874de58025e326e9d0ebd3e0f12
|
7
|
+
data.tar.gz: fe2240087088cc96254a32dbe3cd312b2324fe4d3637ac68fdaa698cdda5dfd7e9ece33e2f466af19931ae11a530873874da5bc55eb2e397d07582e05d1ef95d
|
data/Gemfile.lock
CHANGED
@@ -2,12 +2,15 @@
|
|
2
2
|
|
3
3
|
module ApiSixClient
|
4
4
|
class BaseInt < Base
|
5
|
+
APP_OUTSIDE_K8S = %w[Grunnbok Brreg]
|
6
|
+
SERVICES_OUTSIDE_K8S = %w[gbk_int brg_int olc_int cad_int]
|
7
|
+
|
5
8
|
DEFAULT_INTRANET_MAPPING = ->(service_name) {
|
6
9
|
{ k8s_service: "http://#{service_name.gsub('_int', '-api')}", api_int_path: 'api_int'}
|
7
10
|
}
|
8
11
|
INTRANET_MAPPING = {
|
9
|
-
'olc_int' => { k8s_service: 'http://core-web:3000', api_int_path: 'api_hiden' },
|
10
|
-
'cad_int' => { k8s_service: 'http://core-web:3000', api_int_path: 'api_int' },
|
12
|
+
# 'olc_int' => { k8s_service: 'http://core-web:3000', api_int_path: 'api_hiden' },
|
13
|
+
# 'cad_int' => { k8s_service: 'http://core-web:3000', api_int_path: 'api_int' },
|
11
14
|
'val' => { k8s_service: 'http://val:8000', api_int_path: 'api' },
|
12
15
|
}.freeze
|
13
16
|
|
@@ -35,6 +38,7 @@ module ApiSixClient
|
|
35
38
|
|
36
39
|
def intranet_connection?
|
37
40
|
return false if ENV['RAILS_ENV'] == 'development'
|
41
|
+
return false if Rails.application.class.to_s.split('::').first.in?(APP_OUTSIDE_K8S)
|
38
42
|
|
39
43
|
current_service.present?
|
40
44
|
end
|
@@ -42,6 +46,7 @@ module ApiSixClient
|
|
42
46
|
private
|
43
47
|
def current_service
|
44
48
|
service_name = self.class.name.demodulize.underscore
|
49
|
+
return nil if service_name.in?(SERVICES_OUTSIDE_K8S)
|
45
50
|
|
46
51
|
INTRANET_MAPPING[service_name] || DEFAULT_INTRANET_MAPPING.call(service_name)
|
47
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_six_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Dobrorodnov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|