fastlane_core 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane_core/developer_center/developer_center.rb +34 -15
- data/lib/fastlane_core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e70b23f927fc06ec9e671423ee16022620d41dc
|
4
|
+
data.tar.gz: 278ace3ed4c4b07312e51c33e7fbe610fa2e6e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8249f72041e8619df7722469f35dc77be53e1be3b7bfc2ae3d2ed09f7482bda04cb2698ac7e44be3f36593d24770e680d8d7fcc4fc8ba131fe37a33e1b561ea6
|
7
|
+
data.tar.gz: ab1c333dfca558603e945987bdbeb93866d5e6d7448361dc448d17f6749a6dac84b310644670c140743a20c5ad186f3cae443fbf89b763141619653be140b0a6
|
@@ -118,11 +118,13 @@ module FastlaneCore
|
|
118
118
|
|
119
119
|
|
120
120
|
def select_team
|
121
|
-
team_id = ENV["FASTLANE_TEAM_ID"]
|
122
|
-
team_id = nil if team_id.to_s.length == 0
|
121
|
+
team_id = ENV["FASTLANE_TEAM_ID"] || CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
|
123
122
|
|
124
|
-
|
125
|
-
|
123
|
+
team_name = ENV["FASTLANE_TEAM_NAME"] || CredentialsManager::AppfileConfig.try_fetch_value(:team_name)
|
124
|
+
|
125
|
+
if team_id == nil and team_name == nil
|
126
|
+
Helper.log.info "You can store you preferred team using the environment variable `FASTLANE_TEAM_ID` or `FASTLANE_TEAM_NAME`".green
|
127
|
+
Helper.log.info "or in your `Appfile` using `team_id 'Q2CBPJ58CA'` or `team_name 'Felix Krause'`".green # TODO
|
126
128
|
Helper.log.info "Your ID belongs to the following teams:".green
|
127
129
|
end
|
128
130
|
|
@@ -139,19 +141,36 @@ module FastlaneCore
|
|
139
141
|
available_options << [index_text, current_team_id, team_text, description_text].join(" ")
|
140
142
|
end
|
141
143
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
144
|
+
if team_name
|
145
|
+
# Search for name
|
146
|
+
found_it = false
|
147
|
+
all("label.label-primary").each do |current|
|
148
|
+
if current.text.downcase.gsub(/\s+/, "") == team_name.downcase.gsub(/\s+/, "")
|
149
|
+
current.click # select the team by name
|
150
|
+
found_it = true
|
151
|
+
end
|
152
|
+
end
|
147
153
|
|
148
|
-
|
149
|
-
|
150
|
-
|
154
|
+
unless found_it
|
155
|
+
available_teams = all("label.label-primary").collect { |a| a.text }
|
156
|
+
raise DeveloperCenterLoginError.new("Could not find Team with name '#{team_name}'. Available Teams: #{available_teams}".red)
|
157
|
+
end
|
151
158
|
else
|
152
|
-
|
153
|
-
|
154
|
-
|
159
|
+
# Search by ID/Index
|
160
|
+
unless team_id
|
161
|
+
puts available_options.join("\n").green
|
162
|
+
team_index = ask("Please select the team number you would like to access: ".green)
|
163
|
+
team_id = teams[team_index.to_i - 1].find(".radio").value
|
164
|
+
end
|
165
|
+
|
166
|
+
team_button = first(:xpath, "//input[@type='radio' and @value='#{team_id}']") # Select the desired team
|
167
|
+
if team_button
|
168
|
+
team_button.click
|
169
|
+
else
|
170
|
+
Helper.log.fatal "Could not find given Team. Available options: ".red
|
171
|
+
puts available_options.join("\n").yellow
|
172
|
+
raise DeveloperCenterLoginError.new("Error finding given team #{team_id}.".red)
|
173
|
+
end
|
155
174
|
end
|
156
175
|
|
157
176
|
all(".button.large.blue.submit").first.click
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|