Skip to content

Commit

Permalink
Only ignore manifest.yml at the app root directory
Browse files Browse the repository at this point in the history
[Finishes #70044992]
  • Loading branch information
tjarratt committed Apr 23, 2014
1 parent 331861f commit 875645c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cf/app_files/cf_ignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type cfIgnore []ignorePattern

var defaultIgnoreLines = []string{
".cfignore",
"manifest.yml",
"/manifest.yml",
".gitignore",
".git",
".hg",
Expand Down
18 changes: 18 additions & 0 deletions src/cf/app_files/cf_ignore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,22 @@ stuff/exclude.c`)
ignore = NewCfIgnore(`!.git`)
Expect(ignore.FileShouldBeIgnored(".git/objects")).To(BeFalse())
})

Describe("files named manifest.yml", func() {
var (
ignore CfIgnore
)

BeforeEach(func() {
ignore = NewCfIgnore("")
})

It("ignores manifest.yml at the top level", func() {
Expect(ignore.FileShouldBeIgnored("manifest.yml")).To(BeTrue())
})

It("does not ignore nested manifest.yml files", func() {
Expect(ignore.FileShouldBeIgnored("public/assets/manifest.yml")).To(BeFalse())
})
})
})

0 comments on commit 875645c

Please sign in to comment.