Sha256: c393d33fc8fbb9245f6efaa939a7db58a540b7b19ff0e1fbbcd695491caddbe1

Contents?: true

Size: 888 Bytes

Versions: 375

Compression:

Stored size: 888 Bytes

Contents

module FastlaneCore
  class CrashReportSanitizer
    class << self
      def sanitize_backtrace(backtrace: nil)
        backtrace.map do |frame|
          sanitize_string(string: frame)
        end
      end

      def sanitize_string(string: nil)
        string = sanitize_fastlane_gem_path(string: string)
        string = sanitize_gem_home(string: string)
        sanitize_home_dir(string: string)
      end

      private

      def sanitize_home_dir(string: nil)
        string.gsub(Dir.home, '~')
      end

      def sanitize_fastlane_gem_path(string: nil)
        fastlane_path = Gem.loaded_specs['fastlane'].full_gem_path
        return string unless fastlane_path
        string.gsub(fastlane_path, '[fastlane_path]')
      end

      def sanitize_gem_home(string: nil)
        return string unless Gem.dir
        string.gsub(Gem.dir, '[gem_home]')
      end
    end
  end
end

Version data entries

375 entries across 375 versions & 1 rubygems

Version Path
fastlane-2.85.0.beta.20180305050037 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.85.0.beta.20180304050031 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.85.0.beta.20180303050048 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.85.0.beta.20180302050035 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.84.0 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.84.0.beta.20180301050048 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.84.0.beta.20180228050122 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.84.0.beta.20180227050054 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.83.0 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.83.0.beta.20180226050016 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.83.0.beta.20180225050035 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.83.0.beta.20180224050047 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180223010003 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180222010003 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180221010003 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180220010002 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180219010003 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180218010003 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
fastlane-2.82.0.beta.20180217010002 fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb