From a9e0e90c74a5c942f5a68e0dde45b0081dcc2656 Mon Sep 17 00:00:00 2001 From: blecher eyal Date: Tue, 12 May 2015 16:31:03 +0300 Subject: [PATCH 1/3] Fix http deprecation by pipedrive --- lib/pipedrive/base.rb | 6 +++--- test/test_pipedrive_authentication.rb | 2 +- test/test_pipedrive_deal.rb | 4 ++-- test/test_pipedrive_note.rb | 2 +- test/test_pipedrive_organization.rb | 2 +- test/test_pipedrive_person.rb | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) 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', From 358d1e3e50c0ec2f2dfa51bc15c66d6f70aeab91 Mon Sep 17 00:00:00 2001 From: blecher eyal Date: Tue, 12 May 2015 16:32:04 +0300 Subject: [PATCH 2/3] Version bump to 0.4.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 87a0871..60a2d3e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.3 \ No newline at end of file +0.4.0 \ No newline at end of file From 067ceb9df0dcaf25b2001b6ccb7c673050981046 Mon Sep 17 00:00:00 2001 From: blecher eyal Date: Tue, 12 May 2015 16:33:59 +0300 Subject: [PATCH 3/3] version fix --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 60a2d3e..1c09c74 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.0 \ No newline at end of file +0.3.3