Module: Dkdeploy::TestEnvironment::Constants

Includes:
FileUtils
Included in:
Application, Remote
Defined in:
lib/dkdeploy/test_environment/constants.rb

Overview

Dkdeploy test constants.

Constant Summary collapse

@@root =

rubocop:disable Style/ClassVars

File.expand_path '../..', __FILE__

Instance Method Summary collapse

Instance Method Details

#assets_pathString

Assets path

Returns:

  • (String)


85
86
87
# File 'lib/dkdeploy/test_environment/constants.rb', line 85

def assets_path
  File.join shared_path, 'assets'
end

#capistrano_configuration_fixtures_pathString

Capistrano configuration fixtures path

Returns:

  • (String)


43
44
45
# File 'lib/dkdeploy/test_environment/constants.rb', line 43

def capistrano_configuration_fixtures_path
  File.join gem_root, 'spec', 'fixtures', 'capistrano', 'configuration'
end

#config_dev_pathString

Capistrano config dev path

Returns:

  • (String)


50
51
52
# File 'lib/dkdeploy/test_environment/constants.rb', line 50

def config_dev_path
  File.join test_app_path, 'config', 'deploy', 'dev.rb'
end

#current_pathString

Current path

Returns:

  • (String)


92
93
94
# File 'lib/dkdeploy/test_environment/constants.rb', line 92

def current_path
  File.join deploy_to, 'current'
end

#deploy_toString

Deploy to path

Returns:

  • (String)


71
72
73
# File 'lib/dkdeploy/test_environment/constants.rb', line 71

def deploy_to
  File.join('/', 'var', 'www', 'dkdeploy')
end

#gem_rootString

Gem root path

Returns:

  • (String)


15
16
17
# File 'lib/dkdeploy/test_environment/constants.rb', line 15

def gem_root
  @@root
end

#maintenance_config_file_pathString

maintenance config file path

Returns:

  • (String)


106
107
108
# File 'lib/dkdeploy/test_environment/constants.rb', line 106

def maintenance_config_file_path
  File.join shared_path, 'config', 'maintenance.json'
end

#releases_pathString

Release path

Returns:

  • (String)


99
100
101
# File 'lib/dkdeploy/test_environment/constants.rb', line 99

def releases_path
  File.join deploy_to, 'releases'
end

#remote_tmp_pathString

remote temporary directory path

Returns:

  • (String)


113
114
115
# File 'lib/dkdeploy/test_environment/constants.rb', line 113

def remote_tmp_path
  '/tmp'
end

#server_urlString

Url to vagrant server

Returns:

  • (String)


64
65
66
# File 'lib/dkdeploy/test_environment/constants.rb', line 64

def server_url
  'dkdeploy.dev'
end

#shared_pathString

Shared path

Returns:

  • (String)


78
79
80
# File 'lib/dkdeploy/test_environment/constants.rb', line 78

def shared_path
  File.join deploy_to, 'shared'
end

#stageString

Capistrano stage for tests

Returns:

  • (String)


57
58
59
# File 'lib/dkdeploy/test_environment/constants.rb', line 57

def stage
  'dev'
end

#template_pathString

Test app template path

Returns:

  • (String)


22
23
24
# File 'lib/dkdeploy/test_environment/constants.rb', line 22

def template_path
  File.join gem_root, 'spec', 'fixtures', 'application'
end

#test_app_pathString

Test app path

Returns:

  • (String)


36
37
38
# File 'lib/dkdeploy/test_environment/constants.rb', line 36

def test_app_path
  File.join tmp_path, 'aruba'
end

#tmp_pathString

Path to temporary directory

Returns:

  • (String)


29
30
31
# File 'lib/dkdeploy/test_environment/constants.rb', line 29

def tmp_path
  File.join gem_root, 'tmp'
end