distributed-press-api-client 0.5.0rc0 → 0.5.0rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/distributed_press/v1/social/client.rb +20 -10
- data/lib/distributed_press/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd36188ea41206127dc73adb68060bb2d597b108668e5d7735e01487b3fcca22
|
4
|
+
data.tar.gz: 79eb79b794953204f07574444d5d02d4678011005b7401873938094f24ab9f80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e9175c76c9ecba06bfb2d00d7c5a55398cd71cb7819cade5f1a0158bffabe879aacdabf2cc09a06192f7a7096903c86d7cec91460d979f6472e83e91726a51
|
7
|
+
data.tar.gz: 74ccef6f5af3bc9b7c6d11c54ebc5df2501d940a1af8fc19690d95e9ffb918fa97b4c81c6de717863fb9d8a2dde07548be4bba10ea625ef6f140127e885d8642
|
@@ -174,7 +174,26 @@ class DistributedPress
|
|
174
174
|
#
|
175
175
|
# @return [String]
|
176
176
|
def host
|
177
|
-
@host ||=
|
177
|
+
@host ||= uri.host
|
178
|
+
end
|
179
|
+
|
180
|
+
# If the endpoint is on a subdirectory, we need the absolute
|
181
|
+
# path for signing
|
182
|
+
#
|
183
|
+
# @param :endpoint [String]
|
184
|
+
# @return [String]
|
185
|
+
def absolute_endpoint(endpoint)
|
186
|
+
"#{uri.path}/#{endpoint}".squeeze('/')
|
187
|
+
end
|
188
|
+
|
189
|
+
# Absolute URL for an endpoint
|
190
|
+
#
|
191
|
+
# @param :endpoint [String]
|
192
|
+
# @return [String]
|
193
|
+
def absolute_url(endpoint)
|
194
|
+
uri.dup.tap do |u|
|
195
|
+
u.path = absolute_endpoint(endpoint)
|
196
|
+
end.to_s
|
178
197
|
end
|
179
198
|
|
180
199
|
private
|
@@ -254,15 +273,6 @@ class DistributedPress
|
|
254
273
|
nil
|
255
274
|
end
|
256
275
|
|
257
|
-
# If the endpoint is on a subdirectory, we need the absolute
|
258
|
-
# path for signing
|
259
|
-
#
|
260
|
-
# @param :endpoint [String]
|
261
|
-
# @return [String]
|
262
|
-
def absolute_endpoint(endpoint)
|
263
|
-
"#{uri.path}/#{endpoint}".squeeze('/')
|
264
|
-
end
|
265
|
-
|
266
276
|
# Brotli available
|
267
277
|
def brotli?
|
268
278
|
begin
|