rack-autocrud 0.1.18 → 0.1.19

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.
Files changed (2) hide show
  1. data/lib/rack/autocrud.rb +7 -2
  2. metadata +3 -3
data/lib/rack/autocrud.rb CHANGED
@@ -206,10 +206,15 @@ module Rack
206
206
  end
207
207
  }
208
208
 
209
- # Now, call the endpoint class (assuming it will return a response)
209
+ # Now, save PATH_INFO, reset it, and call our endpoint
210
+ old_path_info = env['PATH_INFO']
210
211
  env['PATH_INFO'] = '/' + uri.join('/')
211
212
  env['CONTENT_TYPE'] = 'text/json'
212
- return endpoint_klass.call(env)
213
+ response = endpoint_klass.call(env)
214
+
215
+ # Restore PATH_INFO
216
+ env['PATH_INFO'] = old_path_info
217
+ return response
213
218
  end
214
219
 
215
220
  # Otherwise, pass the request down the chain...
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-autocrud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-25 00:00:00.000000000 Z
12
+ date: 2013-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 1.8.23
96
+ rubygems_version: 1.8.24
97
97
  signing_key:
98
98
  specification_version: 3
99
99
  summary: Rack middleware that automagically handles basic CRUD operations