Skip to content

Commit

Permalink
Merge pull request #81 from Sija/develop
Browse files Browse the repository at this point in the history
v1.9.1
  • Loading branch information
Sija authored Jan 27, 2021
2 parents 457e53a + 52da352 commit 00e1f57
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
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.9.0
version: 1.9.1

authors:
- Sijawusz Pur Rahnama <sija@sija.pl>
Expand Down
2 changes: 1 addition & 1 deletion src/raven/integrations/http/handler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module Raven
end

protected def cookies_to_string(cookies : HTTP::Cookies)
cookies.to_h.map(&.last.to_cookie_header).join "; "
cookies.to_h.join("; ") { |_, cookie| cookie.to_cookie_header }
end

abstract def build_raven_culprit_context(context : HTTP::Server::Context)
Expand Down
4 changes: 2 additions & 2 deletions src/raven/interfaces/message.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module Raven
end

def unformatted_message
if params = @params
params.empty? ? message? : message?.try { |m| m % params }
if (params = @params) && !params.empty?
message?.try(&.% params)
else
message?
end
Expand Down
2 changes: 1 addition & 1 deletion src/raven/log_backend.cr
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module Raven
# See `Event#logger`, `Breadcrumb#category`
property default_logger : String

{% if compare_versions(Crystal::VERSION, "1.0.0-dev") >= 0 %}
{% if compare_versions(Crystal::VERSION, "0.35.1") > 0 %}
def initialize(
dispatch_mode : ::Log::DispatchMode = :sync,
*,
Expand Down
6 changes: 3 additions & 3 deletions src/raven/processors/utf8_conversion.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ module Raven
when Exception
return data unless message = data.message
return data if message.valid_encoding?
data.class.new(clean_invalid_utf8_bytes(message), data.cause).tap do |ex|
ex.callstack = data.callstack
end
data.class
.new(clean_invalid_utf8_bytes(message), data.cause)
.tap(&.callstack=(data.callstack))
when String
return data if data.valid_encoding?
clean_invalid_utf8_bytes(data)
Expand Down

0 comments on commit 00e1f57

Please sign in to comment.