fastlane_core 0.52.1 → 0.52.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91c208ecad2dc40bf4ead9fcea1e8a24a985a3c9
4
- data.tar.gz: 435d1e0657e3c6864dd48d29c03e671dc3568cb5
3
+ metadata.gz: e254d0408efc312fe0c1c30f8049a92bf8f30413
4
+ data.tar.gz: f1a07a4d4c11e320a934b481ef53e61707c665af
5
5
  SHA512:
6
- metadata.gz: 41aae20ba8a0b58e78bdb08e424d863bfaae2a7908c5036bfa3a54e3201f10311e333c0340d282f4f5081e20303be59a9eb3090040ee6ad5b11f2623616f883b
7
- data.tar.gz: 4a9fd09d821f3dba43d7f5f552a0a739781a97a38e9d74c86d13a6620694b9ac2e1db117309f70e6242599cbcddfb91959794c76c3b2a3797003c7e895c36d80
6
+ metadata.gz: e99fd51fbc0f68215832cec1e9ab8a1a19c4951c9bdb07fbac6751291cd908f3a464315fb6ee2aed8dcd1ddd93b8732e4b286fc941b5886bd0bfcdc5e1686204
7
+ data.tar.gz: 7d8c8bafef81a8db11e4f9978ab005d57f90baf6dcd20324b8f7e56f0c805db506b81b701aeb8b17e24b458a27ca876cccaabfe00812ba3d487575a96fdd1642
@@ -1,17 +1,19 @@
1
+ unless Object.const_defined?("Faraday")
2
+ # We create these empty error classes if we didn't require Faraday
3
+ # so that we can use it in the rescue block below even if we didn't
4
+ # require Faraday or didn't use it
5
+ module Faraday
6
+ class Error < StandardError; end
7
+ class ClientError < Error; end
8
+ class SSLError < ClientError; end
9
+ class ConnectionFailed < ClientError; end
10
+ end
11
+ end
12
+
1
13
  module Commander
2
14
  # This class override the run method with our custom stack trace handling
3
15
  # In particular we want to distinguish between user_error! and crash! (one with, one without stack trace)
4
16
  class Runner
5
- unless Object.const_defined?("Faraday")
6
- module Faraday
7
- class SSLError < StandardError
8
- # We create this empty error class if we didn't require Faraday
9
- # so that we can use it in the rescue block below
10
- # even if we didn't require Faraday or didn't use it
11
- end
12
- end
13
- end
14
-
15
17
  # Code taken from https://github.com/commander-rb/commander/blob/master/lib/commander/runner.rb#L50
16
18
  def run!
17
19
  require_program :version, :description
@@ -53,22 +55,13 @@ module Commander
53
55
  show_github_issues(e.message) if e.show_github_issues
54
56
  display_user_error!(e, e.message)
55
57
  rescue Faraday::SSLError => e # SSL issues are very common
56
- # SSL errors are very common when the Ruby or OpenSSL installation is somehow broken
57
- # We want to show a nice error message to the user here
58
- # We have over 20 GitHub issues just for this one error:
59
- # https://github.com/fastlane/fastlane/search?q=errno%3D0+state%3DSSLv3+read+server&type=Issues
60
- ui = FastlaneCore::UI
61
- ui.error "-----------------------------------------------------------------------"
62
- ui.error e.to_s
63
- ui.error "SSL errors can be caused by various components on your local machine"
64
- ui.error "- Make sure OpenSSL is installed with Homebrew: `brew update && brew upgrade openssl`"
65
- ui.error "- If you use rvm:"
66
- ui.error " - First run `rvm osx-ssl-certs update all`"
67
- ui.error " - Then run `rvm reinstall ruby-2.2.3 --with-openssl-dir=/usr/local"
68
- ui.error "- If that doesn't fix your issue, please google for the following error message:"
69
- ui.error " '#{e}'"
70
- ui.error "-----------------------------------------------------------------------"
71
- display_user_error!(e, e.to_s)
58
+ handle_ssl_error!(e)
59
+ rescue Faraday::ConnectionFailed => e
60
+ if e.message.include? 'Connection reset by peer - SSL_connect'
61
+ handle_tls_error!(e)
62
+ else
63
+ handle_unknown_error!(e)
64
+ end
72
65
  rescue => e # high chance this is actually FastlaneCore::Interface::FastlaneCrash, but can be anything else
73
66
  collector.did_crash(@program[:name])
74
67
  handle_unknown_error!(e)
@@ -77,6 +70,51 @@ module Commander
77
70
  end
