Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

project.findFile fixed to work with paths starting / #523 #548

Merged
merged 1 commit into from
Apr 25, 2017
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

- project.findFile now works on paths starting with a '/'
https://github.com/atomist/rug/issues/523

- Rug Function exceptions are now passed to error handlers.
Maybe: Response now passed to handlers when unknown Rug Functions are encountered
https://github.com/atomist/rug/issues/536
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>com.atomist</groupId>
<artifactId>artifact-source</artifactId>
<version>0.20.0</version>
<version>0.25.0</version>
</dependency>
<!-- For now the TS compiler needs to stay as runtime dependency to make sure it gets brought into the CLI
when running rug install etc. This has to become part of the language <-> runtime version mapping -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,17 @@ class ProjectMutableViewTest extends FlatSpec with Matchers {
assert(path.contains("classDeclaration"))
}

it should "find files in the root with /" in {
val pmv = new ProjectMutableView(SimpleFileBasedArtifactSource(
StringFileArtifact("Foo.java",
"""
|public class Foo {
|}
""".stripMargin)
))
assert(pmv.findFile("/Foo.java") != null)
}

private def moveAFileAndVerifyNotFoundAtFormerAddress(stuffToDoLater: ProjectMutableView => Unit) = {
val project = JavaTypeUsageTest.NewSpringBootProject
val pmv = new ProjectMutableView(backingTemplates, project)
Expand Down