The Project class represents a project stored in the Meta-Server application we are using ActiveResource to communicate with the remote Meta-Server.

A Project represents a unique entity of work. It can be for instance a particular client engagement. Projects do not hold any repository information. The information is associated with each Revision of a project. If a re-test of a project is undertaken 3 months after the original engagement, a new Revision will be attached to the Project containing the re-test data.

Methods
Public Class methods
find_from_metaserver(meta_server)

This method takes a MetaServer object as input, configures the ActiveResource URLs for Project and Revision and pulls a list of projects from the remote Meta-Server.

If the configuration in the MetaServer is invalid, and exception will be thrown.

    # File app/models/project.rb, line 20
20:   def self.find_from_metaserver(meta_server)
21:     Project.site_from_metaserver(meta_server)
22:     return Project.find(:all)
23:   end
site_from_metaserver(meta_server)

Configures ActiveResource URLs from a given MetaServer instance

    # File app/models/project.rb, line 26
26:   def self.site_from_metaserver(meta_server)
27:     Project.site = meta_server.site_url
28:     Revision.site = Project.site + 'projects/:project_id'
29:   end