airbrake-ruby 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 773b982037081f5d6dfb045378a35b2854a251d9e238cd58dd0b1216c75e86c5
|
4
|
+
data.tar.gz: a7177673edea3b8f05055683972b918bf43255ad68fc21688317ec5ed56dbb7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e377bdd85f7aa912cc9341834f9413ec5a89b71bbe2acf561118be97a911baef6c7cc210fa2430e286d135ce829ca7009110180c5938ac7017a403d7be239de
|
7
|
+
data.tar.gz: b9e6812ed5d2734c7fd3ffd83b14e5d366594366c5460244e43d13375ede211c56d4e1a3b4c79b613de0d480493d9950a833670bb2f59161f1d0db051936b0a1
|
@@ -58,17 +58,18 @@ module Airbrake
|
|
58
58
|
# @param [String] remote_config_host
|
59
59
|
# @return [String] where the config is stored on S3.
|
60
60
|
def config_route(remote_config_host)
|
61
|
-
if
|
61
|
+
if @data.key?('config_route') &&
|
62
|
+
@data['config_route'] && !@data['config_route'].empty?
|
62
63
|
return format(
|
63
64
|
CONFIG_ROUTE_PATTERN,
|
64
|
-
host:
|
65
|
+
host: @data['config_route'].chomp('/'),
|
65
66
|
project_id: @project_id,
|
66
67
|
)
|
67
68
|
end
|
68
69
|
|
69
70
|
format(
|
70
71
|
CONFIG_ROUTE_PATTERN,
|
71
|
-
host:
|
72
|
+
host: remote_config_host.chomp('/'),
|
72
73
|
project_id: @project_id,
|
73
74
|
)
|
74
75
|
end
|
@@ -102,7 +102,7 @@ RSpec.describe Airbrake::RemoteSettings::SettingsData do
|
|
102
102
|
context "and when the remote host doesn't with a slash" do
|
103
103
|
let(:host) { 'http://example.com' }
|
104
104
|
|
105
|
-
it "returns the route with the host" do
|
105
|
+
it "returns the route with the given host" do
|
106
106
|
expect(described_class.new(project_id, {}).config_route(host)).to eq(
|
107
107
|
"http://example.com/2020-06-18/config/#{project_id}/config.json",
|
108
108
|
)
|
@@ -122,6 +122,19 @@ RSpec.describe Airbrake::RemoteSettings::SettingsData do
|
|
122
122
|
)
|
123
123
|
end
|
124
124
|
end
|
125
|
+
|
126
|
+
context "when the given remote host in the remote config is an empty string" do
|
127
|
+
let(:data) do
|
128
|
+
{ 'config_route' => '' }
|
129
|
+
end
|
130
|
+
|
131
|
+
it "returns the route with the default instead" do
|
132
|
+
expect(described_class.new(project_id, data).config_route(host)).to eq(
|
133
|
+
'https://v1-production-notifier-configs.s3.amazonaws.com/' \
|
134
|
+
"2020-06-18/config/#{project_id}/config.json",
|
135
|
+
)
|
136
|
+
end
|
137
|
+
end
|
125
138
|
end
|
126
139
|
|
127
140
|
describe "#error_notifications?" do
|