Module: TenantCheck::StackTraceFilter

Defined in:
lib/tenant_check/stack_trace_fliter.rb

Class Method Summary collapse

Class Method Details

.filter_in_project(paths) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/tenant_check/stack_trace_fliter.rb', line 6

def filter_in_project(paths)
  app_root = defined?(Rails) ? Rails.root.to_s : Dir.pwd
  bundler_path = Bundler.bundle_path.to_s
  paths.select do |path|
    path.include?(app_root) && !path.include?(bundler_path)
  end
end