dvr 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dvr/episode.rb +6 -1
- data/lib/dvr/version.rb +1 -1
- metadata +3 -3
data/lib/dvr/episode.rb
CHANGED
@@ -24,7 +24,7 @@ module DVR
|
|
24
24
|
data.map do |req|
|
25
25
|
{
|
26
26
|
:method => req['request_method'].downcase,
|
27
|
-
:path => req
|
27
|
+
:path => build_request_path(req),
|
28
28
|
:response => build_response(req)
|
29
29
|
}
|
30
30
|
end
|
@@ -34,6 +34,11 @@ module DVR
|
|
34
34
|
content.fetch('requests')
|
35
35
|
end
|
36
36
|
|
37
|
+
def build_request_path req
|
38
|
+
path = ['POST', 'PATCH', 'DELETE'].include?(req['request_method']) ? "/#{req['request_path']}" : req['request_path']
|
39
|
+
path.gsub('?', '/')
|
40
|
+
end
|
41
|
+
|
37
42
|
def build_response req
|
38
43
|
OpenStruct.new(
|
39
44
|
:status_code => req['response_status'],
|
data/lib/dvr/version.rb
CHANGED
metadata
CHANGED