dpl 1.8.24.travis.1715.3 → 1.8.24.travis.1718.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dpl/provider/deis.rb +17 -2
- data/spec/provider/deis_spec.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be01f2299465ff277f29cc38114c79b98c83cb54
|
4
|
+
data.tar.gz: ab01f597381112f18770f025a7837b58e15e4921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd7f6a1c00eb837d2ff2044cfbf67434b19300dadc109fa13305032a6d1c506d0e4ba2dbbedd210e15af5dc2702e57f2d988dc5b5f8958550e97752a59b6a3c7
|
7
|
+
data.tar.gz: f3fcdc4d3ac5308bb884364fcae857543ebd4a04d90d4681fbcd6fc5715ccefff9ed06e78417ce83eb3ede16026243944aef1007004d9f4a6123bc5ab32b0023
|
data/lib/dpl/provider/deis.rb
CHANGED
@@ -5,7 +5,22 @@ module DPL
|
|
5
5
|
requires 'git'
|
6
6
|
|
7
7
|
def install_deploy_dependencies
|
8
|
-
|
8
|
+
install_url = determine_install_url
|
9
|
+
context.shell "curl -sSL #{install_url} | bash -x -s #{option(:cli_version)}"
|
10
|
+
end
|
11
|
+
|
12
|
+
#Default to installing the default v1 client. Otherwise determine if this is a v2 client
|
13
|
+
def determine_install_url
|
14
|
+
if option(:cli_version).nil?
|
15
|
+
return "http://deis.io/deis-cli/install.sh"
|
16
|
+
else
|
17
|
+
version_arg = Gem::Version.new(option(:cli_version).gsub(/^v?V?/,''))
|
18
|
+
if version_arg >= Gem::Version.new('2.0.0')
|
19
|
+
return "http://deis.io/deis-cli/install-v2.sh"
|
20
|
+
else
|
21
|
+
return "http://deis.io/deis-cli/install.sh"
|
22
|
+
end
|
23
|
+
end
|
9
24
|
end
|
10
25
|
|
11
26
|
def needs_key?
|
@@ -87,7 +102,7 @@ module DPL
|
|
87
102
|
end
|
88
103
|
|
89
104
|
def run(command)
|
90
|
-
unless context.shell "deis run -- #{command}"
|
105
|
+
unless context.shell "./deis run -- #{command}"
|
91
106
|
error 'Running command failed.'
|
92
107
|
end
|
93
108
|
end
|
data/spec/provider/deis_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe DPL::Provider::Deis do
|
|
9
9
|
:controller => 'https://deis.deisapps.com',
|
10
10
|
:username => 'travis',
|
11
11
|
:password => 'secret',
|
12
|
-
:cli_version => '
|
12
|
+
:cli_version => 'v2.0.0'
|
13
13
|
}
|
14
14
|
end
|
15
15
|
|
@@ -20,7 +20,7 @@ describe DPL::Provider::Deis do
|
|
20
20
|
describe "#install_deploy_dependencies" do
|
21
21
|
example do
|
22
22
|
expect(provider.context).to receive(:shell).with(
|
23
|
-
'curl -sSL http://deis.io/deis-cli/install.sh |
|
23
|
+
'curl -sSL http://deis.io/deis-cli/install-v2.sh | bash -x -s v2.0.0'
|
24
24
|
).and_return(true)
|
25
25
|
provider.install_deploy_dependencies
|
26
26
|
end
|
@@ -107,7 +107,7 @@ describe DPL::Provider::Deis do
|
|
107
107
|
describe "#run" do
|
108
108
|
example do
|
109
109
|
expect(provider.context).to receive(:shell).with(
|
110
|
-
'deis run -- shell command'
|
110
|
+
'./deis run -- shell command'
|
111
111
|
).and_return(true)
|
112
112
|
provider.run('shell command')
|
113
113
|
end
|