From 7fd1c8e9a753d83c066d86f31e87a4699a3d0855 Mon Sep 17 00:00:00 2001 From: bapirex Date: Tue, 27 Sep 2016 13:02:17 -0700 Subject: [PATCH 1/2] Use Addressable instead of URI in client.rb --- VERSION | 2 +- lib/reverse_proxy/client.rb | 2 +- rails-reverse-proxy.gemspec | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 5d4294b..cb0c939 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.1 \ No newline at end of file +0.5.2 diff --git a/lib/reverse_proxy/client.rb b/lib/reverse_proxy/client.rb index 0916da9..1cc5bea 100644 --- a/lib/reverse_proxy/client.rb +++ b/lib/reverse_proxy/client.rb @@ -45,7 +45,7 @@ module ReverseProxy source_request = Rack::Request.new(env) # We can pass in a custom path - uri = URI.parse("#{url}#{options[:path] || env['ORIGINAL_FULLPATH']}") + uri = Addressable::URI.parse("#{url}#{options[:path] || env['ORIGINAL_FULLPATH']}") # Initialize request target_request = Net::HTTP.const_get(source_request.request_method.capitalize).new(uri.request_uri) diff --git a/rails-reverse-proxy.gemspec b/rails-reverse-proxy.gemspec index 49b6d32..caf22c0 100644 --- a/rails-reverse-proxy.gemspec +++ b/rails-reverse-proxy.gemspec @@ -2,16 +2,16 @@ # DO NOT EDIT THIS FILE DIRECTLY # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- -# stub: rails-reverse-proxy 0.5.1 ruby lib +# stub: rails-reverse-proxy 0.5.2 ruby lib Gem::Specification.new do |s| s.name = "rails-reverse-proxy" - s.version = "0.5.1" + s.version = "0.5.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["James Hu"] - s.date = "2016-09-14" + s.date = "2016-09-27" s.description = "Reverse proxy for Ruby on Rails" s.email = "hello@james.hu" s.extra_rdoc_files = [ From b027a79c42f038083df5c9236a234c6f77018a94 Mon Sep 17 00:00:00 2001 From: bapirex Date: Fri, 30 Sep 2016 08:53:49 -0700 Subject: [PATCH 2/2] Require addressable in client.rb and Revert gemspec --- lib/reverse_proxy/client.rb | 1 + rails-reverse-proxy.gemspec | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/reverse_proxy/client.rb b/lib/reverse_proxy/client.rb index 1cc5bea..662fcc4 100644 --- a/lib/reverse_proxy/client.rb +++ b/lib/reverse_proxy/client.rb @@ -1,5 +1,6 @@ require 'rack' require 'rack-proxy' +require 'addressable/uri' module ReverseProxy class Client diff --git a/rails-reverse-proxy.gemspec b/rails-reverse-proxy.gemspec index caf22c0..49b6d32 100644 --- a/rails-reverse-proxy.gemspec +++ b/rails-reverse-proxy.gemspec @@ -2,16 +2,16 @@ # DO NOT EDIT THIS FILE DIRECTLY # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- -# stub: rails-reverse-proxy 0.5.2 ruby lib +# stub: rails-reverse-proxy 0.5.1 ruby lib Gem::Specification.new do |s| s.name = "rails-reverse-proxy" - s.version = "0.5.2" + s.version = "0.5.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["James Hu"] - s.date = "2016-09-27" + s.date = "2016-09-14" s.description = "Reverse proxy for Ruby on Rails" s.email = "hello@james.hu" s.extra_rdoc_files = [