class StaticProjects # a project has a p4port, @@projects = [] def initialize return if !@@projects.empty? (1..5).each do |i| @@projects << { 'id' => "#{i}", 'name' => "mock project #{i}", 'url' => "http://localhost:3000/projects/#{i}/", 'server' => ENV['P4PORT'] || "perforce:1666", 'P4CHARSET' => ENV['P4CHARSET'] || 'none', 'stream' => "//ManyStreams/stream#{i}" # qaplay has lots of streams } end @@projects << { 'id' => "special", 'name' => "mock project special", 'url' => "http://localhost:3000/projects/special/", 'server' => "perforce:1666", 'P4CHARSET' => ENV['P4CHARSET'] || 'none', 'stream' => "//P4V/main" } end def projects @@projects end end