fastlane 2.28.0.beta.20170420010017 → 2.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fastlane/lib/fastlane/actions/hockey.rb +9 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core.rb +1 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +37 -0
- data/pilot/lib/pilot/build_manager.rb +23 -100
- data/pilot/lib/pilot/tester_manager.rb +5 -12
- data/snapshot/lib/snapshot/setup.rb +0 -2
- data/spaceship/lib/spaceship.rb +1 -0
- data/spaceship/lib/spaceship/base.rb +10 -0
- data/spaceship/lib/spaceship/client.rb +71 -2
- data/spaceship/lib/spaceship/test_flight.rb +9 -0
- data/spaceship/lib/spaceship/test_flight/base.rb +11 -0
- data/spaceship/lib/spaceship/test_flight/beta_review_info.rb +16 -0
- data/spaceship/lib/spaceship/test_flight/build.rb +172 -0
- data/spaceship/lib/spaceship/test_flight/build_trains.rb +42 -0
- data/spaceship/lib/spaceship/test_flight/client.rb +145 -0
- data/spaceship/lib/spaceship/test_flight/export_compliance.rb +10 -0
- data/spaceship/lib/spaceship/test_flight/group.rb +51 -0
- data/spaceship/lib/spaceship/test_flight/test_info.rb +34 -0
- data/spaceship/lib/spaceship/tunes/application.rb +2 -52
- data/spaceship/lib/spaceship/tunes/tester.rb +9 -8
- metadata +55 -17
- data/snapshot/lib/assets/SnapshotHelper2-3.swift +0 -164
@@ -0,0 +1,34 @@
|
|
1
|
+
module Spaceship::TestFlight
|
2
|
+
class TestInfo < Base
|
3
|
+
# TestInfo Contains a collection of info for testers. There is one "testInfo" for each locale.
|
4
|
+
#
|
5
|
+
# For now, when we set a value it sets the same value for all locales
|
6
|
+
# When getting a value, we return the first locale values
|
7
|
+
|
8
|
+
attr_accessor :description, :feedback_email, :whats_new
|
9
|
+
|
10
|
+
def description
|
11
|
+
raw_data.first['description']
|
12
|
+
end
|
13
|
+
|
14
|
+
def description=(value)
|
15
|
+
raw_data.each { |locale| locale['description'] = value }
|
16
|
+
end
|
17
|
+
|
18
|
+
def feedback_email
|
19
|
+
raw_data.first['feedbackEmail']
|
20
|
+
end
|
21
|
+
|
22
|
+
def feedback_email=(value)
|
23
|
+
raw_data.each { |locale| locale['feedbackEmail'] = value }
|
24
|
+
end
|
25
|
+
|
26
|
+
def whats_new
|
27
|
+
raw_data.first['whatsNew']
|
28
|
+
end
|
29
|
+
|
30
|
+
def whats_new=(value)
|
31
|
+
raw_data.each { |locale| locale['whatsNew'] = value }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -370,58 +370,8 @@ module Spaceship
|
|
370
370
|
# @!group Testers
|
371
371
|
#####################################################
|
372
372
|
|
373
|
-
|
374
|
-
|
375
|
-
Tunes::Tester.external.add_all_to_app!(self.apple_id)
|
376
|
-
Tunes::Tester.internal.add_all_to_app!(self.apple_id)
|
377
|
-
end
|
378
|
-
|
379
|
-
# @return (Array) Returns all external testers available for this app
|
380
|
-
def external_testers
|
381
|
-
Tunes::Tester.external.all_by_app(self.apple_id)
|
382
|
-
end
|
383
|
-
|
384
|
-
# @return (Array) Returns all internal testers available for this app
|
385
|
-
def internal_testers
|
386
|
-
Tunes::Tester.internal.all_by_app(self.apple_id)
|
387
|
-
end
|
388
|
-
|
389
|
-
# @return (Spaceship::Tunes::Tester.external) Returns the external tester matching the parameter
|
390
|
-
# as either the Tester id or email
|
391
|
-
# @param identifier (String) (required): Value used to filter the tester
|
392
|
-
def find_external_tester(identifier)
|
393
|
-
Tunes::Tester.external.find_by_app(self.apple_id, identifier)
|
394
|
-
end
|
395
|
-
|
396
|
-
# @return (Spaceship::Tunes::Tester.internal) Returns the internal tester matching the parameter
|
397
|
-
# as either the Tester id or email
|
398
|
-
# @param identifier (String) (required): Value used to filter the tester
|
399
|
-
def find_internal_tester(identifier)
|
400
|
-
Tunes::Tester.internal.find_by_app(self.apple_id, identifier)
|
401
|
-
end
|
402
|
-
|
403
|
-
# Add external tester to the current app list, if it doesn't exist will be created
|
404
|
-
# @param email (String) (required): The email of the tester
|
405
|
-
# @param first_name (String) (optional): The first name of the tester (Ignored if user already exist)
|
406
|
-
# @param last_name (String) (optional): The last name of the tester (Ignored if user already exist)
|
407
|
-
def add_external_tester!(email: nil, first_name: nil, last_name: nil)
|
408
|
-
raise "Tester is already on #{self.name} betatesters" if find_external_tester(email)
|
409
|
-
|
410
|
-
tester = Tunes::Tester.external.find(email) || Tunes::Tester.external.create!(email: email,
|
411
|
-
first_name: first_name,
|
412
|
-
last_name: last_name)
|
413
|
-
tester.add_to_app!(self.apple_id)
|
414
|
-
end
|
415
|
-
|
416
|
-
# Remove external tester from the current app list that matching the parameter
|
417
|
-
# as either the Tester id or email
|
418
|
-
# @param identifier (String) (required): Value used to filter the tester
|
419
|
-
def remove_external_tester!(identifier)
|
420
|
-
tester = find_external_tester(identifier)
|
421
|
-
|
422
|
-
raise "Tester is not on #{self.name} betatesters" unless tester
|
423
|
-
|
424
|
-
tester.remove_from_app!(self.apple_id)
|
373
|
+
def default_external_group
|
374
|
+
TestFlight::Group.default_external_group(self.apple_id)
|
425
375
|
end
|
426
376
|
|
427
377
|
#####################################################
|
@@ -101,12 +101,13 @@ module Spaceship
|
|
101
101
|
# Spaceship::Tunes::Tester.external.create!(email: "tester@mathiascarignani.com", first_name: "Cary", last_name: "Bennett", groups: ["Testers"])
|
102
102
|
# @return (Tester): The newly created tester
|
103
103
|
def create!(email: nil, first_name: nil, last_name: nil, groups: nil)
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
104
|
+
client.create_tester!(tester: self,
|
105
|
+
email: email,
|
106
|
+
first_name: first_name,
|
107
|
+
last_name: last_name,
|
108
|
+
groups: groups)
|
109
|
+
# We don't need to do additional parsing here, as `create_tester!` automatically
|
110
|
+
# re-fetches the newly created tester
|
110
111
|
end
|
111
112
|
|
112
113
|
#####################################################
|
@@ -190,13 +191,13 @@ module Spaceship
|
|
190
191
|
# Add current tester to list of the app testers
|
191
192
|
# @param app_id (String) (required): The id of the application to which want to modify the list
|
192
193
|
def add_to_app!(app_id)
|
193
|
-
|
194
|
+
raise "`[tester].add_to_app!` got removed from spaceship as the TestFlight API changed, please use `app.default_external_group.add_tester!(tester)` instead"
|
194
195
|
end
|
195
196
|
|
196
197
|
# Remove current tester from list of the app testers
|
197
198
|
# @param app_id (String) (required): The id of the application to which want to modify the list
|
198
199
|
def remove_from_app!(app_id)
|
199
|
-
|
200
|
+
raise "`[tester].remove_from_app!` got removed from spaceship as the TestFlight API changed, please use `app.default_external_group.remove_tester!(tester)` instead"
|
200
201
|
end
|
201
202
|
|
202
203
|
#####################################################
|
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.28.0
|
4
|
+
version: 2.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -617,6 +617,34 @@ dependencies:
|
|
617
617
|
- - ">="
|
618
618
|
- !ruby/object:Gem::Version
|
619
619
|
version: '0'
|
620
|
+
- !ruby/object:Gem::Dependency
|
621
|
+
name: pry-rescue
|
622
|
+
requirement: !ruby/object:Gem::Requirement
|
623
|
+
requirements:
|
624
|
+
- - ">="
|
625
|
+
- !ruby/object:Gem::Version
|
626
|
+
version: '0'
|
627
|
+
type: :development
|
628
|
+
prerelease: false
|
629
|
+
version_requirements: !ruby/object:Gem::Requirement
|
630
|
+
requirements:
|
631
|
+
- - ">="
|
632
|
+
- !ruby/object:Gem::Version
|
633
|
+
version: '0'
|
634
|
+
- !ruby/object:Gem::Dependency
|
635
|
+
name: pry-stack_explorer
|
636
|
+
requirement: !ruby/object:Gem::Requirement
|
637
|
+
requirements:
|
638
|
+
- - ">="
|
639
|
+
- !ruby/object:Gem::Version
|
640
|
+
version: '0'
|
641
|
+
type: :development
|
642
|
+
prerelease: false
|
643
|
+
version_requirements: !ruby/object:Gem::Requirement
|
644
|
+
requirements:
|
645
|
+
- - ">="
|
646
|
+
- !ruby/object:Gem::Version
|
647
|
+
version: '0'
|
620
648
|
- !ruby/object:Gem::Dependency
|
621
649
|
name: yard
|
622
650
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1032,6 +1060,7 @@ files:
|
|
1032
1060
|
- fastlane_core/README.md
|
1033
1061
|
- fastlane_core/lib/assets/XMLTemplate.xml.erb
|
1034
1062
|
- fastlane_core/lib/fastlane_core.rb
|
1063
|
+
- fastlane_core/lib/fastlane_core/build_watcher.rb
|
1035
1064
|
- fastlane_core/lib/fastlane_core/cert_checker.rb
|
1036
1065
|
- fastlane_core/lib/fastlane_core/command_executor.rb
|
1037
1066
|
- fastlane_core/lib/fastlane_core/configuration/commander_generator.rb
|
@@ -1190,7 +1219,6 @@ files:
|
|
1190
1219
|
- snapshot/README.md
|
1191
1220
|
- snapshot/lib/assets/SnapfileTemplate
|
1192
1221
|
- snapshot/lib/assets/SnapshotHelper.swift
|
1193
|
-
- snapshot/lib/assets/SnapshotHelper2-3.swift
|
1194
1222
|
- snapshot/lib/snapshot.rb
|
1195
1223
|
- snapshot/lib/snapshot/collector.rb
|
1196
1224
|
- snapshot/lib/snapshot/commands_generator.rb
|
@@ -1242,6 +1270,15 @@ files:
|
|
1242
1270
|
- spaceship/lib/spaceship/portal/ui/select_team.rb
|
1243
1271
|
- spaceship/lib/spaceship/portal/website_push.rb
|
1244
1272
|
- spaceship/lib/spaceship/spaceauth_runner.rb
|
1273
|
+
- spaceship/lib/spaceship/test_flight.rb
|
1274
|
+
- spaceship/lib/spaceship/test_flight/base.rb
|
1275
|
+
- spaceship/lib/spaceship/test_flight/beta_review_info.rb
|
1276
|
+
- spaceship/lib/spaceship/test_flight/build.rb
|
1277
|
+
- spaceship/lib/spaceship/test_flight/build_trains.rb
|
1278
|
+
- spaceship/lib/spaceship/test_flight/client.rb
|
1279
|
+
- spaceship/lib/spaceship/test_flight/export_compliance.rb
|
1280
|
+
- spaceship/lib/spaceship/test_flight/group.rb
|
1281
|
+
- spaceship/lib/spaceship/test_flight/test_info.rb
|
1245
1282
|
- spaceship/lib/spaceship/tunes/app_details.rb
|
1246
1283
|
- spaceship/lib/spaceship/tunes/app_image.rb
|
1247
1284
|
- spaceship/lib/spaceship/tunes/app_ratings.rb
|
@@ -1304,23 +1341,23 @@ metadata:
|
|
1304
1341
|
post_install_message:
|
1305
1342
|
rdoc_options: []
|
1306
1343
|
require_paths:
|
1307
|
-
- pilot/lib
|
1308
1344
|
- cert/lib
|
1309
|
-
-
|
1345
|
+
- credentials_manager/lib
|
1310
1346
|
- deliver/lib
|
1311
|
-
- match/lib
|
1312
|
-
- snapshot/lib
|
1313
|
-
- screengrab/lib
|
1314
|
-
- supply/lib
|
1315
|
-
- spaceship/lib
|
1316
|
-
- scan/lib
|
1317
|
-
- frameit/lib
|
1318
1347
|
- fastlane/lib
|
1319
|
-
- sigh/lib
|
1320
|
-
- produce/lib
|
1321
|
-
- credentials_manager/lib
|
1322
1348
|
- fastlane_core/lib
|
1349
|
+
- frameit/lib
|
1323
1350
|
- gym/lib
|
1351
|
+
- match/lib
|
1352
|
+
- pem/lib
|
1353
|
+
- pilot/lib
|
1354
|
+
- produce/lib
|
1355
|
+
- scan/lib
|
1356
|
+
- screengrab/lib
|
1357
|
+
- sigh/lib
|
1358
|
+
- snapshot/lib
|
1359
|
+
- spaceship/lib
|
1360
|
+
- supply/lib
|
1324
1361
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1325
1362
|
requirements:
|
1326
1363
|
- - ">="
|
@@ -1328,14 +1365,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1328
1365
|
version: 2.0.0
|
1329
1366
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1330
1367
|
requirements:
|
1331
|
-
- - "
|
1368
|
+
- - ">="
|
1332
1369
|
- !ruby/object:Gem::Version
|
1333
|
-
version:
|
1370
|
+
version: '0'
|
1334
1371
|
requirements: []
|
1335
1372
|
rubyforge_project:
|
1336
|
-
rubygems_version: 2.
|
1373
|
+
rubygems_version: 2.5.2
|
1337
1374
|
signing_key:
|
1338
1375
|
specification_version: 4
|
1339
1376
|
summary: The easiest way to automate beta deployments and releases for your iOS and
|
1340
1377
|
Android apps
|
1341
1378
|
test_files: []
|
1379
|
+
has_rdoc:
|
@@ -1,164 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// SnapshotHelper.swift
|
3
|
-
// Example
|
4
|
-
//
|
5
|
-
// Created by Felix Krause on 10/8/15.
|
6
|
-
// Copyright © 2015 Felix Krause. All rights reserved.
|
7
|
-
//
|
8
|
-
|
9
|
-
// This file should be used if your UI Tests are written in Swift 2.3
|
10
|
-
|
11
|
-
import Foundation
|
12
|
-
import XCTest
|
13
|
-
|
14
|
-
var deviceLanguage = ""
|
15
|
-
var locale = ""
|
16
|
-
|
17
|
-
@available(*, deprecated, message="use setupSnapshot: instead")
|
18
|
-
func setLanguage(app: XCUIApplication) {
|
19
|
-
setupSnapshot(app)
|
20
|
-
}
|
21
|
-
|
22
|
-
func setupSnapshot(app: XCUIApplication) {
|
23
|
-
Snapshot.setupSnapshot(app)
|
24
|
-
}
|
25
|
-
|
26
|
-
func snapshot(name: String, waitForLoadingIndicator: Bool = true) {
|
27
|
-
Snapshot.snapshot(name, waitForLoadingIndicator: waitForLoadingIndicator)
|
28
|
-
}
|
29
|
-
|
30
|
-
public class Snapshot: NSObject {
|
31
|
-
|
32
|
-
public class func setupSnapshot(app: XCUIApplication) {
|
33
|
-
setLanguage(app)
|
34
|
-
setLocale(app)
|
35
|
-
setLaunchArguments(app)
|
36
|
-
}
|
37
|
-
|
38
|
-
class func setLanguage(app: XCUIApplication) {
|
39
|
-
guard let prefix = pathPrefix() else {
|
40
|
-
return
|
41
|
-
}
|
42
|
-
|
43
|
-
let path = prefix.stringByAppendingPathComponent("language.txt")
|
44
|
-
|
45
|
-
do {
|
46
|
-
let trimCharacterSet = NSCharacterSet.whitespaceAndNewlineCharacterSet()
|
47
|
-
deviceLanguage = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding).stringByTrimmingCharactersInSet(trimCharacterSet) as String
|
48
|
-
app.launchArguments += ["-AppleLanguages", "(\(deviceLanguage))"]
|
49
|
-
} catch {
|
50
|
-
print("Couldn't detect/set language...")
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
class func setLocale(app: XCUIApplication) {
|
55
|
-
guard let prefix = pathPrefix() else {
|
56
|
-
return
|
57
|
-
}
|
58
|
-
|
59
|
-
let path = prefix.stringByAppendingPathComponent("locale.txt")
|
60
|
-
|
61
|
-
do {
|
62
|
-
let trimCharacterSet = NSCharacterSet.whitespaceAndNewlineCharacterSet()
|
63
|
-
locale = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding).stringByTrimmingCharactersInSet(trimCharacterSet) as String
|
64
|
-
} catch {
|
65
|
-
print("Couldn't detect/set locale...")
|
66
|
-
}
|
67
|
-
if locale.isEmpty {
|
68
|
-
locale = NSLocale(localeIdentifier: deviceLanguage).localeIdentifier
|
69
|
-
}
|
70
|
-
app.launchArguments += ["-AppleLocale", "\"\(locale)\""]
|
71
|
-
}
|
72
|
-
|
73
|
-
class func setLaunchArguments(app: XCUIApplication) {
|
74
|
-
guard let prefix = pathPrefix() else {
|
75
|
-
return
|
76
|
-
}
|
77
|
-
|
78
|
-
let path = prefix.stringByAppendingPathComponent("snapshot-launch_arguments.txt")
|
79
|
-
app.launchArguments += ["-FASTLANE_SNAPSHOT", "YES", "-ui_testing"]
|
80
|
-
|
81
|
-
do {
|
82
|
-
let launchArguments = try NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String
|
83
|
-
let regex = try NSRegularExpression(pattern: "(\\\".+?\\\"|\\S+)", options: [])
|
84
|
-
let matches = regex.matchesInString(launchArguments, options: [], range: NSRange(location:0, length:launchArguments.characters.count))
|
85
|
-
let results = matches.map { result -> String in
|
86
|
-
(launchArguments as NSString).substringWithRange(result.range)
|
87
|
-
}
|
88
|
-
app.launchArguments += results
|
89
|
-
} catch {
|
90
|
-
print("Couldn't detect/set launch_arguments...")
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
public class func snapshot(name: String, waitForLoadingIndicator: Bool = true) {
|
95
|
-
if waitForLoadingIndicator {
|
96
|
-
waitForLoadingIndicatorToDisappear()
|
97
|
-
}
|
98
|
-
|
99
|
-
print("snapshot: \(name)") // more information about this, check out https://github.com/fastlane/fastlane/tree/master/snapshot#how-does-it-work
|
100
|
-
|
101
|
-
sleep(1) // Waiting for the animation to be finished (kind of)
|
102
|
-
|
103
|
-
#if os(tvOS)
|
104
|
-
XCUIApplication().childrenMatchingType(.Browser).count
|
105
|
-
#elseif os(OSX)
|
106
|
-
XCUIApplication().typeKey(XCUIKeyboardKeySecondaryFn, modifierFlags: [])
|
107
|
-
#else
|
108
|
-
XCUIDevice.sharedDevice().orientation = .Unknown
|
109
|
-
#endif
|
110
|
-
}
|
111
|
-
|
112
|
-
class func waitForLoadingIndicatorToDisappear() {
|
113
|
-
#if os(tvOS)
|
114
|
-
return
|
115
|
-
#endif
|
116
|
-
|
117
|
-
let query = XCUIApplication().statusBars.childrenMatchingType(.Other).elementBoundByIndex(1).childrenMatchingType(.Other)
|
118
|
-
|
119
|
-
while (0..<query.count).map({ query.elementBoundByIndex($0) }).contains({ $0.isLoadingIndicator }) {
|
120
|
-
sleep(1)
|
121
|
-
print("Waiting for loading indicator to disappear...")
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
class func pathPrefix() -> NSString? {
|
126
|
-
var homeDir: NSString
|
127
|
-
//on OSX config is stored in /Users/<username>/Library
|
128
|
-
//and on iOS/tvOS/WatchOS it's in simulator's home dir
|
129
|
-
#if os(OSX)
|
130
|
-
|
131
|
-
guard let user = ProcessInfo().environment["USER"] else {
|
132
|
-
print("Couldn't find Snapshot configuration files - can't detect current user ")
|
133
|
-
return nil
|
134
|
-
}
|
135
|
-
|
136
|
-
guard let usersDir = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.NSUserDirectory, NSSearchPathDomainMask.NSLocalDomainMask, true)[0] as NSString? else {
|
137
|
-
print("Couldn't find Snapshot configuration files - can't detect `Users` dir")
|
138
|
-
return nil
|
139
|
-
}
|
140
|
-
|
141
|
-
homeDir = usersDir.stringByAppendingPathComponent(user) as NSString
|
142
|
-
#else
|
143
|
-
guard homeDir = ProcessInfo().environment["SIMULATOR_HOST_HOME"] as NSString else {
|
144
|
-
print("Couldn't find simulator home location. Please, check SIMULATOR_HOST_HOME env variable.")
|
145
|
-
return nil
|
146
|
-
}
|
147
|
-
#endif
|
148
|
-
return homeDir.stringByAppendingPathComponent("Library/Caches/tools.fastlane") as NSString
|
149
|
-
}
|
150
|
-
}
|
151
|
-
|
152
|
-
extension XCUIElement {
|
153
|
-
var isLoadingIndicator: Bool {
|
154
|
-
let whiteListedLoaders = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"]
|
155
|
-
if whiteListedLoaders.contains(self.identifier) {
|
156
|
-
return false
|
157
|
-
}
|
158
|
-
return self.frame.size == CGSize(width: 10, height: 20)
|
159
|
-
}
|
160
|
-
}
|
161
|
-
|
162
|
-
// Please don't remove the lines below
|
163
|
-
// They are used to detect outdated configuration files
|
164
|
-
// SnapshotHelperVersion [1.3]
|