Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

railsbp.com uses http instead of https

  • Loading branch information...
commit 2714ef81d325a2d5aa6c13d0df6f3bd2702fdf1c 1 parent 43a8106
@flyerhzm flyerhzm authored
View
4 app/controllers/proxy_controller.rb
@@ -1,5 +1,4 @@
require 'net/http'
-require 'net/https'
class ProxyController < ApplicationController
def hook
@@ -53,8 +52,7 @@ def configs
end
def send_request(extra_params)
- http = Net::HTTP.new('railsbp.com', 443)
- http.use_ssl = true
+ http = Net::HTTP.new('railsbp.com', 80)
http.post("/sync_proxy", request_params.merge(extra_params).map { |key, value| "#{key}=#{value}" }.join("&"))
end
View
4 test/functional/proxy_controller_test.rb
@@ -2,7 +2,7 @@
class ProxyControllerTest < ActionController::TestCase
def setup
- stub_http_request(:post, "https://railsbp.com/sync_proxy")
+ stub_http_request(:post, "http://railsbp.com/sync_proxy")
end
def test_hook_without_token
@@ -27,7 +27,7 @@ def test_hook_success
end
def test_hook_failure
- Git.expects(:clone).raises(Exception, "test")
+ Git::Base.any_instance.expects(:reset_hard).raises(Exception, "test")
post :hook, :token => "1234567890", :payload => payload_body.sub("develop", "master")
assert_equal "failure", response.body
end
Please sign in to comment.
Something went wrong with that request. Please try again.