require 'P4' class LocalhostProjects def initialize end def projects(user, authtoken) begin p4 = P4.new p4.port = 'localhost:1666' p4.user = user p4.password = authtoken p4.charset = 'auto' p4.connect # puts p4.inspect # puts p4.run_info # puts p4.run_user('-o') projects = [] # now get all of the mainline streams under called main p4.run_streams('-F', 'Type=mainline', '//*/main').each { |streamDesc| projects << { 'id' => "#{streamDesc['Name']}", 'name' => streamDesc['Name'].gsub('~20',' '), 'url' => "http://localhost:3000/projects/#{streamDesc['Name']}/", 'server' => p4.port, 'P4CHARSET' => ENV['P4CHARSET'] || 'none', 'stream' => "#{streamDesc['Stream']}", } } return projects rescue P4Exception => e puts e.message raise e end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 17271 | tjuricek | Remove deprecated Ruby implementation. | ||
//guest/perforce_software/helix-web-services/main/source/helix_web_services/mock_raymond/lib/localhost_projects.rb | |||||
#2 | 17123 | tjuricek |
Helix Cloud interop with the local p4d was incorrect, since no charset was specified. Revised location of where we run the new Helix Sync submit spec, for some reason this breaks the Helix Cloud system. There's some dependencies between the initial add and the "remove" specs, so the new "add with description" test needs to come after the remove. |
||
#1 | 16072 | tjuricek |
Helix Cloud integration for Helix Sync services. This includes a "mock_raymond" rails application for keeping tabs on basic integration with Helix Cloud. We do not test against a live server. See integration history for more details. |
||
//guest/doug_scheirer/helix-web-services/main/source/helix_web_services/mock_raymond/lib/localhost_projects.rb | |||||
#1 | 16024 | Doug Scheirer | Some cloud spec forking, got the mock_raymond to spin up in cloud testing, split normal vs cloud spec output |