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
@@ -158,6 +158,24 @@ module Spaceship
|
|
158
158
|
super
|
159
159
|
end
|
160
160
|
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# The factory class-method. This should only be used or overridden in very specific use-cases
|
164
|
+
#
|
165
|
+
# The only time it makes sense to use or override this method is when we want a base class
|
166
|
+
# to return a sub-class based on attributes.
|
167
|
+
#
|
168
|
+
# Here, we define the method to be the same as `Spaceship::Base.new(attrs)`, be it should
|
169
|
+
# be used only by classes that override it.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# Certificate.factory(attrs)
|
174
|
+
# #=> #<PushCertificate ... >
|
175
|
+
#
|
176
|
+
def factory(attrs)
|
177
|
+
self.new(attrs)
|
178
|
+
end
|
161
179
|
end
|
162
180
|
|
163
181
|
##
|
@@ -79,8 +79,8 @@ module Spaceship
|
|
79
79
|
|
80
80
|
[
|
81
81
|
"Apple provided the following error info:",
|
82
|
-
|
83
|
-
|
82
|
+
@error_info['resultString'],
|
83
|
+
@error_info['userString']
|
84
84
|
].compact.uniq # sometimes 'resultString' and 'userString' are the same value
|
85
85
|
end
|
86
86
|
end
|
@@ -395,7 +395,7 @@ module Spaceship
|
|
395
395
|
rescue UnauthorizedAccessError => ex
|
396
396
|
if @loggedin && !(tries -= 1).zero?
|
397
397
|
msg = "Auth error received: '#{ex.message}'. Login in again then retrying after 3 seconds (remaining: #{tries})..."
|
398
|
-
puts msg if
|
398
|
+
puts msg if Spaceship::Globals.verbose?
|
399
399
|
logger.warn msg
|
400
400
|
|
401
401
|
if self.class.spaceship_session_env.to_s.length > 0
|
@@ -438,15 +438,18 @@ module Spaceship
|
|
438
438
|
if response.body
|
439
439
|
# If we have an `expected_key`, select that from response.body Hash
|
440
440
|
# Else, don't.
|
441
|
+
|
442
|
+
# the returned error message and info, is html encoded -> "issued" -> make this readable -> "issued"
|
443
|
+
response.body["userString"] = CGI.unescapeHTML(response.body["userString"]) if response.body["userString"]
|
444
|
+
response.body["resultString"] = CGI.unescapeHTML(response.body["resultString"]) if response.body["resultString"]
|
445
|
+
|
441
446
|
content = expected_key ? response.body[expected_key] : response.body
|
442
447
|
end
|
443
|
-
|
444
448
|
if content.nil?
|
445
449
|
# Check if the failure is due to missing permissions (iTunes Connect)
|
446
450
|
if response.body && response.body["messages"] && response.body["messages"]["error"].include?("Forbidden")
|
447
451
|
raise_insuffient_permission_error!
|
448
452
|
end
|
449
|
-
|
450
453
|
raise UnexpectedResponse, response.body
|
451
454
|
elsif content.kind_of?(Hash) && (content["resultString"] || "").include?("NotAllowed")
|
452
455
|
# example content when doing a Developer Portal action with not enough permission
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Spaceship
|
2
|
+
class Globals
|
3
|
+
# if spaceship is run with a FastlaneCore available respect the global state there
|
4
|
+
# otherwise fallback to $verbose
|
5
|
+
def self.verbose?
|
6
|
+
if Object.const_defined?("FastlaneCore")
|
7
|
+
return FastlaneCore::Globals.verbose?
|
8
|
+
end
|
9
|
+
return $verbose
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -68,12 +68,6 @@ module Spaceship
|
|
68
68
|
)
|
69
69
|
|
70
70
|
class << self
|
71
|
-
# Create a new object based on a hash.
|
72
|
-
# This is used to create a new object based on the server response.
|
73
|
-
def factory(attrs)
|
74
|
-
self.new(attrs)
|
75
|
-
end
|
76
|
-
|
77
71
|
# @param mac [Bool] Fetches Mac apps if true
|
78
72
|
# @return (Array) Returns all apps available for this account
|
79
73
|
def all(mac: false)
|
@@ -36,12 +36,6 @@ module Spaceship
|
|
36
36
|
)
|
37
37
|
|
38
38
|
class << self
|
39
|
-
# Create a new object based on a hash.
|
40
|
-
# This is used to create a new object based on the server response.
|
41
|
-
def factory(attrs)
|
42
|
-
self.new(attrs)
|
43
|
-
end
|
44
|
-
|
45
39
|
# @return (Array) Returns all app groups available for this account
|
46
40
|
def all
|
47
41
|
client.app_groups.map { |group| self.factory(group) }
|
@@ -52,12 +52,6 @@ module Spaceship
|
|
52
52
|
})
|
53
53
|
|
54
54
|
class << self
|
55
|
-
# Create a new object based on a hash.
|
56
|
-
# This is used to create a new object based on the server response.
|
57
|
-
def factory(attrs)
|
58
|
-
self.new(attrs)
|
59
|
-
end
|
60
|
-
|
61
55
|
# @param mac [Bool] Fetches Mac devices if true
|
62
56
|
# @param include_disabled [Bool] Whether to include disable devices. false by default.
|
63
57
|
# @return (Array) Returns all devices registered for this account
|
@@ -199,6 +199,43 @@ module Spaceship
|
|
199
199
|
parse_response(r, 'appId')
|
200
200
|
end
|
201
201
|
|
202
|
+
#####################################################
|
203
|
+
# @!group Website Push
|
204
|
+
#####################################################
|
205
|
+
|
206
|
+
def website_push(mac: false)
|
207
|
+
paging do |page_number|
|
208
|
+
r = request(:post, "account/#{platform_slug(mac)}/identifiers/listWebsitePushIds.action", {
|
209
|
+
teamId: team_id,
|
210
|
+
pageNumber: page_number,
|
211
|
+
pageSize: page_size,
|
212
|
+
sort: 'name=asc'
|
213
|
+
})
|
214
|
+
parse_response(r, 'websitePushIdList')
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
def create_website_push!(name, bundle_id, mac: false)
|
219
|
+
ensure_csrf(Spaceship::WebsitePush)
|
220
|
+
|
221
|
+
r = request(:post, "account/#{platform_slug(mac)}/identifiers/addWebsitePushId.action", {
|
222
|
+
name: name,
|
223
|
+
identifier: bundle_id,
|
224
|
+
teamId: team_id
|
225
|
+
})
|
226
|
+
parse_response(r, 'websitePushId')
|
227
|
+
end
|
228
|
+
|
229
|
+
def delete_website_push!(website_id, mac: false)
|
230
|
+
ensure_csrf(Spaceship::WebsitePush)
|
231
|
+
|
232
|
+
r = request(:post, "account/#{platform_slug(mac)}/identifiers/deleteWebsitePushId.action", {
|
233
|
+
teamId: team_id,
|
234
|
+
websitePushId: website_id
|
235
|
+
})
|
236
|
+
parse_response(r)
|
237
|
+
end
|
238
|
+
|
202
239
|
#####################################################
|
203
240
|
# @!group App Groups
|
204
241
|
#####################################################
|
@@ -44,6 +44,11 @@ module Spaceship
|
|
44
44
|
Spaceship::App.set_client(@client)
|
45
45
|
end
|
46
46
|
|
47
|
+
# @return (Class) Access the website pushes for the spaceship
|
48
|
+
def website_push
|
49
|
+
Spaceship::WebsitePush.set_client(@client)
|
50
|
+
end
|
51
|
+
|
47
52
|
# @return (Class) Access the app groups for the spaceship
|
48
53
|
def app_group
|
49
54
|
Spaceship::AppGroup.set_client(@client)
|
@@ -85,6 +90,10 @@ module Spaceship
|
|
85
90
|
Spaceship::Portal.app
|
86
91
|
end
|
87
92
|
|
93
|
+
def website_push
|
94
|
+
Spaceship::Portal.website_push
|
95
|
+
end
|
96
|
+
|
88
97
|
def app_group
|
89
98
|
Spaceship::Portal.app_group
|
90
99
|
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
module Spaceship
|
2
|
+
module Portal
|
3
|
+
# Represents an Website Push ID from the Developer Portal
|
4
|
+
class WebsitePush < PortalBase
|
5
|
+
# @return (String) The identifier of this website push, provided by the Dev Portal
|
6
|
+
# @example
|
7
|
+
# "RGAWZGXSAA"
|
8
|
+
attr_accessor :website_id
|
9
|
+
|
10
|
+
# @return (String) The name you provided for this website push
|
11
|
+
# @example
|
12
|
+
# "Spaceship"
|
13
|
+
attr_accessor :name
|
14
|
+
|
15
|
+
# @return (String) the supported platform of this website push
|
16
|
+
# @example
|
17
|
+
# "ios"
|
18
|
+
attr_accessor :platform
|
19
|
+
|
20
|
+
# Prefix provided by the Dev Portal
|
21
|
+
# @example
|
22
|
+
# "5A997XSHK2"
|
23
|
+
attr_accessor :prefix
|
24
|
+
|
25
|
+
# @return (String) The bundle_id (website identifier) of website push id
|
26
|
+
# @example
|
27
|
+
# "web.com.krausefx.app"
|
28
|
+
attr_accessor :bundle_id
|
29
|
+
|
30
|
+
# @return (String) Status of the website push
|
31
|
+
# @example
|
32
|
+
# "current"
|
33
|
+
attr_accessor :status
|
34
|
+
|
35
|
+
attr_mapping(
|
36
|
+
'websitePushId' => :website_id,
|
37
|
+
'name' => :name,
|
38
|
+
'prefix' => :prefix,
|
39
|
+
'identifier' => :bundle_id,
|
40
|
+
'status' => :status
|
41
|
+
)
|
42
|
+
|
43
|
+
class << self
|
44
|
+
# Create a new object based on a hash.
|
45
|
+
# This is used to create a new object based on the server response.
|
46
|
+
def factory(attrs)
|
47
|
+
self.new(attrs)
|
48
|
+
end
|
49
|
+
|
50
|
+
# @param mac [Bool] Fetches Mac website push if true
|
51
|
+
# @return (Array) Returns all website push available for this account
|
52
|
+
def all(mac: false)
|
53
|
+
client.website_push(mac: mac).map { |website_push| self.factory(website_push) }
|
54
|
+
end
|
55
|
+
|
56
|
+
# Creates a new Website Push ID on the Apple Dev Portal
|
57
|
+
#
|
58
|
+
# @param bundle_id [String] the bundle id (website_push_identifier) of the website push
|
59
|
+
# @param name [String] the name of the Website Push
|
60
|
+
# @param mac [Bool] is this a Mac Website Push?
|
61
|
+
# @return (Website Push) The Website Push you just created
|
62
|
+
def create!(bundle_id: nil, name: nil, mac: false)
|
63
|
+
new_website_push = client.create_website_push!(name, bundle_id, mac: mac)
|
64
|
+
self.new(new_website_push)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Find a specific Website Push ID based on the bundle_id
|
68
|
+
# @param mac [Bool] Searches Mac website pushes if true
|
69
|
+
# @return (Website Push) The website push you're looking for. This is nil if the website push can't be found.
|
70
|
+
def find(bundle_id, mac: false)
|
71
|
+
all(mac: mac).find do |website_push|
|
72
|
+
website_push.bundle_id == bundle_id
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Delete this Website Push ID.
|
78
|
+
# @return (Website Push) The website you just deleted
|
79
|
+
def delete!
|
80
|
+
client.delete_website_push!(website_id, mac: mac?)
|
81
|
+
self
|
82
|
+
end
|
83
|
+
|
84
|
+
# @return (Bool) Is this a Mac website push?
|
85
|
+
def mac?
|
86
|
+
platform == 'mac'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -85,15 +85,6 @@ module Spaceship
|
|
85
85
|
'ratingFiveCount' => :five_star_rating_count
|
86
86
|
})
|
87
87
|
|
88
|
-
class << self
|
89
|
-
# Create a new object based on a hash.
|
90
|
-
# This is used to create a new object based on the server response.
|
91
|
-
def factory(attrs)
|
92
|
-
obj = self.new(attrs)
|
93
|
-
return obj
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
88
|
# @return (Float) the average rating for this summary (rounded to 2 decimal places)
|
98
89
|
def average_rating
|
99
90
|
((self.one_star_rating_count +
|
@@ -584,6 +584,7 @@ module Spaceship
|
|
584
584
|
lang_details = languages[0]
|
585
585
|
display_families = lang_details["displayFamilies"]["value"]
|
586
586
|
device_details = display_families.find { |display_family| display_family['name'] == device }
|
587
|
+
raise "Couldn't find device familiy for #{device}" if device_details.nil?
|
587
588
|
raise "Unexpected state: missing device details for #{device}" unless device_details.key?(data_field)
|
588
589
|
return device_details[data_field]
|
589
590
|
rescue => ex
|
@@ -17,15 +17,6 @@ module Spaceship
|
|
17
17
|
'username' => :username
|
18
18
|
})
|
19
19
|
|
20
|
-
class << self
|
21
|
-
# Create a new object based on a hash.
|
22
|
-
# This is used to create a new object based on the server response.
|
23
|
-
def factory(attrs)
|
24
|
-
obj = self.new(attrs)
|
25
|
-
return obj
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
20
|
def setup
|
30
21
|
@version = Tunes::AppVersionPromocodes.factory(raw_data['version'])
|
31
22
|
@codes = raw_data['codes']
|
@@ -21,15 +21,6 @@ module Spaceship
|
|
21
21
|
'items' => :items
|
22
22
|
})
|
23
23
|
|
24
|
-
class << self
|
25
|
-
# Create a new object based on a hash.
|
26
|
-
# This is used to create a new object based on the server response.
|
27
|
-
def factory(attrs)
|
28
|
-
obj = self.new(attrs)
|
29
|
-
return obj
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
24
|
# Returns an array of all builds that can be sent to review
|
34
25
|
def items
|
35
26
|
@items ||= fetch_items
|
@@ -20,15 +20,6 @@ module Spaceship
|
|
20
20
|
'maximumNumberOfCodes' => :maximum_number_of_codes,
|
21
21
|
'contractFileName' => :contract_file_name
|
22
22
|
})
|
23
|
-
|
24
|
-
class << self
|
25
|
-
# Create a new object based on a hash.
|
26
|
-
# This is used to create a new object based on the server response.
|
27
|
-
def factory(attrs)
|
28
|
-
obj = self.new(attrs)
|
29
|
-
return obj
|
30
|
-
end
|
31
|
-
end
|
32
23
|
end
|
33
24
|
end
|
34
25
|
end
|
@@ -20,15 +20,6 @@ module Spaceship
|
|
20
20
|
'userEmail' => :user_email,
|
21
21
|
'date' => :date
|
22
22
|
})
|
23
|
-
|
24
|
-
class << self
|
25
|
-
# Create a new object based on a hash.
|
26
|
-
# This is used to create a new object based on the server response.
|
27
|
-
def factory(attrs)
|
28
|
-
obj = self.new(attrs)
|
29
|
-
return obj
|
30
|
-
end
|
31
|
-
end
|
32
23
|
end
|
33
24
|
end
|
34
25
|
end
|