satorix-common 1.1.5 → 1.1.6
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/satorix/common/domain_logic.rb +113 -0
- data/lib/satorix/common/version.rb +1 -1
- data/lib/satorix/common.rb +2 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c9ad063ec3347349875afce4b3aef622cd811babb58cbd38eca824786c5388c
|
4
|
+
data.tar.gz: e1fae4ef3b1423d7a4f24d712188052dc7528e9780372dceb6d1d7a734490840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dcd2e2596f2e8e0609d3e7951d587c5d892ec8230fee5a806c0bf113ec00eb8a7e006f306a69ad2fec434bbbf2c8a1541199493b53ae42478f47c3e88024c0b
|
7
|
+
data.tar.gz: b1627720a12f3d762c761e08b5d73f256b4aaa7d4c98d349b0b5c6561e2e6e8c68208f083012c73af2ef8615ccfb3b5f84a44e7e73aada9cb4e9a92aa8cbab51
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,113 @@
|
|
1
|
+
module Satorix
|
2
|
+
module Common
|
3
|
+
module DomainLogic
|
4
|
+
|
5
|
+
class << self
|
6
|
+
|
7
|
+
def api_domain_with_optional_port
|
8
|
+
"api.#{ cloud_domain_with_optional_port }"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def api_protocol
|
13
|
+
cloud_protocol # These are the same right now, this is deliberate.
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
def api_url(path = '')
|
18
|
+
"#{ api_protocol }#{ api_domain_with_optional_port }#{ path }"
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
def cloud_domain
|
23
|
+
secrets.satorix[:cloud_domain]
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
def cloud_domain_with_optional_port
|
28
|
+
"#{ cloud_domain }#{ optional_port(cloud_port) }"
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
def cloud_port
|
33
|
+
secrets.satorix[:cloud_port]
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
def cloud_protocol
|
38
|
+
secrets.satorix[:cloud_protocol]
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
def dashboard_domain
|
43
|
+
secrets.satorix[:dashboard_domain]
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
def dashboard_domain_with_optional_port
|
48
|
+
"#{ dashboard_domain }#{ optional_port(dashboard_port) }"
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
def dashboard_port
|
53
|
+
secrets.satorix[:dashboard_port]
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
def dashboard_protocol
|
58
|
+
secrets.satorix[:dashboard_protocol]
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
def dashboard_url
|
63
|
+
"#{ dashboard_protocol }#{ dashboard_domain_with_optional_port }"
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
def gitlab_domain
|
68
|
+
cloud_domain # These are the same right now, this is deliberate.
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
def gitlab_domain_prefix
|
73
|
+
secrets.gitlab[:domain_prefix]
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
def gitlab_domain_with_optional_port
|
78
|
+
"#{ gitlab_domain }#{ optional_port(gitlab_port) }"
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
def gitlab_port
|
83
|
+
secrets.gitlab[:port]
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
def gitlab_protocol
|
88
|
+
secrets.gitlab[:protocol]
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
def website_url(path = '')
|
93
|
+
"#{ secrets.satorix[:website_url] }#{ path }"
|
94
|
+
end
|
95
|
+
|
96
|
+
|
97
|
+
private
|
98
|
+
|
99
|
+
|
100
|
+
def optional_port(configuration_setting)
|
101
|
+
[nil, ''].include?(configuration_setting) ? '' : ":#{ configuration_setting }"
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
def secrets
|
106
|
+
::Rails.application.secrets
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
data/lib/satorix/common.rb
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
require 'satorix/common/console'
|
2
|
+
require 'satorix/common/domain_logic'
|
2
3
|
require 'satorix/common/pricing'
|
3
4
|
require 'satorix/common/version'
|
4
5
|
|
5
|
-
|
6
6
|
module Satorix
|
7
7
|
module Common
|
8
|
-
class Error < StandardError;
|
9
|
-
end
|
10
|
-
|
8
|
+
class Error < StandardError; end
|
11
9
|
|
12
10
|
end
|
13
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satorix-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Internet Exposure
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,6 +44,7 @@ files:
|
|
44
44
|
- bin/setup
|
45
45
|
- lib/satorix/common.rb
|
46
46
|
- lib/satorix/common/console.rb
|
47
|
+
- lib/satorix/common/domain_logic.rb
|
47
48
|
- lib/satorix/common/pricing.rb
|
48
49
|
- lib/satorix/common/version.rb
|
49
50
|
- satorix-common.gemspec
|