require 'fileutils' require 'hws_settings' require 'p4_util' # These are helper methods that should be common to most modular 'Apps' in # Helix Web Services. module HWSHelpers # This will ensure that the environment contains a p4 handle that is # configured using our typical `hws_settings` options. # # It should be rare to actually require using this method. This is typically # generated by authentication middleware. # # The p4 is possibly *not* connected or logged in. def require_p4 unless env.key?('p4') env['p4'] = P4Util.open_from_env(env) end end # This ensures that the `p4` handle has an associated temporary client # workspace. # # The local temporary directory is saved under 'p4_root'. def require_p4_with_temp_client require_p4 env['p4_root'] = P4Util.create_temp_client(env['p4']) end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 17271 | tjuricek | Remove deprecated Ruby implementation. | ||
#4 | 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. |
||
#3 | 15828 | tjuricek |
Remove 'service object' abstraction for helix sync, revise to module code. This begins removing an unnecessary level of indirection. As it turns out, the Helix Sync logic will remain largely untouched between different systems. If we need very specific logic, we'll have to adjust each method, likely with configuration. Which will of course need some testing, or just outright replacement, which *should* be easier with module includes. |
||
#2 | 15723 | tjuricek | Connecting in require_p4 in case the p4 connection does not exist | ||
#1 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
//guest/perforce_software/helix-web-services/main/helix_web_services/lib/hws_helpers.rb | |||||
#3 | 15132 | tjuricek | Provde a basic submit -e mechanism on classic perforce workspaces. | ||
#2 | 15110 | tjuricek | Revise changes methods for new p4 connection handling, add server specs, remove model references in client, and update asciidoc documentation. | ||
#1 | 15032 | tjuricek |
Starting config and doc revisions. System is now broken while revisions underway. Configuration of the p4d connection is now done via a single HWSSettings middleware object injected into the Rack env. The HWSP4Cleanup middleware now cleans up any p4 injected into the Rack env. The Auth::App class now mostly just contains one method to generate a p4 ticket. /auth/v1/login. Added yard documentation for the main project. Yard docs have been reconfigured to dump into build/ directories. This should probably be done with each release. Hm... The top level rake file contains a task, 'all:doc', to update our documentation. This should probably be run for each checkin. Hm... Specs are now using Rack::Test on top of a 'live' p4d. I'd suggest you still use the p4util mechanism, which now dumps to a /tmp folder, so we can safely add P4IGNORE rules back into your local .p4config file. Old 'perforce' application now called 'helix_versioning_engine'. Removing cache data. Helix Sync may be slow. It may also get axed. We'll see. |