Module: Server

Defined in:
lib/server.rb,
lib/server/cli.rb,
lib/server/log.rb,
lib/server/sys.rb,
lib/server/conf.rb,
lib/server/installed.rb,
lib/server/workflows/db.rb,
lib/server/workflows/web.rb,
lib/server/packages/nginx.rb,
lib/server/packages/phpfpm.rb,
lib/server/packages/templates/nginx.rb,
lib/server/packages/templates/renderer.rb

Defined Under Namespace

Modules: Packages, Templates, Workflows Classes: CLI, Conf, Installed, Log, Sys

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.app_dirObject (readonly)

Returns the value of attribute app_dir.



10
11
12
# File 'lib/server.rb', line 10

def app_dir
  @app_dir
end

.configObject

Returns the value of attribute config.



9
10
11
# File 'lib/server.rb', line 9

def config
  @config
end

.config_pathObject

Returns the value of attribute config_path.



9
10
11
# File 'lib/server.rb', line 9

def config_path
  @config_path
end

.pkg_pathObject (readonly)

Returns the value of attribute pkg_path.



10
11
12
# File 'lib/server.rb', line 10

def pkg_path
  @pkg_path
end

.runtime_pathObject (readonly)

Returns the value of attribute runtime_path.



10
11
12
# File 'lib/server.rb', line 10

def runtime_path
  @runtime_path
end

.settingsObject

Returns the value of attribute settings.



9
10
11
# File 'lib/server.rb', line 9

def settings
  @settings
end

.sys_dirObject (readonly)

Returns the value of attribute sys_dir.



10
11
12
# File 'lib/server.rb', line 10

def sys_dir
  @sys_dir
end

.template_pathObject (readonly)

Returns the value of attribute template_path.



10
11
12
# File 'lib/server.rb', line 10

def template_path
  @template_path
end

Class Method Details

.initObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/server.rb', line 12

def init
  @settings = { :setting_one => "foo", :setting_two => "bar" }
  @runtime_path = File.expand_path('..', File.dirname( __FILE__ ) )
  @sys_dir = Pathname.new("/usr/local/etc")
  @app_dir = Pathname.new("#{@sys_dir}/server-gem")
  @config_path = Pathname.new("#{@app_dir}/config.json")
  @template_path = File.expand_path('./server/packages/templates/raw', File.dirname(__FILE__) )
  @pkg_path = File.expand_path('../pkg', File.dirname(__FILE__))

  @config = Server::Conf.new({
    :sys_dir => @sys_dir,
    :app_dir => @app_dir,
    :config_path => @config_path,
    :settings => @settings,
    :template_path => @template_path
  })

  Server::Sys.init
end