Class: ProbeDockProbe::Client
- Inherits:
-
Object
- Object
- ProbeDockProbe::Client
- Defined in:
- lib/probe_dock_ruby/client.rb
Instance Method Summary collapse
-
#initialize(server, options = {}) ⇒ Client
constructor
A new instance of Client.
- #process(test_run) ⇒ Object
Constructor Details
#initialize(server, options = {}) ⇒ Client
Returns a new instance of Client.
7 8 9 10 11 12 13 14 |
# File 'lib/probe_dock_ruby/client.rb', line 7 def initialize server, = {} @server = server @publish, @local_mode, @workspace = [:publish], [:local_mode], [:workspace] @print_payload, @save_payload = [:print_payload], [:save_payload] @uid = UID.new workspace: @workspace end |
Instance Method Details
#process(test_run) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/probe_dock_ruby/client.rb', line 16 def process test_run return fail "No server to publish results to" if !@server test_run.uid = @uid.load_uid = {} return false unless payload = build_payload(test_run, ) published = if !@publish puts Paint["Probe Dock - Publishing disabled", :yellow] false elsif publish_payload payload true else false end save_payload payload if @save_payload print_payload payload if @print_payload puts published end |