Skip to content

Commit

Permalink
yegor256#960 fixing unfortunate naming choice only, no functional change
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Mar 1, 2016
1 parent 9694978 commit 31005c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/rultor/agents/github/qtn/QnRelease.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Req understand(final Comment.Smart comment,
if (matcher.matches()) {
final String name = matcher.group(1);
final ReleaseTag release = new ReleaseTag(issue.repo(), name);
if (release.release()) {
if (release.allowed()) {
new Answer(comment).post(
true,
String.format(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rultor/agents/github/qtn/ReleaseTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ final class ReleaseTag {
* @return Boolean
* @throws IOException on error.
*/
public boolean release() throws IOException {
public boolean allowed() throws IOException {
return !ReleaseTag.valid(this.name)
|| ReleaseTag.newer(this.reference(), this.name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ public void validatesReleaseVersion() throws Exception {
final Repo repo = new MkGithub().randomRepo();
repo.releases().create("1.74");
MatcherAssert.assertThat(
new ReleaseTag(repo, "1.87.15").release(),
new ReleaseTag(repo, "1.87.15").allowed(),
Matchers.is(true)
);
MatcherAssert.assertThat(
new ReleaseTag(repo, "1.5-bar").release(),
new ReleaseTag(repo, "1.5-bar").allowed(),
Matchers.is(true)
);
MatcherAssert.assertThat(
new ReleaseTag(repo, "1.9-beta").release(),
new ReleaseTag(repo, "1.9-beta").allowed(),
Matchers.is(true)
);
MatcherAssert.assertThat(
new ReleaseTag(repo, "1.62").release(),
new ReleaseTag(repo, "1.62").allowed(),
Matchers.is(false)
);
}
Expand Down

0 comments on commit 31005c9

Please sign in to comment.