Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Fix App#pack_build with no block #3

Merged
merged 1 commit into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [Unreleased]

## 0.1.1

- Fix App#pack_build with no block https://github.com/heroku/cutlass/pull/3

## [0.1.0] - 2021-03-29

- Initial release
4 changes: 3 additions & 1 deletion lib/cutlass/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def pack_build
on_teardown { build.teardown }

@builds << build
yield build.call
build.call

yield build if block_given?
end

def transaction
Expand Down
2 changes: 1 addition & 1 deletion lib/cutlass/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module Cutlass
# Version
VERSION = "0.1.0"
VERSION = "0.1.1"
end
4 changes: 4 additions & 0 deletions spec/unit/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ module Cutlass
web: touch lol && tail -f lol # Need an entrypoint that doesn't exit
EOM

# Test build with block
app.pack_build do |result|
expect(result.stdout).to include("Successfully built image")
end

# Test build with no block
app.pack_build

# App#stdout is the same as App#last_build.stdout
expect(app.stdout).to include("Successfully built image")

Expand Down