rack-proxy 0.7.1 → 0.7.2
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 +4 -4
- data/.travis.yml +0 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/rack/proxy.rb +2 -2
- data/lib/rack_proxy_examples/example_service_proxy.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: 6cbdbb6efeff29ecbbd6dbebe7b67ac4c923fa0ab898d245a310fa872e6d9581
|
4
|
+
data.tar.gz: e21085cf4be6ec258b67ed91685086a8c0c5c0a83252a92c87853c5f3b79701e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eed533bedea80e3a485b9a61e6f5e55ab9480146eed5793c0aeb520cb348e86bdfa4a514467300b626f0b016760ce8ecb1a3318272d7cdcc5649c24131d7134
|
7
|
+
data.tar.gz: 4aea216293ead6071d44a1460b7c0f3f865e53d5332c994c441cbe956db6f57d67aa7b9b80a17bbd593676b2f651860f11f284c698200dbe4acfb0385ac00a15
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Installation
|
|
6
6
|
Add the following to your `Gemfile`:
|
7
7
|
|
8
8
|
```
|
9
|
-
gem 'rack-proxy', '~> 0.7.
|
9
|
+
gem 'rack-proxy', '~> 0.7.2'
|
10
10
|
```
|
11
11
|
|
12
12
|
Or install:
|
@@ -136,7 +136,7 @@ Test with `require 'rack_proxy_examples/example_service_proxy'`
|
|
136
136
|
# 1. rails new test_app
|
137
137
|
# 2. cd test_app
|
138
138
|
# 3. install Rack-Proxy in `Gemfile`
|
139
|
-
# a. `gem 'rack-proxy', '~> 0.7.
|
139
|
+
# a. `gem 'rack-proxy', '~> 0.7.2'`
|
140
140
|
# 4. install gem: `bundle install`
|
141
141
|
# 5. create `config/initializers/proxy.rb` adding this line `require 'rack_proxy_examples/example_service_proxy'`
|
142
142
|
# 6. run: `SERVICE_URL=http://guides.rubyonrails.org rails server`
|
data/lib/rack/proxy.rb
CHANGED
@@ -5,7 +5,7 @@ module Rack
|
|
5
5
|
|
6
6
|
# Subclass and bring your own #rewrite_request and #rewrite_response
|
7
7
|
class Proxy
|
8
|
-
VERSION = "0.7.
|
8
|
+
VERSION = "0.7.2"
|
9
9
|
|
10
10
|
class << self
|
11
11
|
def extract_http_request_headers(env)
|
@@ -89,7 +89,7 @@ module Rack
|
|
89
89
|
full_path = source_request.fullpath
|
90
90
|
end
|
91
91
|
|
92
|
-
target_request = Net::HTTP.const_get(source_request.request_method.capitalize).new(full_path)
|
92
|
+
target_request = Net::HTTP.const_get(source_request.request_method.capitalize, false).new(full_path)
|
93
93
|
|
94
94
|
# Setup headers
|
95
95
|
target_request.initialize_http_header(self.class.extract_http_request_headers(source_request.env))
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# 1. rails new test_app
|
6
6
|
# 2. cd test_app
|
7
7
|
# 3. install Rack-Proxy in `Gemfile`
|
8
|
-
# a. `gem 'rack-proxy', '~> 0.7.
|
8
|
+
# a. `gem 'rack-proxy', '~> 0.7.2'`
|
9
9
|
# 4. install gem: `bundle install`
|
10
10
|
# 5. create `config/initializers/proxy.rb` adding this line `require 'rack_proxy_examples/example_service_proxy'`
|
11
11
|
# 6. run: `SERVICE_URL=http://guides.rubyonrails.org rails server`
|