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 +4 -4
- data/lib/dpl/provider/heroku/api.rb +6 -2
- data/spec/provider/heroku_spec.rb +22 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d966cfd3bc21877703fca2f021e1f1a03bdd9d33b2a67d65b1f256802e7864d4
|
4
|
+
data.tar.gz: 2f46f2fe03940bacece7b433b237202ede8d8e0668dbc14448b78b6597217dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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
|