Skip to content

Commit

Permalink
Use HTTPS in all requests
Browse files Browse the repository at this point in the history
  • Loading branch information
armilam committed May 12, 2015
1 parent e640075 commit 37f55d5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GEM
git (>= 1.2.5)
rake
rdoc
json (1.7.7)
json (1.8.2)
metaclass (0.0.1)
mime-types (1.24)
mocha (0.10.5)
Expand Down
6 changes: 3 additions & 3 deletions lib/pipedrive/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module Pipedrive
class Base < OpenStruct

include HTTParty
base_uri 'api.pipedrive.com/v1'

base_uri 'https://api.pipedrive.com/v1'
headers HEADERS
format :json

Expand Down Expand Up @@ -107,7 +107,7 @@ def create( opts = {} )
bad_response(res,opts)
end
end

def find(id)
res = get "#{resource_path}/#{id}"
res.ok? ? new(res) : bad_response(res,id)
Expand Down
2 changes: 1 addition & 1 deletion test/test_pipedrive_authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestPipedriveAuthentication < Test::Unit::TestCase
should "send authentication token with each request" do
Pipedrive.authenticate("some-token")

stub_request(:get, "http://api.pipedrive.com/v1/?api_token=some-token").
stub_request(:get, "https://api.pipedrive.com/v1/?api_token=some-token").
with(:headers => {
'Accept'=>'application/json',
'Content-Type'=>'application/x-www-form-urlencoded',
Expand Down
2 changes: 1 addition & 1 deletion test/test_pipedrive_deal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup
"value" => "37k"
}

stub_request(:post, "http://api.pipedrive.com/v1/deals?api_token=some-token").
stub_request(:post, "https://api.pipedrive.com/v1/deals?api_token=some-token").
with(:body => body,
:headers => {
'Accept'=>'application/json',
Expand Down
2 changes: 1 addition & 1 deletion test/test_pipedrive_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup
# deal_id
}

stub_request(:post, "http://api.pipedrive.com/v1/notes?api_token=some-token").
stub_request(:post, "https://api.pipedrive.com/v1/notes?api_token=some-token").
with(:body => body, :headers => {
'Accept'=>'application/json',
'Content-Type'=>'application/x-www-form-urlencoded',
Expand Down
2 changes: 1 addition & 1 deletion test/test_pipedrive_organization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def setup
end

should "execute a valid person request" do
stub_request(:post, "http://api.pipedrive.com/v1/organizations?api_token=some-token").
stub_request(:post, "https://api.pipedrive.com/v1/organizations?api_token=some-token").
with(:body => {
"name" => "Dope.org"
},
Expand Down
2 changes: 1 addition & 1 deletion test/test_pipedrive_person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setup
"phone"=>["0123456789"]
}

stub_request(:post, "http://api.pipedrive.com/v1/persons?api_token=some-token").
stub_request(:post, "https://api.pipedrive.com/v1/persons?api_token=some-token").
with(:body => body, :headers => {
'Accept'=>'application/json',
'Content-Type'=>'application/x-www-form-urlencoded',
Expand Down

0 comments on commit 37f55d5

Please sign in to comment.