heroku_hatchet 7.3.1 → 7.3.2

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
  SHA256:
3
- metadata.gz: 6c1b161f5f43f135f7eb4e6c803b6228b15e51904001a744572cca572e26a799
4
- data.tar.gz: e804ea689f9934308978e4804799fee00a0d252d3e64cb62eb29a20c4d05659f
3
+ metadata.gz: 960b3c8f2eee0b1252df5b2e6ce23b718de130d099f913812bd5fbb196c3b006
4
+ data.tar.gz: 3dec91bb9b7de86d3aef2ef78086f29239f078d1c6c004244b3ead7aaf139a58
5
5
  SHA512:
6
- metadata.gz: b2b9364b374e384b3e5d16f159774d4b1da90d3a79c5c3afad6092d05209a13bd8d52c2d34c97feb4da0b989339d120a4562c65b121e7ec6b3d843ae3657cefe
7
- data.tar.gz: '026904fd62500a2874d57f9c8462aee651f62dd1467c6281bc7061312d2a683203f8e1237577d2bb66ab3f4d5174bdf2fe408e3c165a950a1cf4a386673f4a29'
6
+ metadata.gz: b19e39c4963c64a5448f5b4ff4961722e1c17b020d3c6a8f3ef102a1bb136ba2feb504afddc8cbb6a286f384806776ebfdfebb76834f3d1a3eb37af36cbe4532
7
+ data.tar.gz: 3cc4cb2320f711e1d5fbb2024dc7a7ff1d734158b2f89322104a162fc00a2cb21940cf520f64e679b948c1a9be4bedeb3735c447c8287496438d1265bd372104
@@ -1,5 +1,10 @@
1
1
  ## HEAD
2
2
 
3
+ ## 7.3.2
4
+
5
+ - Fix App#in_directory_fork not receiving debugging output when an error is raised (https://github.com/heroku/hatchet/pull/146)
6
+ - Do not create CI tarball inside cwd to prevent tar "file changed as we read it" warnings.
7
+
3
8
  ## 7.3.1
4
9
 
5
10
  - Fix Ruby incompatibility introduced by using `&.` and `rescue` without
@@ -387,8 +387,8 @@ module Hatchet
387
387
  def in_directory_fork(&block)
388
388
  Tempfile.create("stdout") do |tmp_file|
389
389
  pid = fork do
390
- $stdout.reopen(tmp_file, "w")
391
- $stderr.reopen(tmp_file, "w")
390
+ $stdout.reopen(tmp_file, "a")
391
+ $stderr.reopen(tmp_file, "a")
392
392
  $stdout.sync = true
393
393
  $stderr.sync = true
394
394
  in_directory do |dir|
@@ -1,3 +1,5 @@
1
+ require "tempfile"
2
+
1
3
  module Hatchet
2
4
  class FailedTestError < StandardError
3
5
  def initialize(app, output)
@@ -177,15 +179,17 @@ module Hatchet
177
179
  app_json["stack"] ||= @app.stack if @app.stack && !@app.stack.empty?
178
180
  File.open("app.json", "w") {|f| f.write(JSON.generate(app_json)) }
179
181
 
180
- out = `tar c . | gzip -9 > slug.tgz`
181
- raise "Tar command failed: #{out}" unless $?.success?
182
-
183
- source_put_url = @app.create_source
184
- Hatchet::RETRIES.times.retry do
185
- PlatformAPI.rate_throttle.call do
186
- Excon.put(source_put_url,
187
- expects: [200],
188
- body: File.read('slug.tgz'))
182
+ Tempfile.create("slug.tgz") do |slug|
183
+ out = `tar c . | gzip -9 > #{slug.path}`
184
+ raise "Tar command failed: #{out}" unless $?.success?
185
+
186
+ source_put_url = @app.create_source
187
+ Hatchet::RETRIES.times.retry do
188
+ PlatformAPI.rate_throttle.call do
189
+ Excon.put(source_put_url,
190
+ expects: [200],
191
+ body: slug.read)
192
+ end
189
193
  end
190
194
  end
191
195
  end
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "7.3.1"
2
+ VERSION = "7.3.2"
3
3
  end
@@ -11,6 +11,15 @@ describe "LocalRepoTest" do
11
11
  expect(ENV[env_name]).to eq(env_name)
12
12
  end
13
13
 
14
+ it "in directory fork captures stdout even when there is an error" do
15
+ expect {
16
+ Hatchet::App.new("default_ruby").in_directory_fork do
17
+ puts "hello_there"
18
+ raise "error"
19
+ end
20
+ }.to raise_error(/hello_there/)
21
+ end
22
+
14
23
  it "repos checked into git" do
15
24
  begin
16
25
  fixture_dir = "repo_fixtures/different-folder-for-checked-in-repos/default_ruby"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_hatchet
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.1
4
+ version: 7.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-05 00:00:00.000000000 Z
11
+ date: 2020-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api