fastlane 2.27.0.beta.20170408010009 → 2.27.0.beta.20170409010031
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 +4 -4
- data/cert/lib/cert/options.rb +0 -10
- data/cert/lib/cert/runner.rb +1 -8
- data/fastlane/lib/fastlane/documentation/actions_list.rb +6 -5
- data/fastlane/lib/fastlane/lane_manager.rb +3 -4
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/plugin_search.rb +1 -2
- data/fastlane/lib/fastlane/plugins/plugin_update_manager.rb +1 -1
- data/fastlane/lib/fastlane/setup/setup_ios.rb +2 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +2 -1
- data/fastlane_core/lib/fastlane_core/print_table.rb +73 -9
- data/fastlane_core/lib/fastlane_core/string_filters.rb +16 -0
- data/gym/lib/gym/runner.rb +1 -1
- data/match/lib/match/nuke.rb +17 -14
- data/match/lib/match/table_printer.rb +1 -1
- data/pilot/lib/pilot/build_manager.rb +1 -1
- data/pilot/lib/pilot/tester_manager.rb +3 -2
- data/snapshot/lib/snapshot/runner.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc395cbe108f87e69cf5951dd50ae2b327690ad5
|
4
|
+
data.tar.gz: eb5f037c0f008d5a856ece891a00bafe4a0bfb54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02258f796db79d19f524413368cd00cb5ca6c04bfdb78a5ae438bab551b8ce9ac7594294ce944de300dbe51af9d0a61f4ef2fafacfbb39be6cbfcc7ec3d37608
|
7
|
+
data.tar.gz: c015d1b221cd84f4d75ced9143899fa4f58e4c723602a96e83db4a1fd1cf006758b305109dd9fe0154bc2dcd65a39611adc4adae76d424d6b344b765df37f67c
|
data/cert/lib/cert/options.rb
CHANGED
@@ -13,16 +13,6 @@ module Cert
|
|
13
13
|
description: "Create a development certificate instead of a distribution one",
|
14
14
|
is_string: false,
|
15
15
|
default_value: false),
|
16
|
-
FastlaneCore::ConfigItem.new(key: :generate_p12,
|
17
|
-
env_name: "CERT_GENERATE_P12_FILE",
|
18
|
-
description: "Generate a p12 file additionally to a PEM file",
|
19
|
-
is_string: false,
|
20
|
-
default_value: false),
|
21
|
-
FastlaneCore::ConfigItem.new(key: :p12_password,
|
22
|
-
env_name: "CERT_P12_PASSWORD",
|
23
|
-
sensitive: true,
|
24
|
-
description: "The password that is used for your p12 file",
|
25
|
-
default_value: ""),
|
26
16
|
FastlaneCore::ConfigItem.new(key: :force,
|
27
17
|
env_name: "CERT_FORCE",
|
28
18
|
description: "Create a certificate even if an existing certificate exists",
|
data/cert/lib/cert/runner.rb
CHANGED
@@ -160,18 +160,11 @@ module Cert
|
|
160
160
|
request_path = File.expand_path(File.join(Cert.config[:output_path], "#{certificate.id}.certSigningRequest"))
|
161
161
|
File.write(request_path, csr.to_pem)
|
162
162
|
|
163
|
-
private_key_path = File.expand_path(File.join(Cert.config[:output_path], "#{certificate.id}.
|
163
|
+
private_key_path = File.expand_path(File.join(Cert.config[:output_path], "#{certificate.id}.p12"))
|
164
164
|
File.write(private_key_path, pkey)
|
165
165
|
|
166
166
|
cert_path = store_certificate(certificate)
|
167
167
|
|
168
|
-
if Cert.config[:generate_p12]
|
169
|
-
p12_cert_path = File.expand_path(File.join(Cert.config[:output_path], "#{certificate.id}.p12"))
|
170
|
-
p12 = OpenSSL::PKCS12.create(Cert.config[:p12_password], type_name, pkey, certificate.download)
|
171
|
-
File.write(p12_cert_path, p12.to_der)
|
172
|
-
UI.success "p12 certificate: #{p12_cert_path}"
|
173
|
-
end
|
174
|
-
|
175
168
|
# Import all the things into the Keychain
|
176
169
|
keychain = File.expand_path(Cert.config[:keychain_path])
|
177
170
|
password = Cert.config[:keychain_password]
|
@@ -37,7 +37,7 @@ module Fastlane
|
|
37
37
|
puts Terminal::Table.new(
|
38
38
|
title: "Available fastlane actions".green,
|
39
39
|
headings: ['Action', 'Description', 'Author'],
|
40
|
-
rows: rows
|
40
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
41
41
|
)
|
42
42
|
puts " Platform filter: #{platform}".magenta if platform
|
43
43
|
puts " Total of #{rows.count} actions"
|
@@ -97,7 +97,7 @@ module Fastlane
|
|
97
97
|
authors = Array(action.author || action.authors)
|
98
98
|
rows << ["Created by #{authors.join(', ').green}"] unless authors.empty?
|
99
99
|
|
100
|
-
puts Terminal::Table.new(title: name.green, rows: rows)
|
100
|
+
puts Terminal::Table.new(title: name.green, rows: FastlaneCore::PrintTable.transform_output(rows))
|
101
101
|
puts ""
|
102
102
|
end
|
103
103
|
|
@@ -108,7 +108,7 @@ module Fastlane
|
|
108
108
|
puts Terminal::Table.new(
|
109
109
|
title: "#{name} Options".green,
|
110
110
|
headings: ['Key', 'Description', 'Env Var', 'Default'],
|
111
|
-
rows: options
|
111
|
+
rows: FastlaneCore::PrintTable.transform_output(options)
|
112
112
|
)
|
113
113
|
else
|
114
114
|
puts "No available options".yellow
|
@@ -123,7 +123,7 @@ module Fastlane
|
|
123
123
|
puts Terminal::Table.new(
|
124
124
|
title: "#{name} Output Variables".green,
|
125
125
|
headings: ['Key', 'Description'],
|
126
|
-
rows: output.map { |key, desc| [key.yellow, desc] }
|
126
|
+
rows: FastlaneCore::PrintTable.transform_output(output.map { |key, desc| [key.yellow, desc] })
|
127
127
|
)
|
128
128
|
puts "Access the output values using `lane_context[SharedValues::VARIABLE_NAME]`"
|
129
129
|
puts ""
|
@@ -132,7 +132,8 @@ module Fastlane
|
|
132
132
|
def self.print_return_value(action, name)
|
133
133
|
return unless action.return_value
|
134
134
|
|
135
|
-
puts Terminal::Table.new(title: "#{name} Return Value".green,
|
135
|
+
puts Terminal::Table.new(title: "#{name} Return Value".green,
|
136
|
+
rows: FastlaneCore::PrintTable.transform_output([[action.return_value]]))
|
136
137
|
puts ""
|
137
138
|
end
|
138
139
|
|
@@ -115,7 +115,7 @@ module Fastlane
|
|
115
115
|
puts Terminal::Table.new(
|
116
116
|
title: "fastlane summary".green,
|
117
117
|
headings: ["Step", "Action", "Time (in s)"],
|
118
|
-
rows: rows
|
118
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
119
119
|
)
|
120
120
|
puts ""
|
121
121
|
end
|
@@ -145,7 +145,7 @@ module Fastlane
|
|
145
145
|
table = Terminal::Table.new(
|
146
146
|
title: "Available lanes to run",
|
147
147
|
headings: ['Number', 'Lane Name', 'Description'],
|
148
|
-
rows: rows
|
148
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
149
149
|
)
|
150
150
|
|
151
151
|
UI.message "Welcome to fastlane! Here's what your app is setup to do:"
|
@@ -232,12 +232,11 @@ module Fastlane
|
|
232
232
|
rows = Actions.lane_context.collect do |key, content|
|
233
233
|
[key, content.to_s]
|
234
234
|
end
|
235
|
-
rows = FastlaneCore::PrintTable.limit_row_size(rows)
|
236
235
|
|
237
236
|
require 'terminal-table'
|
238
237
|
puts Terminal::Table.new({
|
239
238
|
title: "Lane Context".yellow,
|
240
|
-
rows: rows
|
239
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
241
240
|
})
|
242
241
|
end
|
243
242
|
end
|
@@ -24,11 +24,10 @@ module Fastlane
|
|
24
24
|
end
|
25
25
|
|
26
26
|
params = {
|
27
|
-
rows: rows,
|
27
|
+
rows: FastlaneCore::PrintTable.transform_output(rows),
|
28
28
|
title: (search_query ? "fastlane plugins '#{search_query}'" : "Available fastlane plugins").green,
|
29
29
|
headings: ["Name", "Description", "Downloads"]
|
30
30
|
}
|
31
|
-
params[:rows] = rows
|
32
31
|
|
33
32
|
puts ""
|
34
33
|
puts Terminal::Table.new(params)
|
@@ -149,7 +149,8 @@ module Fastlane
|
|
149
149
|
rows << [(self.project.is_workspace ? "Workspace" : "Project"), self.project.path]
|
150
150
|
require 'terminal-table'
|
151
151
|
puts ""
|
152
|
-
puts Terminal::Table.new(rows: rows,
|
152
|
+
puts Terminal::Table.new(rows: FastlaneCore::PrintTable.transform_output(rows),
|
153
|
+
title: "Detected Values")
|
153
154
|
puts ""
|
154
155
|
|
155
156
|
unless self.itc_ref || self.project.mac?
|
@@ -47,7 +47,8 @@ module FastlaneCore
|
|
47
47
|
end.compact
|
48
48
|
|
49
49
|
puts ""
|
50
|
-
puts Terminal::Table.new(rows: rows,
|
50
|
+
puts Terminal::Table.new(rows: FastlaneCore::PrintTable.transform_output(rows),
|
51
|
+
title: "Detected Values from '#{path}'")
|
51
52
|
puts ""
|
52
53
|
end
|
53
54
|
|
@@ -4,7 +4,7 @@ module FastlaneCore
|
|
4
4
|
# This method prints out all the user inputs in a nice table. Useful to summarize the run
|
5
5
|
# You can pass an array to `hide_keys` if you don't want certain elements to show up (symbols or strings)
|
6
6
|
# You can pass an array to `mask_keys` if you want to mask certain elements (symbols or strings)
|
7
|
-
def print_values(config: nil, title: nil, hide_keys: [], mask_keys: [])
|
7
|
+
def print_values(config: nil, title: nil, hide_keys: [], mask_keys: [], transform: :newline)
|
8
8
|
require 'terminal-table'
|
9
9
|
|
10
10
|
options = {}
|
@@ -24,7 +24,13 @@ module FastlaneCore
|
|
24
24
|
rows = self.collect_rows(options: options, hide_keys: hide_keys.map(&:to_s), mask_keys: mask_keys.map(&:to_s), prefix: '')
|
25
25
|
|
26
26
|
params = {}
|
27
|
-
|
27
|
+
|
28
|
+
if transform
|
29
|
+
params[:rows] = transform_output(rows, transform: transform)
|
30
|
+
else
|
31
|
+
params[:rows] = rows
|
32
|
+
end
|
33
|
+
|
28
34
|
params[:title] = title.green if title
|
29
35
|
|
30
36
|
puts ""
|
@@ -34,16 +40,74 @@ module FastlaneCore
|
|
34
40
|
return params
|
35
41
|
end
|
36
42
|
|
37
|
-
def
|
43
|
+
def colorize_array(array, colors)
|
44
|
+
value = ""
|
45
|
+
array.each do |l|
|
46
|
+
colored_line = l
|
47
|
+
colored_line = "#{colors.first[0]}#{l}#{colors.last[0]}" if colors.length > 0
|
48
|
+
value << colored_line
|
49
|
+
value << "\n"
|
50
|
+
end
|
51
|
+
return value
|
52
|
+
end
|
53
|
+
|
54
|
+
def should_transform?
|
55
|
+
if FastlaneCore::Helper.ci? || FastlaneCore::Helper.test?
|
56
|
+
return false
|
57
|
+
end
|
58
|
+
return !FastlaneCore::Env.truthy?("FL_SKIP_TABLE_TRANSFORM")
|
59
|
+
end
|
60
|
+
|
61
|
+
def transform_row(column, transform, max_value_length)
|
62
|
+
return column if column.nil? # we want to keep the nil and not convert it to a string
|
63
|
+
return column if transform.nil?
|
64
|
+
|
65
|
+
value = column.to_s.dup
|
66
|
+
|
67
|
+
if transform == :truncate_middle
|
68
|
+
return value.middle_truncate(max_value_length)
|
69
|
+
elsif transform == :newline
|
70
|
+
# remove all fixed newlines as it may mess up the output
|
71
|
+
value.tr!("\n", " ") if value.kind_of?(String)
|
72
|
+
if value.length >= max_value_length
|
73
|
+
colors = value.scan(/(\e\[.*?m)/)
|
74
|
+
if colors && colors.length > 0
|
75
|
+
colors.each do |color|
|
76
|
+
value.delete!(color.first)
|
77
|
+
value.delete!(color.last)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
lines = value.wordwrap(max_value_length)
|
81
|
+
return colorize_array(lines, colors)
|
82
|
+
end
|
83
|
+
elsif transform
|
84
|
+
UI.user_error!("Unknown transform value '#{transform}'")
|
85
|
+
end
|
86
|
+
return value
|
87
|
+
end
|
88
|
+
|
89
|
+
def transform_output(rows, transform: :newline)
|
90
|
+
return rows unless should_transform?
|
91
|
+
|
38
92
|
require 'fastlane_core/string_filters'
|
93
|
+
require 'tty-screen'
|
39
94
|
|
40
|
-
|
41
|
-
|
42
|
-
rows.map
|
43
|
-
|
44
|
-
|
45
|
-
|
95
|
+
number_of_cols = TTY::Screen.width
|
96
|
+
|
97
|
+
col_count = rows.map(&:length).first || 1
|
98
|
+
|
99
|
+
# -4 per column - as tt adds "| " and " |"
|
100
|
+
terminal_table_padding = 0
|
101
|
+
max_length = number_of_cols - (col_count * terminal_table_padding)
|
102
|
+
|
103
|
+
max_value_length = (max_length / col_count)
|
104
|
+
|
105
|
+
return_array = rows.map do |row|
|
106
|
+
row.map do |column|
|
107
|
+
transform_row(column, transform, max_value_length)
|
108
|
+
end
|
46
109
|
end
|
110
|
+
return return_array
|
47
111
|
end
|
48
112
|
|
49
113
|
def collect_rows(options: nil, hide_keys: [], mask_keys: [], prefix: '', mask: '********')
|
@@ -31,4 +31,20 @@ class String
|
|
31
31
|
|
32
32
|
"#{self[0, stop]}#{omission}"
|
33
33
|
end
|
34
|
+
|
35
|
+
# Base taken from: https://www.ruby-forum.com/topic/57805
|
36
|
+
def wordwrap(length = 80)
|
37
|
+
self.gsub!(/(\S{#{length}})(?=\S)/, '\1 ')
|
38
|
+
self.scan(/.{1,#{length}}(?:\s+|$)/)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Base taken from: http://stackoverflow.com/a/12202205/1945875
|
42
|
+
def middle_truncate(length = 20, options = {})
|
43
|
+
omission = options[:omission] || '...'
|
44
|
+
return self if self.length <= length + omission.length
|
45
|
+
return self[0..length] if length < omission.length
|
46
|
+
len = (length - omission.length) / 2
|
47
|
+
s_len = len - length % 2
|
48
|
+
self[0..s_len] + omission + self[self.length - len..self.length]
|
49
|
+
end
|
34
50
|
end
|
data/gym/lib/gym/runner.rb
CHANGED
data/match/lib/match/nuke.rb
CHANGED
@@ -81,39 +81,42 @@ module Match
|
|
81
81
|
def print_tables
|
82
82
|
puts ""
|
83
83
|
if self.certs.count > 0
|
84
|
+
rows = self.certs.collect { |c| [c.name, c.id, c.class.to_s.split("::").last, c.expires.strftime("%Y-%m-%d")] }
|
84
85
|
puts Terminal::Table.new({
|
85
86
|
title: "Certificates that are going to be revoked".green,
|
86
87
|
headings: ["Name", "ID", "Type", "Expires"],
|
87
|
-
rows:
|
88
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
88
89
|
})
|
89
90
|
puts ""
|
90
91
|
end
|
91
92
|
|
92
93
|
if self.profiles.count > 0
|
94
|
+
rows = self.profiles.collect do |p|
|
95
|
+
status = p.status == 'Active' ? p.status.green : p.status.red
|
96
|
+
|
97
|
+
[p.name, p.id, status, p.type, p.expires.strftime("%Y-%m-%d")]
|
98
|
+
end
|
93
99
|
puts Terminal::Table.new({
|
94
100
|
title: "Provisioning Profiles that are going to be revoked".green,
|
95
101
|
headings: ["Name", "ID", "Status", "Type", "Expires"],
|
96
|
-
rows:
|
97
|
-
status = p.status == 'Active' ? p.status.green : p.status.red
|
98
|
-
|
99
|
-
[p.name, p.id, status, p.type, p.expires.strftime("%Y-%m-%d")]
|
100
|
-
end
|
102
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
101
103
|
})
|
102
104
|
puts ""
|
103
105
|
end
|
104
106
|
|
105
107
|
if self.files.count > 0
|
108
|
+
rows = self.files.collect do |f|
|
109
|
+
components = f.split(File::SEPARATOR)[-3..-1]
|
110
|
+
|
111
|
+
# from "...1o7xtmh/certs/distribution/8K38XUY3AY.cer" to "distribution cert"
|
112
|
+
file_type = components[0..1].reverse.join(" ")[0..-2]
|
113
|
+
|
114
|
+
[file_type, components[2]]
|
115
|
+
end
|
106
116
|
puts Terminal::Table.new({
|
107
117
|
title: "Files that are going to be deleted".green,
|
108
118
|
headings: ["Type", "File Name"],
|
109
|
-
rows:
|
110
|
-
components = f.split(File::SEPARATOR)[-3..-1]
|
111
|
-
|
112
|
-
# from "...1o7xtmh/certs/distribution/8K38XUY3AY.cer" to "distribution cert"
|
113
|
-
file_type = components[0..1].reverse.join(" ")[0..-2]
|
114
|
-
|
115
|
-
[file_type, components[2]]
|
116
|
-
end
|
119
|
+
rows: rows
|
117
120
|
})
|
118
121
|
puts ""
|
119
122
|
end
|
@@ -33,7 +33,7 @@ module Match
|
|
33
33
|
end
|
34
34
|
|
35
35
|
params = {}
|
36
|
-
params[:rows] = rows
|
36
|
+
params[:rows] = FastlaneCore::PrintTable.transform_output(rows)
|
37
37
|
params[:title] = "Installed Provisioning Profile".green
|
38
38
|
params[:headings] = ['Parameter', 'Environment Variable', 'Value']
|
39
39
|
|
@@ -158,10 +158,11 @@ module Pilot
|
|
158
158
|
|
159
159
|
# Requires a block that accepts a tester and returns an array of tester column values
|
160
160
|
def list(all_testers, title, headings)
|
161
|
+
rows = all_testers.map { |tester| yield tester }
|
161
162
|
puts Terminal::Table.new(
|
162
163
|
title: title.green,
|
163
164
|
headings: headings,
|
164
|
-
rows:
|
165
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
165
166
|
)
|
166
167
|
end
|
167
168
|
|
@@ -201,7 +202,7 @@ module Pilot
|
|
201
202
|
|
202
203
|
puts Terminal::Table.new(
|
203
204
|
title: tester.email.green,
|
204
|
-
rows: rows
|
205
|
+
rows: FastlaneCore::PrintTable.transform_output(rows)
|
205
206
|
)
|
206
207
|
end
|
207
208
|
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.27.0.beta.
|
4
|
+
version: 2.27.0.beta.20170409010031
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-04-
|
17
|
+
date: 2017-04-09 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: slack-notifier
|
@@ -1297,23 +1297,23 @@ metadata:
|
|
1297
1297
|
post_install_message:
|
1298
1298
|
rdoc_options: []
|
1299
1299
|
require_paths:
|
1300
|
-
- fastlane_core/lib
|
1301
|
-
- spaceship/lib
|
1302
|
-
- pilot/lib
|
1303
|
-
- screengrab/lib
|
1304
|
-
- credentials_manager/lib
|
1305
|
-
- match/lib
|
1306
|
-
- gym/lib
|
1307
|
-
- pem/lib
|
1308
|
-
- snapshot/lib
|
1309
|
-
- frameit/lib
|
1310
|
-
- fastlane/lib
|
1311
1300
|
- deliver/lib
|
1301
|
+
- pilot/lib
|
1312
1302
|
- produce/lib
|
1303
|
+
- frameit/lib
|
1313
1304
|
- cert/lib
|
1314
|
-
-
|
1305
|
+
- spaceship/lib
|
1315
1306
|
- scan/lib
|
1307
|
+
- fastlane_core/lib
|
1308
|
+
- snapshot/lib
|
1309
|
+
- fastlane/lib
|
1310
|
+
- credentials_manager/lib
|
1311
|
+
- gym/lib
|
1312
|
+
- screengrab/lib
|
1316
1313
|
- sigh/lib
|
1314
|
+
- supply/lib
|
1315
|
+
- pem/lib
|
1316
|
+
- match/lib
|
1317
1317
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1318
1318
|
requirements:
|
1319
1319
|
- - ">="
|