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: e98183a856071ce3d105c36adc9aa22a8ee7071b93958fd70fb673d2735b3977
4
- data.tar.gz: 80464931a1362c4d845ffee737ed7aa1e46693136023b1f08006c49de98e62eb
3
+ metadata.gz: 773b982037081f5d6dfb045378a35b2854a251d9e238cd58dd0b1216c75e86c5
4
+ data.tar.gz: a7177673edea3b8f05055683972b918bf43255ad68fc21688317ec5ed56dbb7b
5
5
  SHA512:
6
- metadata.gz: 8c32fc631e3af6348a871094dde31452d4a6fdef834596933e179d2acdbbd4935751715007fa7c4dcfce3639ebbd55f61b15f06428015647e4cbcac590ef7aaf
7
- data.tar.gz: 23968940c6f1dfb500be5ab479c1d524cdc9f80e40808b4ff08d7f4b03c97baad603d97504c58a5300ddfa7ec9b1a4b5bd44a24a6a4a15776a82778ef2a0c324
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 !@data.key?('config_route') || !@data['config_route']
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: remote_config_host.chomp('/'),
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: @data['config_route'].chomp('/'),
72
+ host: remote_config_host.chomp('/'),
72
73
  project_id: @project_id,
73
74
  )
74
75
  end
@@ -3,7 +3,7 @@
3
3
  module Airbrake
4
4
  # @return [String] the library version
5
5
  # @api public
6
- AIRBRAKE_RUBY_VERSION = '5.0.0'.freeze
6
+ AIRBRAKE_RUBY_VERSION = '5.0.1'.freeze
7
7
 
8
8
  # @return [Hash{Symbol=>String}] the information about the notifier library
9
9
  # @since 5.0.0
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.