Module: RaadTotem

Defined in:
lib/raad_totem/env.rb,
lib/raad_totem/runner.rb,
lib/raad_totem/version.rb,
lib/raad_totem/bootstrap.rb,
lib/raad_totem/shell_cmds/service.rb

Defined Under Namespace

Modules: ShellCmds Classes: Bootstrap, Runner

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.custom_optionsHash

returns the custom options hash set in the service options_parser class method

Returns:

  • (Hash)

    custom options hash



55
56
57
# File 'lib/raad_totem/env.rb', line 55

def custom_options
  @custom_options
end

.jruby?Boolean

are we running inside jruby

Returns:

  • (Boolean)

    true if runnig inside jruby



13
14
15
# File 'lib/raad_totem/env.rb', line 13

def jruby?
  !!(defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
end

.ruby_optionsArray

ruby interpreter command line options

Returns:

  • (Array)

    command line options list



27
28
29
# File 'lib/raad_totem/env.rb', line 27

def ruby_options
  @ruby_options ||= []
end

.ruby_options=(options_str) ⇒ Object

set ruby interpreter command line options

Parameters:

  • options_str (String)

    space separated options list



34
35
36
# File 'lib/raad_totem/env.rb', line 34

def ruby_options=(options_str)
  @ruby_options = options_str.split
end

.ruby_pathString

absolute path of current interpreter

Returns:

  • (String)

    absolute path of current interpreter



20
21
22
# File 'lib/raad_totem/env.rb', line 20

def ruby_path
  File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["RUBY_INSTALL_NAME"] + RbConfig::CONFIG["EXEEXT"])
end

.stopped=(state) ⇒ Object

used internally to set the stopped flag

Parameters:

  • state (Boolean)

    true to set the stopped flag



48
49
50
# File 'lib/raad_totem/env.rb', line 48

def stopped=(state)
  @stop_lock.synchronize{@stopped = !!state}
end

.stopped?Boolean

a request to stop the service has been received (or the #start method has returned and, if defined, the service #stop method has been called by RaadTotem.

Returns:

  • (Boolean)

    true is the service has been stopped



41
42
43
# File 'lib/raad_totem/env.rb', line 41

def stopped?
  @stop_lock.synchronize{@stopped}
end