Top Level Namespace

Defined Under Namespace

Modules: Enumerable, Eye Classes: Array, NilClass, Numeric, Object, String, Symbol

Instance Method Summary collapse

Instance Method Details

#current_config_pathObject

current eye parsed config path


5
6
7
# File 'lib/eye/dsl/helpers.rb', line 5

def current_config_path
  Eye.parsed_filename && File.symlink?(Eye.parsed_filename) ? File.readlink(Eye.parsed_filename) : Eye.parsed_filename
end

#example_process(proxy, name) ⇒ Object


14
15
16
17
18
19
20
# File 'lib/eye/dsl/helpers.rb', line 14

def example_process(proxy, name)
  proxy.process(name) do
    pid_file "/tmp/#{name}.pid"
    start_command "sleep 100"
    daemonize true
  end
end

#hostnameObject

host name


10
11
12
# File 'lib/eye/dsl/helpers.rb', line 10

def hostname
  Eye::Local.host
end

#silence_warningsObject


3
4
5
6
7
8
# File 'lib/eye/utils/mini_active_support.rb', line 3

def silence_warnings
  old_verbose, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = old_verbose
end