78
71
  end
79
72
 
73
+ def handle_tls_error!(e)
74
+ # Apple has upgraded its iTunes Connect servers to require TLS 1.2, but
75
+ # system Ruby 2.0 does not support it. We want to suggest that users upgrade
76
+ # their Ruby version
77
+ suggest_ruby_reinstall(e)
78
+ display_user_error!(e, e.to_s)
79
+ end
80
+
81
+ def handle_ssl_error!(e)
82
+ # SSL errors are very common when the Ruby or OpenSSL installation is somehow broken
83
+ # We want to show a nice error message to the user here
84
+ # We have over 20 GitHub issues just for this one error:
85
+ # https://github.com/fastlane/fastlane/search?q=errno%3D0+state%3DSSLv3+read+server&type=Issues
86
+ suggest_ruby_reinstall(e)
87
+ display_user_error!(e, e.to_s)
88
+ end
89
+
90
+ def suggest_ruby_reinstall(e)
91
+ ui = FastlaneCore::UI
92
+ ui.error "-----------------------------------------------------------------------"
93
+ ui.error e.to_s
94
+ ui.error ""
95
+ ui.error "SSL errors can be caused by various components on your local machine."
96
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1')
97
+ ui.error "Apple has recently changed their servers to require TLS 1.2, which may"
98
+ ui.error "not be available to your system installed Ruby (#{RUBY_VERSION})"
99
+ end
100
+ ui.error ""
101
+ ui.error "The best solution is to install a new version of Ruby"
102
+ ui.error ""
103
+ ui.error "- Make sure OpenSSL is installed with Homebrew: `brew update && brew upgrade openssl`"
104
+ ui.error "- If you use system Ruby:"
105
+ ui.error " - Run `brew update && brew install ruby`"
106
+ ui.error "- If you use rbenv with ruby-build:"
107
+ ui.error " - Run `brew update && brew upgrade ruby-build && rbenv install ruby-2.3.1`"
108
+ ui.error " - Run `rbenv global ruby-2.3.1` to make it the new global default Ruby version"
109
+ ui.error "- If you use rvm:"
110
+ ui.error " - First run `rvm osx-ssl-certs update all`"
111
+ ui.error " - Then run `rvm reinstall ruby-2.3.1 --with-openssl-dir=/usr/local"
112
+ ui.error ""
113
+ ui.error "If that doesn't fix your issue, please google for the following error message:"
114
+ ui.error " '#{e}'"
115
+ ui.error "-----------------------------------------------------------------------"
116
+ end
117
+
80
118
  def handle_unknown_error!(e)
81
119
  # Some spaceship exception classes implement #preferred_error_info in order to share error info
82
120
  # that we'd rather display instead of crashing with a stack trace. However, fastlane_core and
@@ -1,3 +1,3 @@
1
1
  module FastlaneCore
2
- VERSION = "0.52.1".freeze
2
+ VERSION = "0.52.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.52.1
4
+ version: 0.52.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-05 00:00:00.000000000 Z
11
+ date: 2016-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -138,30 +138,42 @@ dependencies:
138
138
  name: plist
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - "~>"
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: 3.1.0
144
+ - - "<"
142
145
  - !ruby/object:Gem::Version
143
- version: '3.1'
146
+ version: 4.0.0
144
147
  type: :runtime
145
148
  prerelease: false
146
149
  version_requirements: !ruby/object:Gem::Requirement
147
150
  requirements:
148
- - - "~>"
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: 3.1.0
154
+ - - "<"
149
155
  - !ruby/object:Gem::Version
150
- version: '3.1'
156
+ version: 4.0.0
151
157
  - !ruby/object:Gem::Dependency
152
158
  name: terminal-table
153
159
  requirement: !ruby/object:Gem::Requirement
154
160
  requirements:
155
- - - "~>"
161
+ - - ">="
156
162
  - !ruby/object:Gem::Version
157
163
  version: 1.4.5
164
+ - - "<"
165
+ - !ruby/object:Gem::Version
166
+ version: 2.0.0
158
167
  type: :runtime
159
168
  prerelease: false
160
169
  version_requirements: !ruby/object:Gem::Requirement
161
170
  requirements:
162
- - - "~>"
171
+ - - ">="
163
172
  - !ruby/object:Gem::Version
164
173
  version: 1.4.5
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: 2.0.0
165
177
  - !ruby/object:Gem::Dependency
166
178
  name: gh_inspector
167
179
  requirement: !ruby/object:Gem::Requirement