dvr 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/dvr/episode.rb +6 -1
  2. data/lib/dvr/version.rb +1 -1
  3. metadata +3 -3
@@ -24,7 +24,7 @@ module DVR
24
24
  data.map do |req|
25
25
  {
26
26
  :method => req['request_method'].downcase,
27
- :path => req['request_path'].gsub('?', '/'),
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'],
@@ -1,3 +1,3 @@
1
1
  module DVR
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kyle Conarro