fastlane 2.14.2 → 2.15.0.beta.20170213032052
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cert/lib/cert/commands_generator.rb +1 -1
- data/cert/lib/cert/runner.rb +1 -1
- data/credentials_manager/lib/credentials_manager/appfile_config.rb +1 -1
- data/deliver/lib/deliver/commands_generator.rb +1 -1
- data/deliver/lib/deliver/runner.rb +2 -2
- data/deliver/lib/deliver/setup.rb +4 -2
- data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
- data/fastlane/lib/fastlane/actions/add_extra_platforms.rb +45 -0
- data/fastlane/lib/fastlane/actions/changelog_from_git_commits.rb +13 -7
- data/fastlane/lib/fastlane/actions/crashlytics.rb +2 -2
- data/fastlane/lib/fastlane/actions/ensure_no_debug_code.rb +13 -1
- data/fastlane/lib/fastlane/actions/git_tag_exists.rb +1 -1
- data/fastlane/lib/fastlane/actions/hockey.rb +117 -14
- data/fastlane/lib/fastlane/actions/slack.rb +1 -1
- data/fastlane/lib/fastlane/cli_tools_distributor.rb +4 -0
- data/fastlane/lib/fastlane/commands_generator.rb +12 -12
- data/fastlane/lib/fastlane/documentation/docs_generator.rb +1 -1
- data/fastlane/lib/fastlane/environment_printer.rb +2 -2
- data/fastlane/lib/fastlane/fastlane_require.rb +1 -1
- data/fastlane/lib/fastlane/helper/git_helper.rb +22 -15
- data/fastlane/lib/fastlane/lane_manager.rb +2 -2
- data/fastlane/lib/fastlane/plugins/plugin_info_collector.rb +2 -2
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +5 -5
- data/fastlane/lib/fastlane/runner.rb +12 -9
- data/fastlane/lib/fastlane/setup/crashlytics_beta_ui.rb +1 -4
- data/fastlane/lib/fastlane/supported_platforms.rb +17 -7
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/fastlane_core/lib/fastlane_core/cert_checker.rb +3 -3
- data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +7 -3
- data/fastlane_core/lib/fastlane_core/device_manager.rb +43 -16
- data/fastlane_core/lib/fastlane_core/globals.rb +27 -0
- data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +1 -1
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +2 -4
- data/fastlane_core/lib/fastlane_core/keychain_importer.rb +1 -1
- data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +4 -4
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +1 -1
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +22 -14
- data/fastlane_core/lib/fastlane_core/ui/interface.rb +5 -4
- data/frameit/README.md +4 -1
- data/frameit/lib/frameit/commands_generator.rb +1 -1
- data/frameit/lib/frameit/editor.rb +60 -13
- data/frameit/lib/frameit/runner.rb +1 -1
- data/gym/README.md +14 -0
- data/gym/lib/gym/commands_generator.rb +1 -1
- data/gym/lib/gym/error_handler.rb +2 -2
- data/gym/lib/gym/generators/package_command_generator_xcode7.rb +1 -1
- data/gym/lib/gym/runner.rb +3 -3
- data/gym/lib/gym/xcodebuild_fixes/package_application_fix.rb +2 -2
- data/gym/lib/gym/xcodebuild_fixes/swift_fix.rb +1 -1
- data/match/lib/match/commands_generator.rb +1 -1
- data/match/lib/match/encrypt.rb +3 -3
- data/match/lib/match/git_helper.rb +8 -8
- data/match/lib/match/options.rb +1 -1
- data/match/lib/match/utils.rb +3 -3
- data/pem/lib/pem/commands_generator.rb +1 -1
- data/pilot/lib/pilot/commands_generator.rb +1 -1
- data/produce/README.md +1 -1
- data/produce/lib/produce/commands_generator.rb +2 -2
- data/scan/lib/scan/commands_generator.rb +1 -1
- data/scan/lib/scan/options.rb +6 -0
- data/scan/lib/scan/runner.rb +2 -2
- data/scan/lib/scan/test_command_generator.rb +1 -0
- data/screengrab/lib/screengrab/commands_generator.rb +1 -1
- data/sigh/lib/sigh/commands_generator.rb +3 -3
- data/sigh/lib/sigh/local_manage.rb +1 -1
- data/sigh/lib/sigh/resign.rb +1 -1
- data/sigh/lib/sigh/runner.rb +8 -3
- data/snapshot/README.md +3 -3
- data/snapshot/lib/snapshot/collector.rb +1 -1
- data/snapshot/lib/snapshot/commands_generator.rb +1 -1
- data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +1 -1
- data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +1 -1
- data/snapshot/lib/snapshot/reset_simulators.rb +2 -2
- data/snapshot/lib/snapshot/runner.rb +3 -3
- data/spaceship/lib/spaceship.rb +2 -0
- data/spaceship/lib/spaceship/base.rb +18 -0
- data/spaceship/lib/spaceship/client.rb +8 -5
- data/spaceship/lib/spaceship/globals.rb +12 -0
- data/spaceship/lib/spaceship/portal/app.rb +0 -6
- data/spaceship/lib/spaceship/portal/app_group.rb +0 -6
- data/spaceship/lib/spaceship/portal/device.rb +0 -6
- data/spaceship/lib/spaceship/portal/person.rb +0 -6
- data/spaceship/lib/spaceship/portal/portal.rb +1 -0
- data/spaceship/lib/spaceship/portal/portal_client.rb +37 -0
- data/spaceship/lib/spaceship/portal/spaceship.rb +9 -0
- data/spaceship/lib/spaceship/portal/website_push.rb +90 -0
- data/spaceship/lib/spaceship/tunes/app_image.rb +0 -6
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +0 -9
- data/spaceship/lib/spaceship/tunes/app_screenshot.rb +0 -7
- data/spaceship/lib/spaceship/tunes/app_trailer.rb +0 -6
- data/spaceship/lib/spaceship/tunes/app_version.rb +1 -0
- data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +0 -9
- data/spaceship/lib/spaceship/tunes/app_version_history.rb +0 -9
- data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +0 -9
- data/spaceship/lib/spaceship/tunes/app_version_ref.rb +0 -6
- data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +0 -9
- data/spaceship/lib/spaceship/tunes/application.rb +0 -6
- data/spaceship/lib/spaceship/tunes/build.rb +0 -8
- data/spaceship/lib/spaceship/tunes/build_details.rb +0 -8
- data/spaceship/lib/spaceship/tunes/build_train.rb +0 -6
- data/spaceship/lib/spaceship/tunes/member.rb +0 -6
- data/spaceship/lib/spaceship/tunes/pricing_tier.rb +0 -9
- data/spaceship/lib/spaceship/tunes/recovery_device.rb +0 -6
- data/spaceship/lib/spaceship/tunes/territory.rb +0 -7
- data/spaceship/lib/spaceship/tunes/tester.rb +0 -6
- data/spaceship/lib/spaceship/tunes/transit_app_file.rb +0 -6
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
- data/spaceship/lib/spaceship/tunes/user_detail.rb +0 -6
- data/spaceship/lib/spaceship/tunes/version_set.rb +0 -11
- data/spaceship/lib/spaceship/two_step_client.rb +2 -2
- data/supply/lib/supply/commands_generator.rb +1 -1
- metadata +34 -17
@@ -0,0 +1,27 @@
|
|
1
|
+
module FastlaneCore
|
2
|
+
class Globals
|
3
|
+
def self.captured_output
|
4
|
+
@captured_output ||= ""
|
5
|
+
end
|
6
|
+
|
7
|
+
class << self
|
8
|
+
attr_writer :captured_output
|
9
|
+
attr_writer :capture_output
|
10
|
+
attr_writer :verbose
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.capture_output?
|
14
|
+
return nil unless @capture_output
|
15
|
+
return true
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.captured_output?
|
19
|
+
@capture_output && @captured_output.length > 0
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.verbose?
|
23
|
+
return nil unless @verbose
|
24
|
+
return true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -26,7 +26,7 @@ module FastlaneCore
|
|
26
26
|
xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system
|
27
27
|
|
28
28
|
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
29
|
-
UI.success("Wrote XML data to '#{self.package_path}'") if
|
29
|
+
UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
|
30
30
|
|
31
31
|
return package_path
|
32
32
|
end
|
@@ -269,7 +269,7 @@ module FastlaneCore
|
|
269
269
|
|
270
270
|
# This will be called from the Deliverfile, and disables the logging of the transporter output
|
271
271
|
def self.hide_transporter_output
|
272
|
-
@hide_transporter_output =
|
272
|
+
@hide_transporter_output = !FastlaneCore::Globals.verbose?
|
273
273
|
end
|
274
274
|
|
275
275
|
def self.hide_transporter_output?
|
@@ -358,9 +358,7 @@ module FastlaneCore
|
|
358
358
|
end
|
359
359
|
|
360
360
|
if result
|
361
|
-
UI.
|
362
|
-
UI.success("Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.")
|
363
|
-
UI.success("-" * 102)
|
361
|
+
UI.header("Successfully uploaded package to iTunes Connect. It might take a few minutes until it's visible online.")
|
364
362
|
|
365
363
|
FileUtils.rm_rf(actual_dir) unless Helper.is_test? # we don't need the package any more, since the upload was successful
|
366
364
|
else
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module FastlaneCore
|
2
2
|
class KeychainImporter
|
3
|
-
def self.import_file(path, keychain_path, keychain_password: "", certificate_password: "", output:
|
3
|
+
def self.import_file(path, keychain_path, keychain_password: "", certificate_password: "", output: FastlaneCore::Globals.verbose?)
|
4
4
|
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
|
5
5
|
|
6
6
|
command = "security import #{path.shellescape} -k '#{keychain_path.shellescape}'"
|
@@ -26,7 +26,7 @@ module FastlaneCore
|
|
26
26
|
xml = ERB.new(File.read(xml_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system
|
27
27
|
|
28
28
|
File.write(File.join(self.package_path, METADATA_FILE_NAME), xml)
|
29
|
-
UI.success("Wrote XML data to '#{self.package_path}'") if
|
29
|
+
UI.success("Wrote XML data to '#{self.package_path}'") if FastlaneCore::Globals.verbose?
|
30
30
|
|
31
31
|
package_path
|
32
32
|
end
|
@@ -40,7 +40,7 @@ module Commander
|
|
40
40
|
abort "#{e}. Use --help for more information"
|
41
41
|
rescue Interrupt => ex
|
42
42
|
# We catch it so that the stack trace is hidden by default when using ctrl + c
|
43
|
-
if
|
43
|
+
if FastlaneCore::Globals.verbose?
|
44
44
|
raise ex
|
45
45
|
else
|
46
46
|
puts "\nCancelled... use --verbose to show the stack trace"
|
@@ -159,7 +159,7 @@ module Commander
|
|
159
159
|
end
|
160
160
|
|
161
161
|
def display_user_error!(e, message)
|
162
|
-
if
|
162
|
+
if FastlaneCore::Globals.verbose? # with stack trace
|
163
163
|
reraise_formatted!(e, message)
|
164
164
|
else
|
165
165
|
abort "\n[!] #{message}".red # without stack trace
|
@@ -177,7 +177,7 @@ module Commander
|
|
177
177
|
require 'gh_inspector'
|
178
178
|
require 'fastlane_core/ui/github_issue_inspector_reporter'
|
179
179
|
|
180
|
-
inspector = GhInspector::Inspector.new("fastlane", "fastlane", verbose:
|
180
|
+
inspector = GhInspector::Inspector.new("fastlane", "fastlane", verbose: FastlaneCore::Globals.verbose?)
|
181
181
|
delegate = Fastlane::InspectorReporter.new
|
182
182
|
if message_or_error.kind_of?(String)
|
183
183
|
inspector.search_query(message_or_error, delegate)
|
@@ -185,7 +185,7 @@ module Commander
|
|
185
185
|
inspector.search_exception(message_or_error, delegate)
|
186
186
|
end
|
187
187
|
rescue => ex
|
188
|
-
FastlaneCore::UI.error("Error finding relevant GitHub issues: #{ex}") if
|
188
|
+
FastlaneCore::UI.error("Error finding relevant GitHub issues: #{ex}") if FastlaneCore::Globals.verbose?
|
189
189
|
end
|
190
190
|
end
|
191
191
|
end
|
@@ -8,7 +8,7 @@ module Fastlane
|
|
8
8
|
def inspector_started_query(query, inspector)
|
9
9
|
puts ""
|
10
10
|
puts "Looking for related GitHub issues on #{inspector.repo_owner}/#{inspector.repo_name}..."
|
11
|
-
puts "Search query: #{query}" if
|
11
|
+
puts "Search query: #{query}" if FastlaneCore::Globals.verbose?
|
12
12
|
puts ""
|
13
13
|
end
|
14
14
|
|
@@ -2,6 +2,8 @@ module FastlaneCore
|
|
2
2
|
# Shell is the terminal output of things
|
3
3
|
# For documentation for each of the methods open `interface.rb`
|
4
4
|
class Shell < Interface
|
5
|
+
require 'tty-screen'
|
6
|
+
|
5
7
|
def log
|
6
8
|
return @log if @log
|
7
9
|
|
@@ -15,22 +17,22 @@ module FastlaneCore
|
|
15
17
|
end
|
16
18
|
|
17
19
|
@log.formatter = proc do |severity, datetime, progname, msg|
|
18
|
-
|
19
|
-
string = "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: "
|
20
|
-
elsif FastlaneCore::Env.truthy?("FASTLANE_HIDE_TIMESTAMP")
|
21
|
-
string = ""
|
22
|
-
else
|
23
|
-
string = "[#{datetime.strftime('%H:%M:%S')}]: "
|
24
|
-
end
|
25
|
-
|
26
|
-
string += "#{msg}\n"
|
27
|
-
|
28
|
-
string
|
20
|
+
"#{format_string(datetime, severity)}#{msg}\n"
|
29
21
|
end
|
30
22
|
|
31
23
|
@log
|
32
24
|
end
|
33
25
|
|
26
|
+
def format_string(datetime, severity)
|
27
|
+
if FastlaneCore::Globals.verbose?
|
28
|
+
return "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: "
|
29
|
+
elsif FastlaneCore::Env.truthy?("FASTLANE_HIDE_TIMESTAMP")
|
30
|
+
return ""
|
31
|
+
else
|
32
|
+
return "[#{datetime.strftime('%H:%M:%S')}]: "
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
34
36
|
#####################################################
|
35
37
|
# @!group Messaging: show text to the user
|
36
38
|
#####################################################
|
@@ -68,13 +70,19 @@ module FastlaneCore
|
|
68
70
|
end
|
69
71
|
|
70
72
|
def verbose(message)
|
71
|
-
log.debug(message.to_s) if
|
73
|
+
log.debug(message.to_s) if FastlaneCore::Globals.verbose?
|
72
74
|
end
|
73
75
|
|
74
76
|
def header(message)
|
75
|
-
|
77
|
+
format = format_string(Time.now, "")
|
78
|
+
if message.length + 8 < TTY::Screen.width - format.length
|
79
|
+
message = "--- #{message} ---"
|
80
|
+
i = message.length
|
81
|
+
else
|
82
|
+
i = TTY::Screen.width - format.length
|
83
|
+
end
|
76
84
|
success("-" * i)
|
77
|
-
success(
|
85
|
+
success(message)
|
78
86
|
success("-" * i)
|
79
87
|
end
|
80
88
|
|
@@ -63,7 +63,7 @@ module FastlaneCore
|
|
63
63
|
|
64
64
|
# Level Verbose: Print out additional information for the
|
65
65
|
# users that are interested. Will only be printed when
|
66
|
-
#
|
66
|
+
# FastlaneCore::Globals.verbose? = true
|
67
67
|
#
|
68
68
|
# By default those messages are shown in white
|
69
69
|
def verbose(_message)
|
@@ -118,9 +118,11 @@ module FastlaneCore
|
|
118
118
|
# raised from user_error!
|
119
119
|
class FastlaneError < StandardError
|
120
120
|
attr_reader :show_github_issues
|
121
|
+
attr_reader :error_info
|
121
122
|
|
122
|
-
def initialize(show_github_issues: false)
|
123
|
+
def initialize(show_github_issues: false, error_info: nil)
|
123
124
|
@show_github_issues = show_github_issues
|
125
|
+
@error_info = error_info
|
124
126
|
end
|
125
127
|
end
|
126
128
|
|
@@ -141,8 +143,7 @@ module FastlaneCore
|
|
141
143
|
# Basically this should be used when you actively catch the error
|
142
144
|
# and want to show a nice error message to the user
|
143
145
|
def user_error!(error_message, options = {})
|
144
|
-
|
145
|
-
raise FastlaneError.new(show_github_issues: options[:show_github_issues]), error_message.to_s
|
146
|
+
raise FastlaneError.new(options), error_message.to_s
|
146
147
|
end
|
147
148
|
|
148
149
|
#####################################################
|
data/frameit/README.md
CHANGED
@@ -138,7 +138,8 @@ Use it to define the general information:
|
|
138
138
|
},
|
139
139
|
"background": "./background.jpg",
|
140
140
|
"padding": 50,
|
141
|
-
"show_complete_frame": false
|
141
|
+
"show_complete_frame": false,
|
142
|
+
"stack_title" : false
|
142
143
|
},
|
143
144
|
|
144
145
|
"data": [
|
@@ -169,6 +170,8 @@ Use it to define the general information:
|
|
169
170
|
]
|
170
171
|
}
|
171
172
|
```
|
173
|
+
The `stack_title` value specifies whether `frameit` should display the keyword above the title when both keyword and title are defined.
|
174
|
+
|
172
175
|
The `show_complete_frame` value specifies whether `frameit` should shrink the device and frame so that they show in full in the framed screenshot. If it is false, then they can hang over the bottom of the screenshot.
|
173
176
|
|
174
177
|
The `filter` value is a part of the screenshot named for which the given option should be used. If a screenshot is named `iPhone5_Brainstorming.png` the first entry in the `data` array will be used.
|
@@ -21,7 +21,7 @@ module Frameit
|
|
21
21
|
program :help, 'GitHub', 'https://github.com/fastlane/frameit'
|
22
22
|
program :help_formatter, :compact
|
23
23
|
|
24
|
-
global_option('--verbose') {
|
24
|
+
global_option('--verbose') { FastlaneCore::Globals.verbose = true }
|
25
25
|
FastlaneCore::CommanderGenerator.new.generate(Frameit::Options.available_options)
|
26
26
|
|
27
27
|
default_command :run
|
@@ -70,7 +70,7 @@ module Frameit
|
|
70
70
|
def offset
|
71
71
|
return @offset_information if @offset_information
|
72
72
|
|
73
|
-
@offset_information = fetch_config['offset'] || Offsets.image_offset(screenshot)
|
73
|
+
@offset_information = fetch_config['offset'] || Offsets.image_offset(screenshot).dup
|
74
74
|
|
75
75
|
if @offset_information and (@offset_information['offset'] or @offset_information['offset'])
|
76
76
|
return @offset_information
|
@@ -104,19 +104,23 @@ module Frameit
|
|
104
104
|
def complex_framing
|
105
105
|
background = generate_background
|
106
106
|
|
107
|
+
self.top_space_above_device = vertical_frame_padding
|
108
|
+
|
109
|
+
if fetch_config['title']
|
110
|
+
background = put_title_into_background(background, fetch_config['stack_title'])
|
111
|
+
end
|
112
|
+
|
107
113
|
if self.frame # we have no frame on le mac
|
108
114
|
resize_frame!
|
109
115
|
put_into_frame
|
110
116
|
|
111
117
|
# Decrease the size of the framed screenshot to fit into the defined padding + background
|
112
118
|
frame_width = background.width - horizontal_frame_padding * 2
|
119
|
+
frame_height = background.height - top_space_above_device - vertical_frame_padding
|
113
120
|
@image.resize "#{frame_width}x"
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
if fetch_config['title']
|
119
|
-
background = put_title_into_background(background)
|
121
|
+
if @image.height > frame_height
|
122
|
+
@image.resize "x#{frame_height.to_i}"
|
123
|
+
end
|
120
124
|
end
|
121
125
|
|
122
126
|
@image = put_device_into_background(background)
|
@@ -184,17 +188,60 @@ module Frameit
|
|
184
188
|
|
185
189
|
multiplicator = (screenshot_width.to_f / offset['width'].to_f) # by how much do we have to change this?
|
186
190
|
new_frame_width = multiplicator * frame.width # the new width for the frame
|
187
|
-
frame.resize "#{new_frame_width.round}x" # resize it to the calculated
|
191
|
+
frame.resize "#{new_frame_width.round}x" # resize it to the calculated width
|
188
192
|
modify_offset(multiplicator) # modify the offset to properly insert the screenshot into the frame later
|
189
193
|
end
|
190
194
|
|
195
|
+
def resize_text(text)
|
196
|
+
width = text.width
|
197
|
+
ratio = (width + (keyword_padding + horizontal_frame_padding) * 2) / image.width.to_f
|
198
|
+
if ratio > 1.0
|
199
|
+
# too large - resizing now
|
200
|
+
smaller = (1.0 / ratio)
|
201
|
+
text.resize "#{(smaller * text.width).round}x"
|
202
|
+
end
|
203
|
+
end
|
191
204
|
# Add the title above the device
|
192
|
-
|
193
|
-
|
205
|
+
|
206
|
+
def put_title_into_background_stacked(background, title, keyword)
|
207
|
+
resize_text(title)
|
208
|
+
resize_text(keyword)
|
209
|
+
|
210
|
+
title_width = title.width
|
211
|
+
keyword_width = keyword.width
|
212
|
+
|
213
|
+
vertical_padding = vertical_frame_padding
|
214
|
+
keyword_top_space = vertical_padding
|
215
|
+
|
216
|
+
spacing_between_title_and_keyword = (title.height / 2)
|
217
|
+
title_top_space = vertical_padding + keyword.height + spacing_between_title_and_keyword
|
218
|
+
title_left_space = (background.width / 2.0 - title_width / 2.0).round
|
219
|
+
keyword_left_space = (background.width / 2.0 - keyword_width / 2.0).round
|
220
|
+
|
221
|
+
self.top_space_above_device += title.height + keyword.height + spacing_between_title_and_keyword + vertical_padding
|
222
|
+
# keyword
|
223
|
+
background = background.composite(keyword, "png") do |c|
|
224
|
+
c.compose "Over"
|
225
|
+
c.geometry "+#{keyword_left_space}+#{keyword_top_space}"
|
226
|
+
end
|
227
|
+
# Then, put the title on top of the screenshot next to the keyword
|
228
|
+
background = background.composite(title, "png") do |c|
|
229
|
+
c.compose "Over"
|
230
|
+
c.geometry "+#{title_left_space}+#{title_top_space}"
|
231
|
+
end
|
232
|
+
background
|
233
|
+
end
|
234
|
+
|
235
|
+
def put_title_into_background(background, stack_title)
|
236
|
+
title_images = build_title_images(image.width - 2 * horizontal_frame_padding, image.height - 2 * vertical_frame_padding)
|
194
237
|
|
195
238
|
keyword = title_images[:keyword]
|
196
239
|
title = title_images[:title]
|
197
240
|
|
241
|
+
if stack_title && !keyword.nil? && !title.nil? && keyword.width > 0 && title.width > 0
|
242
|
+
background = put_title_into_background_stacked(background, title, keyword)
|
243
|
+
return background
|
244
|
+
end
|
198
245
|
# sum_width: the width of both labels together including the space inbetween
|
199
246
|
# is used to calculate the ratio
|
200
247
|
sum_width = title.width
|
@@ -202,7 +249,7 @@ module Frameit
|
|
202
249
|
|
203
250
|
# Resize the 2 labels if necessary
|
204
251
|
smaller = 1.0 # default
|
205
|
-
ratio = (sum_width + keyword_padding * 2) / image.width.to_f
|
252
|
+
ratio = (sum_width + (keyword_padding + horizontal_frame_padding) * 2) / image.width.to_f
|
206
253
|
if ratio > 1.0
|
207
254
|
# too large - resizing now
|
208
255
|
smaller = (1.0 / ratio)
|
@@ -215,10 +262,10 @@ module Frameit
|
|
215
262
|
end
|
216
263
|
|
217
264
|
vertical_padding = vertical_frame_padding
|
218
|
-
top_space = vertical_padding
|
265
|
+
top_space = vertical_padding + (actual_font_size - title.height) / 2
|
219
266
|
left_space = (background.width / 2.0 - sum_width / 2.0).round
|
220
267
|
|
221
|
-
self.top_space_above_device +=
|
268
|
+
self.top_space_above_device += actual_font_size + vertical_padding
|
222
269
|
|
223
270
|
# First, put the keyword on top of the screenshot, if we have one
|
224
271
|
if keyword
|
data/gym/README.md
CHANGED
@@ -192,8 +192,22 @@ lane :beta do
|
|
192
192
|
gym(scheme: "MyApp")
|
193
193
|
crashlytics
|
194
194
|
end
|
195
|
+
|
196
|
+
# error block is executed when a error occurs
|
197
|
+
error do |lane, exception|
|
198
|
+
slack(
|
199
|
+
# message with short human friendly message
|
200
|
+
message: exception.to_s,
|
201
|
+
success: false,
|
202
|
+
# Output containing extended log output
|
203
|
+
payload: { "Output" => exception.error_info.to_s }
|
204
|
+
)
|
205
|
+
end
|
195
206
|
```
|
196
207
|
|
208
|
+
When gym raises an error the `error_info` property will contain the process output
|
209
|
+
in case you want to display the error in 3rd party tools such as Slack.
|
210
|
+
|
197
211
|
You can then easily switch between the beta provider (e.g. `testflight`, `hockey`, `s3` and more).
|
198
212
|
|
199
213
|
For more information visit the [fastlane GitHub page](https://github.com/fastlane/fastlane/tree/master/fastlane).
|
@@ -29,7 +29,7 @@ module Gym
|
|
29
29
|
program :help, "GitHub", "https://github.com/fastlane/fastlane/tree/master/gym"
|
30
30
|
program :help_formatter, :compact
|
31
31
|
|
32
|
-
global_option("--verbose") {
|
32
|
+
global_option("--verbose") { FastlaneCore::Globals.verbose = true }
|
33
33
|
|
34
34
|
command :build do |c|
|
35
35
|
c.syntax = "fastlane gym"
|
@@ -53,7 +53,7 @@ module Gym
|
|
53
53
|
print_full_log_path
|
54
54
|
print_xcode_path_instructions
|
55
55
|
print_xcode_version
|
56
|
-
UI.user_error!("Error building the application - see the log above")
|
56
|
+
UI.user_error!("Error building the application - see the log above", error_info: output)
|
57
57
|
end
|
58
58
|
|
59
59
|
# @param [Array] The output of the errored build (line by line)
|
@@ -84,7 +84,7 @@ module Gym
|
|
84
84
|
print "provisioning profile and code signing identity."
|
85
85
|
end
|
86
86
|
print_full_log_path
|
87
|
-
UI.user_error!("Error packaging up the application")
|
87
|
+
UI.user_error!("Error packaging up the application", error_info: output)
|
88
88
|
end
|
89
89
|
|
90
90
|
def handle_empty_archive
|
@@ -164,7 +164,7 @@ module Gym
|
|
164
164
|
UI.command_output("-----------------------------------------")
|
165
165
|
UI.command_output(JSON.pretty_generate(hash))
|
166
166
|
UI.command_output("-----------------------------------------")
|
167
|
-
if
|
167
|
+
if FastlaneCore::Globals.verbose?
|
168
168
|
UI.message("This results in the following plist file:")
|
169
169
|
UI.command_output("-----------------------------------------")
|
170
170
|
UI.command_output(to_plist(hash))
|