pilot 1.11.2 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pilot/options.rb +10 -1
- data/lib/pilot/tester_exporter.rb +3 -10
- data/lib/pilot/tester_importer.rb +7 -1
- data/lib/pilot/tester_manager.rb +20 -9
- data/lib/pilot/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c19ab12fd9eb4f2b46c5961a6870233fdd6fa01
|
4
|
+
data.tar.gz: c58e66f0b5e5e8463cda286447567f591a74e73f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b0864facb06d0871f2c165ad6152369fb86998b4c8559a4383ed21300260bf40c847ac50c26b286b05b62d138bebb96bef009fb29e7168b6f7eb7bc79047e5c
|
7
|
+
data.tar.gz: f292781750358270c18fd16f73faa2b6958e5d0ac1fb09c4e404d4d9b9aa08341e13856a5279c37c428d67feeb61ff720db8555b7185b44608ed934a2c6ee0fc
|
data/lib/pilot/options.rb
CHANGED
@@ -131,7 +131,16 @@ module Pilot
|
|
131
131
|
FastlaneCore::ConfigItem.new(key: :itc_provider,
|
132
132
|
env_name: "PILOT_ITC_PROVIDER",
|
133
133
|
description: "The provider short name to be used with the iTMSTransporter to identify your team",
|
134
|
-
optional: true)
|
134
|
+
optional: true),
|
135
|
+
FastlaneCore::ConfigItem.new(key: :groups,
|
136
|
+
short_option: "-g",
|
137
|
+
env_name: "PILOT_GROUPS",
|
138
|
+
description: "Associate tester to one group or more by group name / group id. E.g. '-g \"Team 1\",\"Team 2\"'",
|
139
|
+
optional: true,
|
140
|
+
type: Array,
|
141
|
+
verify_block: proc do |value|
|
142
|
+
UI.user_error!("Could not evaluate array from '#{value}'") unless value.kind_of?(Array)
|
143
|
+
end)
|
135
144
|
]
|
136
145
|
end
|
137
146
|
end
|
@@ -20,21 +20,14 @@ module Pilot
|
|
20
20
|
file = config[:testers_file_path]
|
21
21
|
|
22
22
|
CSV.open(file, "w") do |csv|
|
23
|
-
csv << ['First', 'Last', 'Email', '
|
23
|
+
csv << ['First', 'Last', 'Email', 'Groups', 'Devices', 'Installed Version', 'Install Date']
|
24
24
|
|
25
25
|
testers.each do |tester|
|
26
|
-
|
27
|
-
|
28
|
-
group_names = ""
|
29
|
-
if groups && groups.length > 0
|
30
|
-
names = groups.map { |group| group["name"]["value"] }
|
31
|
-
group_names = names.join(';')
|
32
|
-
end
|
33
|
-
|
26
|
+
group_names = tester.groups_list(';') || ""
|
34
27
|
install_version = tester.full_version || ""
|
35
28
|
pretty_date = tester.pretty_install_date || ""
|
36
29
|
|
37
|
-
csv << [tester.first_name, tester.last_name, tester.email, tester.devices.count,
|
30
|
+
csv << [tester.first_name, tester.last_name, tester.email, group_names, tester.devices.count, install_version, pretty_date]
|
38
31
|
end
|
39
32
|
|
40
33
|
UI.success("Successfully exported CSV to #{file}")
|
@@ -13,8 +13,10 @@ module Pilot
|
|
13
13
|
tester_manager = Pilot::TesterManager.new
|
14
14
|
imported_tester_count = 0
|
15
15
|
|
16
|
+
groups = options[:groups]
|
17
|
+
|
16
18
|
CSV.foreach(file, "r") do |row|
|
17
|
-
first_name, last_name, email = row
|
19
|
+
first_name, last_name, email, testing_groups = row
|
18
20
|
|
19
21
|
unless email
|
20
22
|
UI.error("No email found in row: #{row}")
|
@@ -30,6 +32,10 @@ module Pilot
|
|
30
32
|
config[:first_name] = first_name
|
31
33
|
config[:last_name] = last_name
|
32
34
|
config[:email] = email
|
35
|
+
config[:groups] = groups
|
36
|
+
if testing_groups
|
37
|
+
config[:groups] = testing_groups.split(";")
|
38
|
+
end
|
33
39
|
|
34
40
|
begin
|
35
41
|
tester_manager.add_tester(config)
|
data/lib/pilot/tester_manager.rb
CHANGED
@@ -7,6 +7,17 @@ module Pilot
|
|
7
7
|
def add_tester(options)
|
8
8
|
start(options)
|
9
9
|
|
10
|
+
if config[:groups]
|
11
|
+
groups = Spaceship::Tunes::Tester::External.groups
|
12
|
+
selected_groups = []
|
13
|
+
config[:groups].each do |group|
|
14
|
+
group_id = groups.find { |k, v| v == group || k == group }
|
15
|
+
raise "Group '#{group}' not found for #{config[:email]}" unless group_id
|
16
|
+
selected_groups.push(group_id[0])
|
17
|
+
end
|
18
|
+
config[:groups] = selected_groups
|
19
|
+
end
|
20
|
+
|
10
21
|
begin
|
11
22
|
tester = Spaceship::Tunes::Tester::Internal.find(config[:email])
|
12
23
|
tester ||= Spaceship::Tunes::Tester::External.find(config[:email])
|
@@ -16,7 +27,8 @@ module Pilot
|
|
16
27
|
else
|
17
28
|
tester = Spaceship::Tunes::Tester::External.create!(email: config[:email],
|
18
29
|
first_name: config[:first_name],
|
19
|
-
last_name: config[:last_name]
|
30
|
+
last_name: config[:last_name],
|
31
|
+
groups: config[:groups])
|
20
32
|
UI.success("Successfully invited tester: #{tester.email}")
|
21
33
|
end
|
22
34
|
|
@@ -120,12 +132,13 @@ module Pilot
|
|
120
132
|
end
|
121
133
|
|
122
134
|
def list_global(all_testers, title)
|
123
|
-
headers = ["First", "Last", "Email", "Devices", "Latest Version", "Latest Install Date"]
|
135
|
+
headers = ["First", "Last", "Email", "Groups", "Devices", "Latest Version", "Latest Install Date"]
|
124
136
|
list(all_testers, title, headers) do |tester|
|
125
137
|
[
|
126
138
|
tester.first_name,
|
127
139
|
tester.last_name,
|
128
140
|
tester.email,
|
141
|
+
tester.groups_list,
|
129
142
|
tester.devices.count,
|
130
143
|
tester.full_version,
|
131
144
|
tester.pretty_install_date
|
@@ -134,12 +147,13 @@ module Pilot
|
|
134
147
|
end
|
135
148
|
|
136
149
|
def list_by_app(all_testers, title)
|
137
|
-
headers = ["First", "Last", "Email"]
|
150
|
+
headers = ["First", "Last", "Email", "Groups"]
|
138
151
|
list(all_testers, title, headers) do |tester|
|
139
152
|
[
|
140
153
|
tester.first_name,
|
141
154
|
tester.last_name,
|
142
|
-
tester.email
|
155
|
+
tester.email,
|
156
|
+
tester.groups_list
|
143
157
|
# Testers returned by the query made in the context of an app do not contain
|
144
158
|
# the devices, version, or install date information
|
145
159
|
]
|
@@ -165,11 +179,8 @@ module Pilot
|
|
165
179
|
rows << ["Last name", tester.last_name]
|
166
180
|
rows << ["Email", tester.email]
|
167
181
|
|
168
|
-
|
169
|
-
|
170
|
-
if groups && groups.length > 0
|
171
|
-
group_names = groups.map { |group| group["name"]["value"] }
|
172
|
-
rows << ["Groups", group_names.join(', ')]
|
182
|
+
if tester.groups.length > 0
|
183
|
+
rows << ["Groups", tester.groups_list]
|
173
184
|
end
|
174
185
|
|
175
186
|
if tester.latest_install_date
|
data/lib/pilot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pilot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
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-11-
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
39
|
+
version: 0.37.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: 1.0.0
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.37.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 1.0.0
|