From 04942a20c751596ade327f9ae1cf9377e8373487 Mon Sep 17 00:00:00 2001 From: Roman Gusev Date: Sat, 12 Oct 2013 00:53:22 +0400 Subject: [PATCH] Update path to get the XML for a specific error --- lib/airbrake-api/client.rb | 2 +- spec/airbrake_api/client_spec.rb | 2 +- spec/airbrake_api/error_spec.rb | 2 +- spec/spec_helper.rb | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/airbrake-api/client.rb b/lib/airbrake-api/client.rb index a1f542d..fddb8dd 100644 --- a/lib/airbrake-api/client.rb +++ b/lib/airbrake-api/client.rb @@ -58,7 +58,7 @@ def projects(options = {}) # errors def unformatted_error_path(error_id) - "/groups/#{error_id}" + "/errors/#{error_id}" end def error_path(error_id) diff --git a/spec/airbrake_api/client_spec.rb b/spec/airbrake_api/client_spec.rb index 1054a4c..241f181 100644 --- a/spec/airbrake_api/client_spec.rb +++ b/spec/airbrake_api/client_spec.rb @@ -219,7 +219,7 @@ end it 'generates web urls for individual errors' do - @client.url_for(:error, 1696171).should eq('http://myapp.airbrake.io/groups/1696171') + @client.url_for(:error, 1696171).should eq('http://myapp.airbrake.io/errors/1696171') end it 'generates web urls for notices' do diff --git a/spec/airbrake_api/error_spec.rb b/spec/airbrake_api/error_spec.rb index afe0f11..acd11e2 100644 --- a/spec/airbrake_api/error_spec.rb +++ b/spec/airbrake_api/error_spec.rb @@ -12,7 +12,7 @@ end it "should generate correct error path given an id" do - AirbrakeAPI::Error.error_path(1234).should == "/groups/1234.xml" + AirbrakeAPI::Error.error_path(1234).should == '/errors/1234.xml' end describe '.find' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 106a859..236459b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -25,9 +25,9 @@ def fixture_request(verb, url, file) # errors fixture_request :get, 'http://myapp.airbrake.io/groups.xml?auth_token=abcdefg123456', 'errors.xml' fixture_request :get, "http://myapp.airbrake.io/groups.xml?auth_token=abcdefg123456&page=2", 'paginated_errors.xml' -fixture_request :get, "http://myapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg123456", 'individual_error.xml' -fixture_request :put, 'http://myapp.airbrake.io/groups/1696170?auth_token=abcdefg123456', 'update_error.xml' -fixture_request :get, 'https://anapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg', 'individual_error.xml' +fixture_request :get, 'http://myapp.airbrake.io/errors/1696170.xml?auth_token=abcdefg123456', 'individual_error.xml' +fixture_request :put, 'http://myapp.airbrake.io/errors/1696170?auth_token=abcdefg123456', 'update_error.xml' +fixture_request :get, 'https://anapp.airbrake.io/errors/1696170.xml?auth_token=abcdefg', 'individual_error.xml' # notices fixture_request :get, "http://myapp.airbrake.io/groups/1696170/notices.xml?auth_token=abcdefg123456", 'notices.xml' @@ -51,5 +51,5 @@ def fixture_request(verb, url, file) fixture_request :get, "http://myapp.airbrake.io/projects/67890/deploys.xml?auth_token=abcdefg123456", 'empty_deploys.xml' # ssl responses -fixture_request :get, "https://sslapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg123456", 'individual_error.xml' -FakeWeb.register_uri(:get, "http://sslapp.airbrake.io/groups/1696170.xml?auth_token=abcdefg123456", DEFAULTS.merge(:body => " ", :status => ["403", "Forbidden"])) +fixture_request :get, "https://sslapp.airbrake.io/errors/1696170.xml?auth_token=abcdefg123456", 'individual_error.xml' +FakeWeb.register_uri(:get, "http://sslapp.airbrake.io/errors/1696170.xml?auth_token=abcdefg123456", DEFAULTS.merge(:body => " ", :status => ["403", "Forbidden"]))