travis 1.5.7.travis.341.4 → 1.5.7.travis.345.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/travis/cli/api_command.rb +20 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmM3NjI1NGU2ZTQ3ZmE3ODY0Y2EyODBmODI3ZDVhNjVkYWYzNGEwOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGRhOWI2MWNmOWE4MTU2ZGQ3YzQ5ODEwMWVmOTdmNTZjYTljZTRlNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2UxNzM1NDg0ZDdiYzhmNjUyNGEyZmI2NTFkYjBkNWY3YjYzMzYzMGRjMDlh
|
10
|
+
MTdmMjllNGZhM2NmOWViYWI1ZmJkMjQ5OGFmOGJjOTNmZDNjOTM4MzUxNWFk
|
11
|
+
YmY0OGJjNzMzMmM4MmFiMjViZThkOTUyMzM2YjY3NDU2Nzk2YTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjcxN2IxY2M0YzI1N2IzNDhjNWM4NjQ4NDBhZmE0OTBiMzI4NjA5YjcxNTc3
|
14
|
+
Nzg4NDk5MTUyYTkyMGMwZjk3YjIzMWY1NGFiMGQwZWEzOWIzMWFhZTI3YjE5
|
15
|
+
OTRlNDJhZjAyNmZhY2ZjNTNlMTc5Y2ZkZDljZjQ0ZDZhNTI3Mjk=
|
@@ -54,7 +54,11 @@ module Travis
|
|
54
54
|
endpoint_config['insecure'] = insecure unless insecure.nil?
|
55
55
|
self.insecure = endpoint_config['insecure']
|
56
56
|
session.ssl = { :verify => false } if insecure?
|
57
|
-
authenticate if pro?
|
57
|
+
authenticate if pro? or enterprise?
|
58
|
+
end
|
59
|
+
|
60
|
+
def enterprise?
|
61
|
+
!!endpoint_config['enterprise']
|
58
62
|
end
|
59
63
|
|
60
64
|
def pro?
|
@@ -95,12 +99,15 @@ module Travis
|
|
95
99
|
c[enterprise_name] = api_endpoint if explicit_api_endpoint?
|
96
100
|
c[enterprise_name] ||= write_to($stderr) do
|
97
101
|
error "enterprise setup not configured" unless interactive?
|
98
|
-
user_input
|
99
|
-
domain
|
100
|
-
"https://#{domain}/api
|
102
|
+
user_input = ask(color("Enterprise domain: ", :bold)).to_s
|
103
|
+
domain = user_input[%r{^(?:https?://)?(.*?)/?(?:/api/?)?$}, 1]
|
104
|
+
endpoint = "https://#{domain}/api"
|
105
|
+
config['default_endpoint'] = endpoint if agree("Use #{color domain, :bold} as default endpoint? ") { |q| q.default = 'yes' }
|
106
|
+
endpoint
|
101
107
|
end
|
102
|
-
self.api_endpoint
|
103
|
-
self.insecure
|
108
|
+
self.api_endpoint = c[enterprise_name]
|
109
|
+
self.insecure = true if insecure.nil?
|
110
|
+
endpoint_config['enterprise'] = true
|
104
111
|
end
|
105
112
|
|
106
113
|
def enterprise?
|
@@ -144,6 +151,13 @@ module Travis
|
|
144
151
|
return "" if org? and detected_endpoint?
|
145
152
|
return " --org" if org?
|
146
153
|
return " --pro" if pro?
|
154
|
+
|
155
|
+
if config['enterprise']
|
156
|
+
key, _ = config['enterprise'].detect { |k,v| v.start_with? api_endpoint }
|
157
|
+
return " -X" if key == "default"
|
158
|
+
return " -X #{key}" if key
|
159
|
+
end
|
160
|
+
|
147
161
|
" -e %p" % api_endpoint
|
148
162
|
end
|
149
163
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.7.travis.
|
4
|
+
version: 1.5.7.travis.345.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
@@ -28,7 +28,7 @@ authors:
|
|
28
28
|
autorequire:
|
29
29
|
bindir: bin
|
30
30
|
cert_chain: []
|
31
|
-
date: 2013-10-
|
31
|
+
date: 2013-10-23 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: faraday
|