Module: Girdle
- Extended by:
- Girdle
- Included in:
- Girdle
- Defined in:
- lib/girdle.rb,
lib/girdle/job.rb,
lib/girdle/grid.rb,
lib/girdle/task.rb,
lib/girdle/helpers.rb,
lib/girdle/version.rb,
lib/girdle/log_entry.rb,
lib/girdle/controller.rb,
lib/girdle/specification.rb
Defined Under Namespace
Modules: Helpers
Classes: Controller, Grid, Job, LogEntry, Specification, Task
Constant Summary
collapse
- VERSION =
"0.1.4"
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#auth ⇒ Object
31
32
33
|
# File 'lib/girdle.rb', line 31
def auth
@auth ||= 'None'
end
|
#autocopy ⇒ Object
50
51
52
|
# File 'lib/girdle.rb', line 50
def autocopy
@autocopy ||= 'YES'
end
|
#failover ⇒ Object
45
46
47
|
# File 'lib/girdle.rb', line 45
def failover
@failover ||= 'YES'
end
|
40
41
42
|
# File 'lib/girdle.rb', line 40
def format
@format ||= 'xml'
end
|
#hostname ⇒ Object
26
27
28
|
# File 'lib/girdle.rb', line 26
def hostname
@hostname ||= 'localhost'
end
|
#password ⇒ Object
35
36
37
|
# File 'lib/girdle.rb', line 35
def password
@password ||= ''
end
|
#xgrid ⇒ Object
22
23
24
|
# File 'lib/girdle.rb', line 22
def xgrid
@xgrid ||= '/usr/bin/xgrid'
end
|
Instance Method Details
#run(options = {}) ⇒ Object
54
55
56
57
58
|
# File 'lib/girdle.rb', line 54
def run(options = {})
options = default_options.merge(options)
result = `#{xgrid} #{options_format(options)}`
parse(result) if $?.to_i == 0
end
|
#run_batch(xml, options = {}) ⇒ Object
60
61
62
63
64
|
# File 'lib/girdle.rb', line 60
def run_batch(xml, options = {})
options = default_options.merge(options)
result = `echo "#{xml}" | #{xgrid} #{options_format(options)} -`
parse(result.force_encoding('utf-8')) if $?.to_i == 0
end
|
#run_redirect(options = {}) ⇒ Object
66
67
68
69
|
# File 'lib/girdle.rb', line 66
def run_redirect(options = {})
options = default_options.merge(options)
`#{xgrid} #{options_format(options)} 2>&1`.force_encoding('utf-8')
end
|