diff --git a/pmd-web/src/project.rb b/pmd-web/src/pmd.rb similarity index 58% rename from pmd-web/src/project.rb rename to pmd-web/src/pmd.rb index 5265ef1d0e..906d35ae92 100644 --- a/pmd-web/src/project.rb +++ b/pmd-web/src/pmd.rb @@ -1,9 +1,9 @@ # -# project.rb - This is the basics of what we need +# pmd.rb - This is the basics of what we need # to represent a project. # -module PMD; +module PMD class Project def initialize( name, source ) @@ -37,16 +37,26 @@ end class SFProject < CVSProject def initialize( name, mod, source ) @name = name - @cvsroot = ':pserver:anonymous@cvs.' + name + - '.sourceforge.net:/cvsroot/' + name + @cvsroot = ':pserver:anonymous@cvs.' + name + '.sourceforge.net:/cvsroot/' + name @mod = mod @source = name + '/' + mod + '/' + source end end + +class Job + def initialize( projectName, moduleDirectory, sourceDirectory ) + @projectName = projectName + @cvsroot = ':pserver:anonymous@cvs.' + projectName + '.sourceforge.net:/cvsroot/' + projectName + @moduleDirectory = moduleDirectory + @sourceDirectory = moduleDirectory + '/' + sourceDirectory + end + + def to_s + return @projectName +":"+@moduleDirectory+":"+@sourceDirectory + end end -quilt = PMD::SFProject.new ARGV[0], ARGV[1], ARGV[2] -quilt.updateSource -quilt.runAnt +end + diff --git a/pmd-web/src/processor.rb b/pmd-web/src/processor.rb new file mode 100644 index 0000000000..9df43dc7df --- /dev/null +++ b/pmd-web/src/processor.rb @@ -0,0 +1,16 @@ + +require 'c:\data\pmd\pmd-web\src\pmd.rb' + +jobsDir = Dir.new("jobs") +jobsDir.each { |candidate| + if candidate[".txt"] + jobFile=File.new("jobs/#{candidate}") + jobData = jobFile.read + jobFile.close + name,moduleDir,srcDir=jobData.split(":") + job = PMD::Job.new(name, moduleDir, srcDir) + puts job + end +} + +