rails-reverse-proxy 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +31 -27
- data/README.md +8 -1
- data/VERSION +1 -1
- data/lib/reverse_proxy/client.rb +2 -0
- data/rails-reverse-proxy.gemspec +6 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fe15878d26cc9bdd9af0efc8adc987cb4c3c455
|
4
|
+
data.tar.gz: dce227c69d94a0d8e2731d412faa22a6021cb801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0a51d99e16f5da5a4409e8d9b7ffb7f4b4dd14fd87b1575456862f820bb43e91a00545cc0f54e653ac4066ecd46cfe62bc6b20ead230348ea69e9a97898617
|
7
|
+
data.tar.gz: 52e8956c611ff5fbe802f3b079aa4766b00e3b0d0ed7694f1819a22da33d6513ac48be56c68e5d5751de20969bcd647ff7cf9765ceec164873b56e85fbead752
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -36,59 +36,62 @@ GEM
|
|
36
36
|
minitest (~> 5.1)
|
37
37
|
thread_safe (~> 0.3, >= 0.3.4)
|
38
38
|
tzinfo (~> 1.1)
|
39
|
-
addressable (2.
|
39
|
+
addressable (2.5.0)
|
40
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
40
41
|
arel (6.0.0)
|
41
|
-
builder (3.2.
|
42
|
+
builder (3.2.3)
|
42
43
|
descendants_tracker (0.0.4)
|
43
44
|
thread_safe (~> 0.3, >= 0.3.1)
|
44
45
|
docile (1.1.5)
|
45
46
|
erubis (2.7.0)
|
46
|
-
faraday (0.9.
|
47
|
+
faraday (0.9.2)
|
47
48
|
multipart-post (>= 1.2, < 3)
|
48
|
-
git (1.
|
49
|
-
github_api (0.
|
49
|
+
git (1.3.0)
|
50
|
+
github_api (0.11.3)
|
50
51
|
addressable (~> 2.3)
|
51
|
-
descendants_tracker (~> 0.0.
|
52
|
+
descendants_tracker (~> 0.0.1)
|
52
53
|
faraday (~> 0.8, < 0.10)
|
53
|
-
hashie (>=
|
54
|
+
hashie (>= 1.2)
|
54
55
|
multi_json (>= 1.7.5, < 2.0)
|
55
|
-
nokogiri (~> 1.6.
|
56
|
+
nokogiri (~> 1.6.0)
|
56
57
|
oauth2
|
57
58
|
globalid (0.3.5)
|
58
59
|
activesupport (>= 4.1.0)
|
59
|
-
hashie (3.
|
60
|
-
highline (1.7.
|
60
|
+
hashie (3.5.5)
|
61
|
+
highline (1.7.8)
|
61
62
|
i18n (0.7.0)
|
62
|
-
jeweler (2.
|
63
|
+
jeweler (2.1.2)
|
63
64
|
builder
|
64
65
|
bundler (>= 1.0)
|
65
66
|
git (>= 1.2.5)
|
66
|
-
github_api
|
67
|
+
github_api (~> 0.11.0)
|
67
68
|
highline (>= 1.6.15)
|
68
69
|
nokogiri (>= 1.5.10)
|
69
70
|
rake
|
70
71
|
rdoc
|
71
|
-
|
72
|
-
|
72
|
+
semver
|
73
|
+
json (1.8.6)
|
74
|
+
jwt (1.5.6)
|
73
75
|
loofah (2.0.2)
|
74
76
|
nokogiri (>= 1.5.9)
|
75
77
|
mail (2.6.3)
|
76
78
|
mime-types (>= 1.16, < 3)
|
77
79
|
mime-types (2.6.1)
|
78
|
-
|
80
|
+
mini_portile2 (2.1.0)
|
79
81
|
minitest (5.7.0)
|
80
|
-
multi_json (1.
|
81
|
-
multi_xml (0.
|
82
|
+
multi_json (1.12.1)
|
83
|
+
multi_xml (0.6.0)
|
82
84
|
multipart-post (2.0.0)
|
83
|
-
nokogiri (1.6.
|
84
|
-
|
85
|
-
oauth2 (1.
|
86
|
-
faraday (>= 0.8, < 0.
|
85
|
+
nokogiri (1.6.8.1)
|
86
|
+
mini_portile2 (~> 2.1.0)
|
87
|
+
oauth2 (1.3.1)
|
88
|
+
faraday (>= 0.8, < 0.12)
|
87
89
|
jwt (~> 1.0)
|
88
90
|
multi_json (~> 1.3)
|
89
91
|
multi_xml (~> 0.5)
|
90
|
-
rack (
|
91
|
-
|
92
|
+
rack (>= 1.2, < 3)
|
93
|
+
public_suffix (2.0.5)
|
94
|
+
rack (1.6.5)
|
92
95
|
rack-proxy (0.5.17)
|
93
96
|
rack
|
94
97
|
rack-test (0.6.3)
|
@@ -117,9 +120,10 @@ GEM
|
|
117
120
|
activesupport (= 4.2.1)
|
118
121
|
rake (>= 0.8.7)
|
119
122
|
thor (>= 0.18.1, < 2.0)
|
120
|
-
rake (
|
123
|
+
rake (12.0.0)
|
121
124
|
rdoc (3.12.2)
|
122
125
|
json (~> 1.4)
|
126
|
+
semver (1.0.1)
|
123
127
|
shoulda (3.5.0)
|
124
128
|
shoulda-context (~> 1.0, >= 1.0.1)
|
125
129
|
shoulda-matchers (>= 1.4.1, < 3.0)
|
@@ -138,7 +142,7 @@ GEM
|
|
138
142
|
activesupport (>= 3.0)
|
139
143
|
sprockets (>= 2.8, < 4.0)
|
140
144
|
thor (0.19.1)
|
141
|
-
thread_safe (0.3.
|
145
|
+
thread_safe (0.3.6)
|
142
146
|
tzinfo (1.2.2)
|
143
147
|
thread_safe (~> 0.1)
|
144
148
|
|
@@ -148,7 +152,7 @@ PLATFORMS
|
|
148
152
|
DEPENDENCIES
|
149
153
|
addressable
|
150
154
|
bundler (~> 1.0)
|
151
|
-
jeweler (~> 2.
|
155
|
+
jeweler (~> 2.1.2)
|
152
156
|
rack
|
153
157
|
rack-proxy
|
154
158
|
rails
|
@@ -157,4 +161,4 @@ DEPENDENCIES
|
|
157
161
|
simplecov
|
158
162
|
|
159
163
|
BUNDLED WITH
|
160
|
-
1.
|
164
|
+
1.14.5
|
data/README.md
CHANGED
@@ -64,6 +64,12 @@ If you'd like to bypass SSL verification
|
|
64
64
|
reverse_proxy "http://localhost:8000", verify_ssl: false
|
65
65
|
```
|
66
66
|
|
67
|
+
If you'd like to customize the options passed into the [HTTP session](https://ruby-doc.org/stdlib-2.4.0/libdoc/net/http/rdoc/Net/HTTP.html#start-method)
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
reverse_proxy "http://localhost:8000", http: { read_timeout: 20, open_timeout: 100 }
|
71
|
+
```
|
72
|
+
|
67
73
|
Use this method to determine what version you're running
|
68
74
|
|
69
75
|
```ruby
|
@@ -82,9 +88,10 @@ Special thanks to our contributors!
|
|
82
88
|
|
83
89
|
- [miyukki](https://github.com/miyukki)
|
84
90
|
- [bapirex](https://github.com/bapirex)
|
91
|
+
- [marcosbeirigo](https://github.com/marcosbeirigo)
|
92
|
+
- [avinashkoulavkar](https://github.com/avinashkoulavkar)
|
85
93
|
|
86
94
|
## Copyright
|
87
95
|
|
88
96
|
Copyright (c) 2016 James Hu. See [LICENSE](LICENSE) for
|
89
97
|
further details.
|
90
|
-
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
data/lib/reverse_proxy/client.rb
CHANGED
@@ -38,6 +38,7 @@ module ReverseProxy
|
|
38
38
|
def request(env, options = {}, &block)
|
39
39
|
options.reverse_merge!(
|
40
40
|
headers: {},
|
41
|
+
http: {},
|
41
42
|
path: nil,
|
42
43
|
username: nil,
|
43
44
|
password: nil,
|
@@ -82,6 +83,7 @@ module ReverseProxy
|
|
82
83
|
http_options = {}
|
83
84
|
http_options[:use_ssl] = (uri.scheme == "https")
|
84
85
|
http_options[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if options[:verify_ssl]
|
86
|
+
http_options.merge!(options[:http]) if options[:http]
|
85
87
|
|
86
88
|
# Make the request
|
87
89
|
Net::HTTP.start(uri.hostname, uri.port, http_options) do |http|
|
data/rails-reverse-proxy.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: rails-reverse-proxy 0.
|
5
|
+
# stub: rails-reverse-proxy 0.8.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "rails-reverse-proxy"
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.8.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["James Hu"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2017-03-12"
|
15
15
|
s.description = "Reverse proxy for Ruby on Rails"
|
16
16
|
s.email = "hello@james.hu"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -49,7 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
50
50
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
51
51
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
52
|
-
s.add_development_dependency(%q<jeweler>, ["~> 2.
|
52
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.1.2"])
|
53
53
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
54
54
|
else
|
55
55
|
s.add_dependency(%q<rails>, [">= 0"])
|
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
|
|
59
59
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
60
60
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
61
61
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
62
|
-
s.add_dependency(%q<jeweler>, ["~> 2.
|
62
|
+
s.add_dependency(%q<jeweler>, ["~> 2.1.2"])
|
63
63
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
64
64
|
end
|
65
65
|
else
|
@@ -70,7 +70,7 @@ Gem::Specification.new do |s|
|
|
70
70
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
71
71
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
72
72
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
73
|
-
s.add_dependency(%q<jeweler>, ["~> 2.
|
73
|
+
s.add_dependency(%q<jeweler>, ["~> 2.1.2"])
|
74
74
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
75
75
|
end
|
76
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-reverse-proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Hu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 2.
|
117
|
+
version: 2.1.2
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 2.
|
124
|
+
version: 2.1.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: simplecov
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|