Skip to content

Commit

Permalink
Bump ameba to ~> 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Jan 11, 2024
1 parent 30d884f commit 6200a15
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Documentation/DocumentationAdmonition:
Timezone: UTC
Excluded:
- src/raven/integrations/lucky.cr
- src/raven/processors/sanitize_data.cr
- src/raven/log_backend.cr
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ development_dependencies:
version: ~> 0.5.0
ameba:
github: crystal-ameba/ameba
version: ~> 1.5.0
version: ~> 1.6.0

targets:
crash_handler:
Expand Down
6 changes: 3 additions & 3 deletions spec/raven/breadcrumb_buffer_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ describe Raven::BreadcrumbBuffer do
breadcrumbs.empty?.should be_true

crumb = nil
breadcrumbs.record do |b|
b.message = "test"
crumb = b
breadcrumbs.record do |breadcrumb|
breadcrumb.message = "test"
crumb = breadcrumb
end

breadcrumbs.empty?.should be_false
Expand Down
1 change: 1 addition & 0 deletions src/crash_handler.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "./raven"

# ameba:disable Naming/BlockParameterName
Log.setup do |c|
level = case
when {{ flag?(:release) }} then Log::Severity::None
Expand Down
4 changes: 3 additions & 1 deletion src/raven/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ module Raven
end

private def encode(data)
data = @processors.reduce(data) { |v, p| p.process(v) }
data = @processors.reduce(data) do |v, processor|
processor.process(v)
end

io = IO::Memory.new
data.to_json(io)
Expand Down
2 changes: 1 addition & 1 deletion src/raven/mixins/initialize_with.cr
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Raven
{% begin %}
{%
properties = @type.methods
.select { |m| m.name.ends_with?('=') && m.args.size == 1 }
.select { |method| method.name.ends_with?('=') && method.args.size == 1 }
.map(&.name[0...-1].symbolize)
.uniq
%}
Expand Down
2 changes: 1 addition & 1 deletion src/raven/processors/http_headers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Raven

private getter fields_pattern : Regex {
fields = DEFAULT_FIELDS | sanitize_http_headers
fields.map! { |f| use_boundary?(f) ? /\b#{f}\b/ : f }
fields.map! { |field| use_boundary?(field) ? /\b#{field}\b/ : field }
Regex.union(fields)
}

Expand Down
2 changes: 1 addition & 1 deletion src/raven/processors/sanitize_data.cr
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module Raven
private getter fields_pattern : Regex {
fields = DEFAULT_FIELDS | sanitize_fields
fields -= sanitize_fields_excluded
fields.map! { |f| use_boundary?(f) ? /\b#{f}\b/ : f }
fields.map! { |field| use_boundary?(field) ? /\b#{field}\b/ : field }
Regex.union(fields)
}

Expand Down

0 comments on commit 6200a15

Please sign in to comment.