diff --git a/VERSION b/VERSION index 87a0871..1c09c74 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.3 \ No newline at end of file +0.3.3 diff --git a/lib/pipedrive/base.rb b/lib/pipedrive/base.rb index 9a0adb0..7bb2770 100644 --- a/lib/pipedrive/base.rb +++ b/lib/pipedrive/base.rb @@ -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 @@ -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) diff --git a/test/test_pipedrive_authentication.rb b/test/test_pipedrive_authentication.rb index f04c36a..4484c25 100644 --- a/test/test_pipedrive_authentication.rb +++ b/test/test_pipedrive_authentication.rb @@ -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', diff --git a/test/test_pipedrive_deal.rb b/test/test_pipedrive_deal.rb index 4f7ee9b..ba862e9 100644 --- a/test/test_pipedrive_deal.rb +++ b/test/test_pipedrive_deal.rb @@ -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', @@ -45,4 +45,4 @@ def setup #TODO # flunk "to be tested" end -end \ No newline at end of file +end diff --git a/test/test_pipedrive_note.rb b/test/test_pipedrive_note.rb index 848997c..16cd437 100644 --- a/test/test_pipedrive_note.rb +++ b/test/test_pipedrive_note.rb @@ -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', diff --git a/test/test_pipedrive_organization.rb b/test/test_pipedrive_organization.rb index 1e9dc86..add77f6 100644 --- a/test/test_pipedrive_organization.rb +++ b/test/test_pipedrive_organization.rb @@ -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" }, diff --git a/test/test_pipedrive_person.rb b/test/test_pipedrive_person.rb index 80df000..102e9a1 100644 --- a/test/test_pipedrive_person.rb +++ b/test/test_pipedrive_person.rb @@ -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',