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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6b3135e482cf2f7504c2951f133ae9f5831bfdf
4
- data.tar.gz: 99c97ea4c6854d620c15a2b5320cbae88349ffd8
3
+ metadata.gz: be01f2299465ff277f29cc38114c79b98c83cb54
4
+ data.tar.gz: ab01f597381112f18770f025a7837b58e15e4921
5
5
  SHA512:
6
- metadata.gz: d398341337dbc94830775db1275d4a8a68d62a4673defbdd1dfc0bfaba6e6f4e3a23bcf2d2a1400adb374908599bdfcc9338f1abae41006d18358ecc00bce154
7
- data.tar.gz: 55f35d300e12037e1e5684a1b0938283327e350eb8f01f75f50ba47a010d4ce396cdc9890dc1b0678665f292503a036170b446c15e8a66e35d2248b1b26317b8
6
+ metadata.gz: fd7f6a1c00eb837d2ff2044cfbf67434b19300dadc109fa13305032a6d1c506d0e4ba2dbbedd210e15af5dc2702e57f2d988dc5b5f8958550e97752a59b6a3c7
7
+ data.tar.gz: f3fcdc4d3ac5308bb884364fcae857543ebd4a04d90d4681fbcd6fc5715ccefff9ed06e78417ce83eb3ede16026243944aef1007004d9f4a6123bc5ab32b0023
@@ -5,7 +5,22 @@ module DPL
5
5
  requires 'git'
6
6
 
7
7
  def install_deploy_dependencies
8
- context.shell "curl -sSL http://deis.io/deis-cli/install.sh | sh -s #{option(:cli_version)}"
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
@@ -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 => '1.0'
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 | sh -s 1.0'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.24.travis.1715.3
4
+ version: 1.8.24.travis.1718.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase