Module: NginxStage::AppConfigView
- Included in:
- AppConfigGenerator, AppResetGenerator
- Defined in:
- lib/nginx_stage/views/app_config_view.rb
Overview
A view used as context for the app config ERB template file
Instance Method Summary collapse
-
#app_passenger_env ⇒ String
The Passenger environment to run app under.
-
#app_request_uri ⇒ String
The URI used to access the app from the browser.
-
#app_root ⇒ String
Path to the app root on the local filesystem.
-
#app_token ⇒ String
The token used to identify an app.
-
#sendfile_root ⇒ String
Path to the filesystem root where files are served from NB: Need to use a regular expression for user as this will be in a global app config that all users share.
-
#sendfile_uri ⇒ String
Internal URI used to access filesystem from apps.
Instance Method Details
#app_passenger_env ⇒ String
The Passenger environment to run app under
18 19 20 |
# File 'lib/nginx_stage/views/app_config_view.rb', line 18 def app_passenger_env NginxStage.app_passenger_env(env: env, owner: owner, name: name) end |
#app_request_uri ⇒ String
The URI used to access the app from the browser
6 7 8 |
# File 'lib/nginx_stage/views/app_config_view.rb', line 6 def app_request_uri "#{sub_uri}#{NginxStage.app_request_uri(env: env, owner: owner, name: name)}" end |
#app_root ⇒ String
Path to the app root on the local filesystem
12 13 14 |
# File 'lib/nginx_stage/views/app_config_view.rb', line 12 def app_root NginxStage.app_root(env: env, owner: owner, name: name) end |
#app_token ⇒ String
The token used to identify an app
24 25 26 |
# File 'lib/nginx_stage/views/app_config_view.rb', line 24 def app_token NginxStage.app_token(env: env, owner: owner, name: name) end |
#sendfile_root ⇒ String
Path to the filesystem root where files are served from NB: Need to use a regular expression for user as this will be in a global app config that all users share
38 39 40 |
# File 'lib/nginx_stage/views/app_config_view.rb', line 38 def sendfile_root NginxStage.pun_sendfile_root(user: "[\w-]+") end |
#sendfile_uri ⇒ String
Internal URI used to access filesystem from apps
30 31 32 |
# File 'lib/nginx_stage/views/app_config_view.rb', line 30 def sendfile_uri NginxStage.pun_sendfile_uri end |