tramway-api 1.8.6.10 → 1.8.6.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df04e623451ee6c2e632f318925f3f0c90a3f75af5f50fdbf4dba7b44642d90e
|
4
|
+
data.tar.gz: c5c71de5a66e7821b648cb2a2c501e4df11c1f3e2745015fb8c1ed050c2a8e99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 882cefd561e168aabca2c72eaff7eb5f5781f88659cc7c7f6ebc8431c90d2ff7fde947bae8f6977cf6fe392c5473a27543769eb09ebd1268cda6713422f236b3
|
7
|
+
data.tar.gz: 2906e2e3d2d85dd9712091a1651c0ab3aabb797e810443e2513a3a1d97b07b896237e2745b19256af1e308739b2876dfbc0249efd76cce5c540d10a20211b737
|
@@ -23,6 +23,40 @@ module Tramway
|
|
23
23
|
hash
|
24
24
|
end
|
25
25
|
|
26
|
+
# Need to be removed
|
27
|
+
|
28
|
+
before_action :load_application
|
29
|
+
|
30
|
+
def load_application
|
31
|
+
if engine_loaded(request).present?
|
32
|
+
build_application_with_engine engine_loaded request
|
33
|
+
elsif application_class(request).present?
|
34
|
+
@application = application_class(request).camelize.constantize.first
|
35
|
+
else
|
36
|
+
@application = application_object request
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def build_application_with_engine(engine_loaded)
|
43
|
+
engine_module = "::Tramway::#{engine_loaded.camelize}".constantize
|
44
|
+
@application = "#{engine_module}::#{engine_module.application.to_s.camelize}".constantize.first
|
45
|
+
@application_engine = engine_loaded
|
46
|
+
end
|
47
|
+
|
48
|
+
def application_class(request)
|
49
|
+
Constraints::DomainConstraint.new(request.domain).application_class
|
50
|
+
end
|
51
|
+
|
52
|
+
def engine_loaded(request)
|
53
|
+
Constraints::DomainConstraint.new(request.domain).engine_loaded
|
54
|
+
end
|
55
|
+
|
56
|
+
def application_object(request)
|
57
|
+
Constraints::DomainConstraint.new(request.domain).application_object
|
58
|
+
end
|
59
|
+
|
26
60
|
private
|
27
61
|
|
28
62
|
def record
|
data/lib/tramway/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.6.
|
4
|
+
version: 1.8.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|