spaceship 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/spaceship/client.rb +1 -1
- data/lib/spaceship/ui/select_team.rb +16 -6
- 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: 86c6e8217bad88bfdb0c32ab0e02fd732a95ca36
|
4
|
+
data.tar.gz: 606504429db1051598fd6e7b0bcfeab99c477ab2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f690107bdde045e9db60a376260adfe6b78e11a06483ca08022971e3aa523d1cb7f1399683f4cd6f60164bce86a8c3edf95ef7e391709c96c9df6d8e84769a
|
7
|
+
data.tar.gz: b59835d27eeb8024631863ac30891bbf60a451e4a419573ffb74224249cb8cb22ac373d878b71e7f3cc39170326b7a5da41fb1c99d19a7752b5158b10fd7c056
|
data/lib/spaceship/client.rb
CHANGED
@@ -366,7 +366,7 @@ module Spaceship
|
|
366
366
|
|
367
367
|
return @client.send(method, url_or_path, params, headers, &block)
|
368
368
|
|
369
|
-
rescue Faraday::TimeoutError => ex
|
369
|
+
rescue Faraday::Error::TimeoutError => ex # New Farday version: Faraday::TimeoutError => ex
|
370
370
|
unless (tries -= 1).zero?
|
371
371
|
sleep 3
|
372
372
|
retry
|
@@ -36,14 +36,24 @@ module Spaceship
|
|
36
36
|
|
37
37
|
raise "Your account is in no teams" if teams.count == 0
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
team_id = (ENV['FASTLANE_TEAM_ID'] || '').strip
|
40
|
+
team_name = (ENV['FASTLANE_TEAM_NAME'] || '').strip
|
41
|
+
|
42
|
+
if team_id.length > 0
|
43
|
+
# User provided a value, let's see if it's valid
|
44
|
+
teams.each_with_index do |team, i|
|
45
|
+
return team_id if (team['teamId'].strip == team_id)
|
46
|
+
return team_id if (team['currentTeamMember']['teamMemberId'].to_s.strip == team_id)
|
47
|
+
end
|
48
|
+
puts "Couldn't find team with ID '#{team_id}'"
|
49
|
+
end
|
50
|
+
|
51
|
+
if team_name.length > 0
|
41
52
|
# User provided a value, let's see if it's valid
|
42
|
-
puts "Looking for team with ID '#{user_team}'"
|
43
53
|
teams.each_with_index do |team, i|
|
44
|
-
return
|
54
|
+
return team['teamId'] if (team['name'].strip == team_name)
|
45
55
|
end
|
46
|
-
puts "Couldn't find team with
|
56
|
+
puts "Couldn't find team with Name '#{team_name}'"
|
47
57
|
end
|
48
58
|
|
49
59
|
|
@@ -58,7 +68,7 @@ module Spaceship
|
|
58
68
|
puts "#{i + 1}) #{team['teamId']} #{team['name']} (#{team['type']})"
|
59
69
|
end
|
60
70
|
|
61
|
-
selected = $stdin.gets.strip.to_i - 1
|
71
|
+
selected = ($stdin.gets || '').strip.to_i - 1
|
62
72
|
team_to_use = teams[selected] if selected >= 0
|
63
73
|
|
64
74
|
return team_to_use['teamId'] if team_to_use
|
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.4
|
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-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: credentials_manager
|