Sha256: 4de182a2a9c0f276dc21255abaea32cf9144b8be98eac8372de61e677f708da4

Contents?: true

Size: 859 Bytes

Versions: 30

Compression:

Stored size: 859 Bytes

Contents

module Rake
  module Backtrace # :nodoc: all
    SYS_KEYS  = RbConfig::CONFIG.keys.grep(/(prefix|libdir)/)
    SYS_PATHS = RbConfig::CONFIG.values_at(*SYS_KEYS).uniq +
      [ File.join(File.dirname(__FILE__), "..") ]

    SUPPRESSED_PATHS = SYS_PATHS.
      map { |s| s.gsub("\\", "/") }.
      map { |f| File.expand_path(f) }.
      reject { |s| s.nil? || s =~ /^ *$/ }
    SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|")
    SUPPRESSED_PATHS_RE << "|^org\\/jruby\\/\\w+\\.java" if
      Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'

    SUPPRESS_PATTERN = %r!(\A(#{SUPPRESSED_PATHS_RE})|bin/rake:\d+)!i

    def self.collapse(backtrace)
      pattern = Rake.application.options.suppress_backtrace_pattern ||
                SUPPRESS_PATTERN
      backtrace.reject { |elem| elem =~ pattern }
    end
  end
end

Version data entries

30 entries across 23 versions & 7 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/rake-10.3.2/lib/rake/backtrace.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/rake-10.3.2/lib/rake/backtrace.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.9 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/backtrace.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/rake-10.3.2/lib/rake/backtrace.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/backtrace.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.8 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.7 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.6 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.5 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.4 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.3 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.2 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
allegro_api_client-0.0.1 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb
spline-0.0.11 vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/backtrace.rb