jsonapi-home 1.1.0 → 1.1.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3155fc99f48eaca180b2db1569b5aa51a3921df27a4477f6bdf664c0915e7710
|
|
4
|
+
data.tar.gz: 1cd90086362ead78267fd3ff44f2542da874b569ac2636f3a6d1c3253a8b7eb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bf84dc7c4b3857f869fbb5b6499bb869e87f14d918e47829350cca9601174a527e5b52d801faa0af5866e889f430bc85583447fdf736cf548d69b7ff3285914
|
|
7
|
+
data.tar.gz: 8e1ab265713c210c4c3fec8cdc2515133c2c7faf81d606c671fc27fedab44593701cafec82a4b01a5a958522e0166aea80e6c239d25e6c10db55921b201fc566
|
|
@@ -14,7 +14,6 @@ module JSONAPI
|
|
|
14
14
|
def index
|
|
15
15
|
realization = JSONAPI::Realizer.index(
|
|
16
16
|
params,
|
|
17
|
-
scope: JSONAPI::Home::V1::Resource.with(main_app.routes.url_helpers.root_url),
|
|
18
17
|
headers: request.headers,
|
|
19
18
|
type: :jsonapi_home_resources
|
|
20
19
|
)
|
|
@@ -25,7 +24,6 @@ module JSONAPI
|
|
|
25
24
|
def show
|
|
26
25
|
realization = JSONAPI::Realizer.show(
|
|
27
26
|
params,
|
|
28
|
-
scope: JSONAPI::Home::V1::Resource.with(jsonapi_home_url),
|
|
29
27
|
headers: request.headers,
|
|
30
28
|
type: :jsonapi_home_resources
|
|
31
29
|
)
|
|
@@ -22,14 +22,6 @@ module JSONAPI
|
|
|
22
22
|
all.index_by(&:id).fetch(id)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def self.with(url)
|
|
26
|
-
tap { @url = url }
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def self.url
|
|
30
|
-
@url
|
|
31
|
-
end
|
|
32
|
-
|
|
33
25
|
private_class_method def self.routes
|
|
34
26
|
[
|
|
35
27
|
*Rails.application.routes.routes.to_a,
|
|
@@ -100,7 +92,7 @@ module JSONAPI
|
|
|
100
92
|
private def location
|
|
101
93
|
configuration.fetch(:location) ||
|
|
102
94
|
ENV.fetch("HOME_LOCATION", nil) ||
|
|
103
|
-
|
|
95
|
+
raise StandardError, "need a location to function"
|
|
104
96
|
end
|
|
105
97
|
|
|
106
98
|
private def payload
|
data/lib/jsonapi/home/version.rb
CHANGED