Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update printing style #252

Merged
merged 10 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add where processes are coming from
While the name of the buildpack "Procfile Buildpack" hints that it's looking at a Procfile, be specific with the value.
schneems committed Dec 19, 2024
commit b0105b58a6dcc8fa24275b6379f74f7fe4535176
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ impl Buildpack for ProcfileBuildpack {
fn build(&self, context: BuildContext<Self>) -> libcnb::Result<BuildResult, Self::Error> {
let mut bullet = Print::new(stdout())
.h2("Procfile Buildpack")
.bullet("Processes");
.bullet(format!("Processes from {}", style::value("Procfile")));

let procfile: Procfile = fs_err::read_to_string(context.app_dir.join("Procfile"))
.map_err(ProcfileBuildpackError::CannotReadProcfileContents)
10 changes: 5 additions & 5 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ fn test_web_and_worker_procfile() {
indoc! {"
## Procfile Buildpack

- Processes
- Processes from `Procfile`
- web: `echo 'this is the web process!'`
- worker: `echo 'this is the worker process!'`
- Done (finished in < 0.1s)
@@ -57,7 +57,7 @@ fn test_worker_only_procfile() {
indoc! {"
## Procfile Buildpack

- Processes
- Processes from `Procfile`
- worker: `echo 'this is the worker process!'`
- Done (finished in < 0.1s)
"}
@@ -88,7 +88,7 @@ fn test_multiple_non_web_procfile() {
indoc! {"
## Procfile Buildpack

- Processes
- Processes from `Procfile`
- worker: `echo 'this is the worker process!'`
- console: `echo 'this is the console process!'`
- Done (finished in < 0.1s)
@@ -153,7 +153,7 @@ fn test_not_yaml_procfile() {
indoc! {"
## Procfile Buildpack

- Processes
- Processes from `Procfile`
- web: `echo foo: bar `
- Done (finished in < 0.1s)
"}
@@ -178,7 +178,7 @@ fn test_empty_procfile() {
indoc! {"
## Procfile Buildpack

- Processes
- Processes from `Procfile`
- (none)
- Done (finished in < 0.1s)
"}