Fixed bug in FileIssue constructor

This commit is contained in:
Jonathan Bernard 2010-02-22 08:37:41 -06:00
parent 9a06c7f2ef
commit d8eae1b405
11 changed files with 19 additions and 12 deletions

View File

@ -1,10 +1,10 @@
#Sun Feb 21 16:03:56 CST 2010 #Mon Feb 22 07:08:09 CST 2010
build.dir=build build.dir=build
src.dir=src src.dir=src
lib.shared.dir=../shared-libs lib.shared.dir=../shared-libs
test.dir=test test.dir=test
build.number=1 build.number=2
expected.application.version=1.1.3 expected.application.version=1.1.4
lib.dir=lib lib.dir=lib
release.dir=release release.dir=release
release.jar=pit-${application.version}.jar release.jar=pit-${application.version}.jar

Binary file not shown.

Binary file not shown.

View File

@ -11,7 +11,9 @@ public class FileIssue extends Issue {
super('REPLACE_ME') super('REPLACE_ME')
def matcher = file.name =~ /(\d{4})([bftc])(\d).*/ def matcher = file.name =~ /(\d{4})([bftc])(\d).*/
if (!matcher) return null if (!matcher)
throw new IllegalArgumentException("${file} " +
"is not a valid Issue file.")
super.@id = matcher[0][1] super.@id = matcher[0][1]
super.@category = Category.toCategory(matcher[0][2]) super.@category = Category.toCategory(matcher[0][2])

View File

@ -21,7 +21,8 @@ class FileProject extends Project {
// otherwise build and add to list // otherwise build and add to list
projects[(child.name)] = new FileProject(child) projects[(child.name)] = new FileProject(child)
} else if (child.isFile()) { } else if (child.isFile() &&
FileIssue.isValidFilename(child.name)) {
def issue def issue
// if exception, then not an issue // if exception, then not an issue

Binary file not shown.

BIN
pit-cli/lib/pit-1.1.4.jar Normal file

Binary file not shown.

View File

@ -1,9 +1,9 @@
#Sun Feb 21 16:05:16 CST 2010 #Mon Feb 22 08:26:47 CST 2010
build.dir=build build.dir=build
src.dir=src src.dir=src
build.jar=pit-cli-${application.version}.${build.number}.jar build.jar=pit-cli-${application.version}.${build.number}.jar
build.number=1 build.number=2
expected.application.version=1.1.3 expected.application.version=1.1.4
lib.dir=lib lib.dir=lib
release.dir=release release.dir=release
release.jar=pit-cli-${application.version}.jar release.jar=pit-cli-${application.version}.jar

Binary file not shown.

View File

@ -93,7 +93,7 @@ else if (opts.C) {
else if (opts.n) { else if (opts.n) {
def cat, priority def cat, priority
String text = "" String text = ""
Issue ussie Issue issue
def sin = System.in.newReader() def sin = System.in.newReader()
while(true) { while(true) {
@ -119,14 +119,18 @@ else if (opts.n) {
println "Enter issue (use EOF of ^D to end): " println "Enter issue (use EOF of ^D to end): "
try { try {
sin.eachLine { line -> sin.eachLine { line ->
println ">>${line}"
def m = line =~ /(.*)EOF.*/ def m = line =~ /(.*)EOF.*/
if (m) { if (m) {
text << m[0][1] text += m[0][1]
sin.close() sin.close()
} else text << line } else text += line
} }
} catch (e) {} } catch (e) {}
println text
println "------------------------"
issue = issuedb.createNewIssue(category: cat, priority: priority, text: text) issue = issuedb.createNewIssue(category: cat, priority: priority, text: text)
println "New issue created: " println "New issue created: "

View File

@ -1 +1 @@
application.version=1.1.3 application.version=1.1.4