mirror of
https://gitea.invidious.io/iv-org/shard-backtracer.cr.git
synced 2024-08-15 00:53:13 +00:00
Remove redundant Configuration#in_app_pattern
This commit is contained in:
parent
8ad814c7c1
commit
c41fcb5d28
2 changed files with 4 additions and 9 deletions
|
@ -91,9 +91,9 @@ module Backtracer
|
||||||
# Returns `true` if this frame originated from the app source code,
|
# Returns `true` if this frame originated from the app source code,
|
||||||
# `false` otherwise.
|
# `false` otherwise.
|
||||||
#
|
#
|
||||||
# See `Configuration#in_app_pattern`
|
# See `Configuration#app_dirs_pattern`
|
||||||
def in_app? : Bool
|
def in_app? : Bool
|
||||||
!!(path.try(&.matches?(configuration.in_app_pattern)))
|
!!(relative_path.try(&.matches?(configuration.app_dirs_pattern)))
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns a tuple consisting of 3 elements - an array of context lines
|
# Returns a tuple consisting of 3 elements - an array of context lines
|
||||||
|
|
|
@ -53,7 +53,7 @@ module Backtracer
|
||||||
/^(?<method>.+?)$/,
|
/^(?<method>.+?)$/,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Used in `#in_app_pattern`.
|
# Path considered as "root" of your project.
|
||||||
#
|
#
|
||||||
# See `Frame#under_src_path?`
|
# See `Frame#under_src_path?`
|
||||||
property src_path : String? = {{ Process::INITIAL_PWD }}
|
property src_path : String? = {{ Process::INITIAL_PWD }}
|
||||||
|
@ -63,12 +63,7 @@ module Backtracer
|
||||||
# to set this to something like `/(src|engines)/`
|
# to set this to something like `/(src|engines)/`
|
||||||
#
|
#
|
||||||
# See `Frame#in_app?`
|
# See `Frame#in_app?`
|
||||||
property app_dirs_pattern = /src/
|
property app_dirs_pattern = /^src\//
|
||||||
|
|
||||||
# `Regex` pattern matched against `Backtrace::Frame#path`.
|
|
||||||
#
|
|
||||||
# See `Frame#in_app?`
|
|
||||||
property in_app_pattern : Regex { /^(#{src_path}\/)?(#{app_dirs_pattern})/ }
|
|
||||||
|
|
||||||
# Path pattern matching directories to be recognized as your app modules.
|
# Path pattern matching directories to be recognized as your app modules.
|
||||||
# Defaults to standard Shards setup (`lib/shard-name/...`).
|
# Defaults to standard Shards setup (`lib/shard-name/...`).
|
||||||
|
|
Loading…
Reference in a new issue