spaceship 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spaceship/ui/select_team.rb +16 -2
- data/lib/spaceship/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: f6a3c818e30dc1104176737eb6b122347a533a4d
|
4
|
+
data.tar.gz: 0cdad36a2f668ea79dff96eb82c40d9a2a8e31f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc714965c65ca0e17be95cd9a9825cedef4c3708100b05862db1ff60be617426efdc0d4e9943566c90c5a6913ccc5e8ed692105463eb0df814f646418f4f9b3c
|
7
|
+
data.tar.gz: 7c30613baa1293ccba3a33e744c952e2e05b24eb05d3cb42ab8937cd68a006e5711e7b3e9c7e61b4677809cd1467f8f140a6f47ca9186214ae64f8f31641b156
|
@@ -35,13 +35,27 @@ module Spaceship
|
|
35
35
|
teams = client.teams
|
36
36
|
|
37
37
|
raise "Your account is in no teams" if teams.count == 0
|
38
|
+
|
39
|
+
user_team = (ENV['FASTLANE_TEAM_ID'] || '').strip
|
40
|
+
if user_team
|
41
|
+
# User provided a value, let's see if it's valid
|
42
|
+
puts "Looking for team with ID '#{user_team}'"
|
43
|
+
teams.each_with_index do |team, i|
|
44
|
+
return user_team if (team['teamId'].strip == user_team)
|
45
|
+
end
|
46
|
+
puts "Couldn't find team with ID '#{user_team}'"
|
47
|
+
end
|
48
|
+
|
49
|
+
|
38
50
|
return teams[0]['teamId'] if teams.count == 1 # user is just in one team
|
39
51
|
|
52
|
+
|
53
|
+
# User Selection
|
40
54
|
loop do
|
41
55
|
# Multiple teams, user has to select
|
42
|
-
puts "Multiple teams found, please enter the number of the team you want to use: "
|
56
|
+
puts "Multiple teams found, please enter the number of the team you want to use: "
|
43
57
|
teams.each_with_index do |team, i|
|
44
|
-
puts "#{i + 1}) #{team['teamId']} #{team['name']} (#{team['type']})"
|
58
|
+
puts "#{i + 1}) #{team['teamId']} #{team['name']} (#{team['type']})"
|
45
59
|
end
|
46
60
|
|
47
61
|
selected = $stdin.gets.strip.to_i - 1
|
data/lib/spaceship/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spaceship
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Natchev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05-
|
12
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: credentials_manager
|