fastlane 2.30.0 → 2.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b24de7dca69e16aea8b48239f2eb105cf61d42e4
4
- data.tar.gz: abee9d945caa12cec5f5b84736e196db6ed6270e
3
+ metadata.gz: d1248e1ed87877416d15edb712d731e443c73c8c
4
+ data.tar.gz: 4d5f9dfc19dd7f446e3b8de6c25e669cbabcf74b
5
5
  SHA512:
6
- metadata.gz: 108860da51b20af99859e93b50f377797d6991f2fbd18b91c07f56c70905c6c4429b02a84e510f96c146a72f8289f4ea198f06fe26cf58d261a4c055c8362234
7
- data.tar.gz: b7c2b1d67ed298ca2424eadede430719972b3a6e86a03365b4619cbfd5980afe937f6a1c90bd6e00c8cccf757086a794704cb3800359cf53713fae8272742a29
6
+ metadata.gz: 5c63b183783fde53cda33446f49a2cfbd9535366293f9d193a5391610d35b9580149b8719f34c22e7a24006f229cf64c339c5840165810f9f6e627abbee92827
7
+ data.tar.gz: 6550d1d4418c94f2e5e6ef659292ca8cedec2c87c9b7de443ec708bb914767f28c22163e8f4d28e0fdfdf0d682bbd2be6101cd419f0702d2e7569d730f112a08
@@ -57,7 +57,7 @@ module Fastlane
57
57
  end
58
58
 
59
59
  def self.return_value
60
- # If you method provides a return value, you can describe here what it does
60
+ # If your method provides a return value, you can describe here what it does
61
61
  end
62
62
 
63
63
  def self.authors
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.30.0'.freeze
2
+ VERSION = '2.30.1'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -33,7 +33,7 @@ require 'fastlane_core/swag'
33
33
  require 'fastlane_core/build_watcher'
34
34
  require 'fastlane_core/crash_reporter/crash_reporter'
35
35
  require 'fastlane_core/crash_reporter/crash_report_generator'
36
- require 'fastlane_core/crash_reporter/backtrace_sanitizer'
36
+ require 'fastlane_core/crash_reporter/crash_report_sanitizer'
37
37
 
38
38
  # Third Party code
39
39
  require 'colored'
@@ -23,12 +23,13 @@ module FastlaneCore
23
23
 
24
24
  def crash_report_message(type: :unknown, exception: nil)
25
25
  return if exception.nil?
26
- backtrace = FastlaneCore::BacktraceSanitizer.sanitize(type: type, backtrace: exception.backtrace).join("\n")
26
+ backtrace = FastlaneCore::CrashReportSanitizer.sanitize_backtrace(type: type, backtrace: exception.backtrace).join("\n")
27
27
  message = types[type]
28
+ sanitized_exception_message = FastlaneCore::CrashReportSanitizer.sanitize_string(string: exception.message)
28
29
  if type == :user_error
29
30
  message += ': '
30
31
  else
31
- message += ": #{exception.message}"
32
+ message += ": #{sanitized_exception_message}"
32
33
  end
33
34
  message = message[0..100]
34
35
  message += "\n" unless type == :user_error
@@ -0,0 +1,44 @@
1
+ module FastlaneCore
2
+ class CrashReportSanitizer
3
+ class << self
4
+ def sanitize_backtrace(backtrace: nil, type: :unknown)
5
+ if type == :user_error || type == :crash
6
+ # If the crash is from `UI` we only want to include the stack trace
7
+ # up to the point where the crash was initiated.
8
+ # The two stack frames we are dropping are `method_missing` and
9
+ # the call to `crash!` or `user_error!`.
10
+ stack = backtrace.drop(2)
11
+ else
12
+ stack = backtrace
13
+ end
14
+
15
+ stack.map do |frame|
16
+ sanitize_string(string: frame)
17
+ end
18
+ end
19
+
20
+ def sanitize_string(string: nil)
21
+ string = sanitize_fastlane_gem_path(string: string)
22
+ string = sanitize_gem_home(string: string)
23
+ sanitize_home_dir(string: string)
24
+ end
25
+
26
+ private
27
+
28
+ def sanitize_home_dir(string: nil)
29
+ string.gsub(Dir.home, '~')
30
+ end
31
+
32
+ def sanitize_fastlane_gem_path(string: nil)
33
+ fastlane_path = Gem.loaded_specs['fastlane'].full_gem_path
34
+ return string unless fastlane_path
35
+ string.gsub(fastlane_path, '[fastlane_path]')
36
+ end
37
+
38
+ def sanitize_gem_home(string: nil)
39
+ return string unless Gem.dir
40
+ string.gsub(Gem.dir, '[gem_home]')
41
+ end
42
+ end
43
+ end
44
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.30.0
4
+ version: 2.30.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -1083,8 +1083,8 @@ files:
1083
1083
  - fastlane_core/lib/fastlane_core/configuration/configuration.rb
1084
1084
  - fastlane_core/lib/fastlane_core/configuration/configuration_file.rb
1085
1085
  - fastlane_core/lib/fastlane_core/core_ext/string.rb
1086
- - fastlane_core/lib/fastlane_core/crash_reporter/backtrace_sanitizer.rb
1087
1086
  - fastlane_core/lib/fastlane_core/crash_reporter/crash_report_generator.rb
1087
+ - fastlane_core/lib/fastlane_core/crash_reporter/crash_report_sanitizer.rb
1088
1088
  - fastlane_core/lib/fastlane_core/crash_reporter/crash_reporter.rb
1089
1089
  - fastlane_core/lib/fastlane_core/device_manager.rb
1090
1090
  - fastlane_core/lib/fastlane_core/env.rb
@@ -1,42 +0,0 @@
1
- module FastlaneCore
2
- class BacktraceSanitizer
3
- class << self
4
- def sanitize(type: :unknown, backtrace: nil)
5
- if type == :user_error || type == :crash
6
- # If the crash is from `UI` we only want to include the stack trace
7
- # up to the point where the crash was initiated.
8
- # The two stack frames we are dropping are `method_missing` and
9
- # the call to `crash!` or `user_error!`.
10
- stack = backtrace.drop(2)
11
- else
12
- stack = backtrace
13
- end
14
-
15
- stack = remove_fastlane_gem_path(backtrace: stack)
16
- stack = remove_gem_home_path(backtrace: stack)
17
- remove_home_dir_mentions(backtrace: stack)
18
- end
19
-
20
- def remove_fastlane_gem_path(backtrace: nil)
21
- fastlane_path = Gem.loaded_specs['fastlane'].full_gem_path
22
- return backtrace unless fastlane_path
23
- backtrace.map do |frame|
24
- frame.gsub(fastlane_path, '[fastlane_path]')
25
- end
26
- end
27
-
28
- def remove_gem_home_path(backtrace: nil)
29
- return backtrace unless Gem.dir
30
- backtrace.map do |frame|
31
- frame.gsub(Gem.dir, '[gem_home]')
32
- end
33
- end
34
-
35
- def remove_home_dir_mentions(backtrace: nil)
36
- backtrace.map do |frame|
37
- frame.gsub(Dir.home, '~')
38
- end
39
- end
40
- end
41
- end
42
- end