fastlane 2.32.0 → 2.32.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: b4d571b0849ea335ab1184f3436547b7386cbd58
4
- data.tar.gz: f75a49396c4482f4b4b99c82716252f1f3d6630d
3
+ metadata.gz: cabeb08595d49196d1865678dda78beab1f5c024
4
+ data.tar.gz: fed8d92e4ebe20549217e334af3e04667ef0ad0e
5
5
  SHA512:
6
- metadata.gz: aef8f31380fc8ad25c5df0f3200d703b31e004bf0f0d4b8c54aad4501c7df6f25e4b208d6c273e2e53d150d64f1aa934efc84324b1eef66106b7289b3b306890
7
- data.tar.gz: 11f6357a4d06b3e37dee4aad05f8e74b36f3476af7a8944cf2c335ce6284309a14dbd6d82f3775c92008736c84845668a8a594dd4a46a1b68478dd7c1849640c
6
+ metadata.gz: f3641ee57f96525bd12760ebb36c94f4a48d60f6492e4669326486890608f765c0feeb77fb5659a757ae7556090fbae636f1505422fe947e83b8660e084854a5
7
+ data.tar.gz: ca31f7662a7b7ec663ea4e06db9fb205f4e9b02e9fcf15d297101c89be44c9016bed32a188d2596bbeab670d057312dcc921940fc388b0759a185fcf12a46cb5
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.32.0'.freeze
2
+ VERSION = '2.32.1'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -38,7 +38,7 @@ require 'fastlane_core/ui/errors/fastlane_exception'
38
38
  require 'fastlane_core/ui/errors/fastlane_error'
39
39
  require 'fastlane_core/ui/errors/fastlane_crash'
40
40
  require 'fastlane_core/ui/errors/fastlane_shell_error'
41
- require 'fastlane_core/ui/errors/fastlane_not_counted_error'
41
+ require 'fastlane_core/ui/errors/fastlane_common_error'
42
42
 
43
43
  # Third Party code
44
44
  require 'colored'
@@ -15,9 +15,20 @@ module FastlaneCore
15
15
  end
16
16
  end
17
17
 
18
+ def includes_method_missing?
19
+ return false if backtrace.nil? || backtrace[1].nil?
20
+ second_frame = backtrace[1]
21
+ second_frame.include?('method_missing') && second_frame.include?('ui.rb')
22
+ end
23
+
18
24
  def trim_backtrace(method_name: nil)
19
25
  if caused_by_calling_ui_method?(method_name: method_name)
20
- backtrace.drop(2)
26
+ if includes_method_missing?
27
+ drop_count = 2
28
+ else
29
+ drop_count = 1
30
+ end
31
+ backtrace.drop(drop_count)
21
32
  else
22
33
  backtrace
23
34
  end
@@ -107,6 +107,10 @@ module FastlaneCore
107
107
  not_implemented(__method__)
108
108
  end
109
109
 
110
+ #####################################################
111
+ # @!group Abort helper methods
112
+ #####################################################
113
+
110
114
  # Pass an exception to this method to exit the program
111
115
  # using the given exception
112
116
  # Use this method instead of user_error! if this error is
@@ -158,6 +162,18 @@ module FastlaneCore
158
162
  raise FastlaneTestFailure.new, error_message
159
163
  end
160
164
 
165
+ # Use this method to exit the program because of terminal state
166
+ # that is neither the fault of fastlane, nor a problem with the
167
+ # user's input. Using this method instead of user_error! will
168
+ # avoid tracking this outcome as a fastlane failure.
169
+ #
170
+ # e.g. tests ran successfully, but no screenshots were found
171
+ #
172
+ # This will show the message, but hide the full stack trace.
173
+ def abort_with_message!(message)
174
+ raise FastlaneCommonException.new, message
175
+ end
176
+
161
177
  #####################################################
162
178
  # @!group Helpers
163
179
  #####################################################
@@ -292,7 +292,7 @@ module Screengrab
292
292
  # success based on whether there are more screenshots there than when we started.
293
293
  if starting_screenshot_count == ending_screenshot_count
294
294
  UI.error "Make sure you've used Screengrab.screenshot() in your tests and that your expected tests are being run."
295
- UI.user_error! "No screenshots were detected 📷❌"
295
+ UI.abort_with_message! "No screenshots were detected 📷❌"
296
296
  end
297
297
 
298
298
  ending_screenshot_count - starting_screenshot_count
@@ -6,8 +6,14 @@ module Snapshot
6
6
  # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
7
 
8
8
  sure = true if FastlaneCore::Env.truthy?("SNAPSHOT_FORCE_DELETE") || force
9
- sure = UI.confirm("Are you sure? All your simulators will be DELETED and new ones will be created!") unless sure
10
- UI.user_error!("User cancelled action") unless sure
9
+ begin
10
+ sure = UI.confirm("Are you sure? All your simulators will be DELETED and new ones will be created!") unless sure
11
+ rescue => e
12
+ UI.user_error!("Please make sure to pass the `--force` option to reset simulators when running in non-interactive mode") unless UI.interactive?
13
+ raise e
14
+ end
15
+
16
+ UI.abort_with_message!("User cancelled action") unless sure
11
17
 
12
18
  devices.each do |device|
13
19
  _, name, id = device
@@ -39,8 +39,8 @@ module Spaceship
39
39
  end
40
40
 
41
41
  def self.interactive?
42
- if Object.const_defined?("FastlaneCore") && FastlaneCore.const_defined?("Helper")
43
- return FastlaneCore::Helper.interactive?
42
+ if Object.const_defined?("FastlaneCore") && FastlaneCore.const_defined?("UI")
43
+ return FastlaneCore::UI.interactive?
44
44
  end
45
45
  return true
46
46
  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.32.0
4
+ version: 2.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-05-18 00:00:00.000000000 Z
18
+ date: 2017-05-19 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1108,10 +1108,10 @@ files:
1108
1108
  - fastlane_core/lib/fastlane_core/swag.rb
1109
1109
  - fastlane_core/lib/fastlane_core/tool_collector.rb
1110
1110
  - fastlane_core/lib/fastlane_core/ui/disable_colors.rb
1111
+ - fastlane_core/lib/fastlane_core/ui/errors/fastlane_common_error.rb
1111
1112
  - fastlane_core/lib/fastlane_core/ui/errors/fastlane_crash.rb
1112
1113
  - fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb
1113
1114
  - fastlane_core/lib/fastlane_core/ui/errors/fastlane_exception.rb
1114
- - fastlane_core/lib/fastlane_core/ui/errors/fastlane_not_counted_error.rb
1115
1115
  - fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb
1116
1116
  - fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb
1117
1117
  - fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb