Skip to content

Commit

Permalink
Merge pull request #52 from svanharmelen/dev
Browse files Browse the repository at this point in the history
Making Chef-Guard compatible with Berkshelf
  • Loading branch information
Sander van Harmelen committed Oct 14, 2014
2 parents 1d783ba + e614c32 commit 5194486
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Chef-Guard CHANGELOG
====================

0.4.4
-----
- When you try to overwrite a frozen cookbook return a HTTP 409 error instead of a HTTP 412 so Berkshelf doesn't crash on it but just reports it.

0.4.3
-----
- Fixed logic error in the getChangeDetails func, where the extention '.json' was sometimes left out and sometimes added twice
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.3
0.4.4
2 changes: 1 addition & 1 deletion validations.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (cg *ChefGuard) checkCookbookFrozen() (int, error) {
if frozen, err := cg.cookbookFrozen(cg.Cookbook.Name, cg.Cookbook.Version); err != nil {
return http.StatusBadGateway, err
} else if frozen {
return http.StatusPreconditionFailed, fmt.Errorf("\n=== Cookbook Upload error found ===\n" +
return http.StatusConflict, fmt.Errorf("\n=== Cookbook Upload error found ===\n" +
"The cookbook you are trying to upload is frozen!\n" +
"It is not allowed to overwrite a frozen cookbook,\n" +
"so please bump the version and try again.\n" +
Expand Down

0 comments on commit 5194486

Please sign in to comment.