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

Commit

Permalink
Merge pull request #548 from atomist/issue-523
Browse files Browse the repository at this point in the history
project.findFile fixed to work with paths starting / #523
  • Loading branch information
johnsonr authored Apr 25, 2017
2 parents cebdeed + 903f291 commit e031b52
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
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

0 comments on commit e031b52

Please sign in to comment.