Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.5.4 #58

Merged
merged 2 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: raven
version: 1.5.3
version: 1.5.4

authors:
- Sijawusz Pur Rahnama <sija@sija.pl>
Expand Down
8 changes: 5 additions & 3 deletions src/raven/transports/http.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module Raven
end
end

property client : ::HTTP::Client { build_client }

private def build_client
ssl = configuration.ssl
ssl = configuration.scheme == "https" if ssl.nil?
Expand Down Expand Up @@ -45,6 +43,8 @@ module Raven
str << params
end
logger.debug "HTTP Transport connecting to #{path}"

client = build_client
client.post(path, form: data, headers: headers).tap do |response|
raise Error.new response unless response.success?
end
Expand All @@ -55,7 +55,6 @@ module Raven
logger.debug "Event not sent: #{configuration.error_messages}"
return
end
logger.debug "HTTP Transport connecting to #{configuration.dsn}"

project_id = configuration.project_id
path = configuration.path.try &.chomp '/'
Expand All @@ -67,6 +66,9 @@ module Raven
if configuration.encoding.gzip?
headers["Content-Encoding"] = "gzip"
end
logger.debug "HTTP Transport connecting to #{configuration.dsn}"

client = build_client
client.post("#{path}/api/#{project_id}/store/", headers, data).tap do |response|
raise Error.new response unless response.success?
end
Expand Down
2 changes: 1 addition & 1 deletion src/raven/version.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Raven
VERSION = "1.5.3"
VERSION = "1.5.4"
end