dpl-heroku 1.10.4.travis.3053.5 → 1.10.4.travis.3054.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d69596fb58069e3485ef815db5feb038a9b2d5b04094f0a31e421294213b3e8
4
- data.tar.gz: 266957fd622aa92e7fbb5cc2cc90315ec1476cc9bc535b65dd0c7634e5e08a77
3
+ metadata.gz: d966cfd3bc21877703fca2f021e1f1a03bdd9d33b2a67d65b1f256802e7864d4
4
+ data.tar.gz: 2f46f2fe03940bacece7b433b237202ede8d8e0668dbc14448b78b6597217dfd
5
5
  SHA512:
6
- metadata.gz: 85035a7b8ddc249d656d6942517eca6776ab652d19eb955f75e1b19c631c7134cbb46b0bb552c0cff9146762a67a8287e48cfc4aa8310ded83fb5ad4bcdf2fa3
7
- data.tar.gz: 97cd4a10a91813d8f3c8829b47cbe580621db94d8e99b30ad7e0e1e570a0c5d66a110e639aa4c38bbb5158276a9bba894ec60363a90b3aef72aa4b74627de3bc
6
+ metadata.gz: 6c7b3c96af43c533441f9f4debb370fe6a0b1bcc53d40349ec098b317b46c9bb711d67b84581f662e193cca71b1ec48b82ee96bfc9253587ae4b3e79b028a7e8
7
+ data.tar.gz: e39fe108242387da55173ccb27adcf0355d8ff10e9fdf1a11785117e81594762e216fa93f42cd07ab11e66f8bea2f0e92ee57944f15cdae9522f4e37043dfdf5
@@ -26,7 +26,7 @@ module DPL
26
26
 
27
27
  def upload_archive
28
28
  log "uploading application archive"
29
- context.shell "curl #{Shellwords.escape(put_url)} -X PUT -H 'Content-Type:' -H 'Accept: application/vnd.heroku+json; version=3' --data-binary @#{archive_file}"
29
+ context.shell "curl#{curl_options} #{Shellwords.escape(put_url)} -X PUT -H 'Content-Type:' -H 'Accept: application/vnd.heroku+json; version=3' --data-binary @#{archive_file}"
30
30
  end
31
31
 
32
32
  def trigger_build
@@ -44,7 +44,7 @@ module DPL
44
44
  if response.success?
45
45
  @build_id = JSON.parse(response.body)['id']
46
46
  output_stream_url = JSON.parse(response.body)['output_stream_url']
47
- context.shell "curl #{Shellwords.escape(output_stream_url)} -H 'Accept: application/vnd.heroku+json; version=3'"
47
+ context.shell "curl#{curl_options} #{Shellwords.escape(output_stream_url)} -H 'Accept: application/vnd.heroku+json; version=3'"
48
48
  else
49
49
  handle_error_response(response)
50
50
  end
@@ -90,6 +90,10 @@ module DPL
90
90
  @version ||= options[:version] || context.env['TRAVIS_COMMIT'] || `git rev-parse HEAD`.strip
91
91
  end
92
92
 
93
+ def curl_options
94
+ $stdout.isatty ? '' : ' -sS'
95
+ end
96
+
93
97
  end
94
98
  end
95
99
  end
@@ -261,6 +261,28 @@ describe DPL::Provider::Heroku, :api do
261
261
  provider.trigger_build
262
262
  expect(provider.build_id).to eq('01234567-89ab-cdef-0123-456789abcdef')
263
263
  end
264
+
265
+ context 'when $stdout is not a TTY' do
266
+ before do
267
+ @old_stdout = $stdout
268
+ $stdout = StringIO.new
269
+ end
270
+
271
+ after do
272
+ $stdout = @old_stdout
273
+ end
274
+
275
+ example do
276
+ expect(provider).to receive(:log).with('triggering new deployment')
277
+ expect(provider).to receive(:faraday).at_least(:once).and_return(faraday)
278
+ expect(provider).to receive(:get_url).and_return 'http://example.com/source.tgz'
279
+ expect(provider).to receive(:version).and_return 'v1.3.0'
280
+ expect(provider.context).to receive(:shell).with("curl -sS https://build-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef -H 'Accept: application/vnd.heroku+json; version=3'")
281
+ provider.trigger_build
282
+ expect(provider.build_id).to eq('01234567-89ab-cdef-0123-456789abcdef')
283
+ end
284
+
285
+ end
264
286
  end
265
287
 
266
288
  describe "#verify_build" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl-heroku
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.4.travis.3053.5
4
+ version: 1.10.4.travis.3054.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.4.travis.3053.5
19
+ version: 1.10.4.travis.3054.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.10.4.travis.3053.5
26
+ version: 1.10.4.travis.3054.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement