Class: Gordon::EnvVars
- Inherits:
-
Object
- Object
- Gordon::EnvVars
- Defined in:
- lib/gordon/env_vars.rb
Instance Attribute Summary collapse
-
#app_description ⇒ Object
Returns the value of attribute app_description.
-
#app_homepage ⇒ Object
Returns the value of attribute app_homepage.
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#app_source ⇒ Object
Returns the value of attribute app_source.
-
#app_source_excludes ⇒ Object
Returns the value of attribute app_source_excludes.
-
#app_type ⇒ Object
Returns the value of attribute app_type.
-
#app_version ⇒ Object
Returns the value of attribute app_version.
-
#http_server_type ⇒ Object
Returns the value of attribute http_server_type.
-
#init_type ⇒ Object
Returns the value of attribute init_type.
-
#runtime_name ⇒ Object
Returns the value of attribute runtime_name.
-
#runtime_version ⇒ Object
Returns the value of attribute runtime_version.
-
#web_server_type ⇒ Object
Returns the value of attribute web_server_type.
Class Method Summary collapse
Instance Attribute Details
#app_description ⇒ Object
Returns the value of attribute app_description.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_description @app_description end |
#app_homepage ⇒ Object
Returns the value of attribute app_homepage.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_homepage @app_homepage end |
#app_name ⇒ Object
Returns the value of attribute app_name.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_name @app_name end |
#app_source ⇒ Object
Returns the value of attribute app_source.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_source @app_source end |
#app_source_excludes ⇒ Object
Returns the value of attribute app_source_excludes.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_source_excludes @app_source_excludes end |
#app_type ⇒ Object
Returns the value of attribute app_type.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_type @app_type end |
#app_version ⇒ Object
Returns the value of attribute app_version.
3 4 5 |
# File 'lib/gordon/env_vars.rb', line 3 def app_version @app_version end |
#http_server_type ⇒ Object
Returns the value of attribute http_server_type.
5 6 7 |
# File 'lib/gordon/env_vars.rb', line 5 def http_server_type @http_server_type end |
#init_type ⇒ Object
Returns the value of attribute init_type.
7 8 9 |
# File 'lib/gordon/env_vars.rb', line 7 def init_type @init_type end |
#runtime_name ⇒ Object
Returns the value of attribute runtime_name.
4 5 6 |
# File 'lib/gordon/env_vars.rb', line 4 def runtime_name @runtime_name end |
#runtime_version ⇒ Object
Returns the value of attribute runtime_version.
4 5 6 |
# File 'lib/gordon/env_vars.rb', line 4 def runtime_version @runtime_version end |
#web_server_type ⇒ Object
Returns the value of attribute web_server_type.
6 7 8 |
# File 'lib/gordon/env_vars.rb', line 6 def web_server_type @web_server_type end |
Class Method Details
.from_cook(options) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gordon/env_vars.rb', line 9 def self.from_cook() env_vars = [] env_vars << "GORDON_APP_TYPE='#{.app_type}'" env_vars << "GORDON_APP_NAME='#{.app_name}'" env_vars << "GORDON_APP_DESCRIPTION='#{.app_description}'" env_vars << "GORDON_APP_HOMEPAGE='#{.app_homepage}'" env_vars << "GORDON_APP_VERSION='#{.app_version}'" env_vars << "GORDON_APP_SOURCE='#{File.(.app_source)}'" env_vars << "GORDON_APP_SOURCE_EXCLUDES='#{.app_source_excludes.to_a.join(",") }'" env_vars << "GORDON_RUNTIME_NAME='#{.runtime_name}'" env_vars << "GORDON_RUNTIME_VERSION='#{.runtime_version}'" env_vars << "GORDON_HTTP_SERVER_TYPE='#{.http_server_type}'" env_vars << "GORDON_WEB_SERVER_TYPE='#{.web_server_type}'" env_vars << "GORDON_INIT_TYPE='#{.init_type}'" env_vars end |
.load ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/gordon/env_vars.rb', line 27 def self.load env_vars = self.new env_vars.app_type = ENV['GORDON_APP_TYPE'] env_vars.app_name = ENV['GORDON_APP_NAME'] env_vars.app_description = ENV['GORDON_APP_DESCRIPTION'] env_vars.app_homepage = ENV['GORDON_APP_HOMEPAGE'] env_vars.app_version = ENV['GORDON_APP_VERSION'] env_vars.app_source = ENV['GORDON_APP_SOURCE'] env_vars.app_source_excludes = ENV['GORDON_APP_SOURCE_EXCLUDES'].to_s.split(",") env_vars.runtime_name = ENV['GORDON_RUNTIME_NAME'] env_vars.runtime_version = ENV['GORDON_RUNTIME_VERSION'] env_vars.http_server_type = ENV['GORDON_HTTP_SERVER_TYPE'] env_vars.web_server_type = ENV['GORDON_WEB_SERVER_TYPE'] env_vars.init_type = ENV['GORDON_INIT_TYPE'] env_vars end |