Module: NavigationHelpers
- Defined in:
- lib/dkdeploy/test_environment/path.rb
Overview
Navigation helper module for cucumber steps
Instance Method Summary collapse
-
#path_to(path) ⇒ String
Mapping for path names to real remote path.
- #resolve_path(path) ⇒ Object
Instance Method Details
#path_to(path) ⇒ String
Mapping for path names to real remote path
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dkdeploy/test_environment/path.rb', line 8 def path_to(path) case path when 'deploy_path' TEST_APPLICATION.deploy_to when 'current_path' TEST_APPLICATION.current_path when 'config_path' TEST_APPLICATION.remote.config_path when 'releases_path' TEST_APPLICATION.remote.releases_path when 'shared_path' TEST_APPLICATION.remote.shared_path when 'assets_path' TEST_APPLICATION.remote.assets_path when 'tmp_path' TEST_APPLICATION.remote_tmp_path else path end end |
#resolve_path(path) ⇒ Object
29 30 31 32 33 |
# File 'lib/dkdeploy/test_environment/path.rb', line 29 def resolve_path(path) splitted = path.split '/' splitted[0] = path_to splitted[0] splitted.join '/' end |