mirror of
https://gitea.invidious.io/iv-org/shard-backtracer.cr.git
synced 2024-08-15 00:53:13 +00:00
Bump ameba dependency and fix found issues
This commit is contained in:
parent
8410b11478
commit
a7eed4b230
5 changed files with 11 additions and 7 deletions
3
.ameba.yml
Normal file
3
.ameba.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
Lint/NotNil:
|
||||
Excluded:
|
||||
- spec/backtracer/backtrace/frame/parser_spec.cr
|
|
@ -7,7 +7,7 @@ authors:
|
|||
development_dependencies:
|
||||
ameba:
|
||||
github: crystal-ameba/ameba
|
||||
version: ~> 1.2.0
|
||||
version: ~> 1.4.0
|
||||
|
||||
crystal: ">= 0.35.0"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "../../../spec_helper"
|
||||
|
||||
def with_foo_context
|
||||
def with_foo_context(&)
|
||||
yield Backtracer::Backtrace::Frame::Context.new(
|
||||
lineno: 10,
|
||||
pre: %w[foo bar baz],
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
require "spec"
|
||||
require "../src/backtracer"
|
||||
|
||||
def with_configuration(shared = true)
|
||||
def with_configuration(shared = true, &)
|
||||
yield shared ? Backtracer.configuration : Backtracer::Configuration.new
|
||||
end
|
||||
|
||||
def with_backtrace(backtrace, **options)
|
||||
def with_backtrace(backtrace, **options, &)
|
||||
yield Backtracer::Backtrace::Parser.parse(backtrace, **options)
|
||||
end
|
||||
|
||||
def with_frame(method, path = nil, lineno = nil, column = nil, **options)
|
||||
def with_frame(method, path = nil, lineno = nil, column = nil, **options, &)
|
||||
line = String.build do |io|
|
||||
if path
|
||||
io << path
|
||||
|
@ -28,7 +28,8 @@ def with_foo_frame(
|
|||
path = "#{__DIR__}/foo.cr",
|
||||
lineno = 1,
|
||||
column = 7,
|
||||
**options
|
||||
**options,
|
||||
&
|
||||
)
|
||||
with_frame(method, path, lineno, column, **options) do |frame|
|
||||
yield frame
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Backtracer
|
||||
class_getter(configuration) { Configuration.new }
|
||||
|
||||
def self.configure : Nil
|
||||
def self.configure(&) : Nil
|
||||
yield configuration
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue