Module: Saucer::Annotations
- Included in:
- Sauce
- Defined in:
- lib/saucer/annotations.rb
Instance Method Summary collapse
- #breakpoint ⇒ Object
- #build_name=(name) ⇒ Object
- #comment=(comment) ⇒ Object
- #job_info=(info) ⇒ Object
- #job_name=(name) ⇒ Object
- #job_result=(result) ⇒ Object
- #job_tags=(tags) ⇒ Object
- #start_vm ⇒ Object
- #stop_vm ⇒ Object
Instance Method Details
#breakpoint ⇒ Object
39 40 41 |
# File 'lib/saucer/annotations.rb', line 39 def breakpoint driver.execute_script("sauce: break") end |
#build_name=(name) ⇒ Object
27 28 29 |
# File 'lib/saucer/annotations.rb', line 27 def build_name=(name) driver.execute_script("sauce:job-build=#{name}") end |
#comment=(comment) ⇒ Object
4 5 6 |
# File 'lib/saucer/annotations.rb', line 4 def comment=(comment) driver.execute_script("sauce:context=#{comment}") end |
#job_info=(info) ⇒ Object
22 23 24 25 |
# File 'lib/saucer/annotations.rb', line 22 def job_info=(info) raise ArgumentError, "job info must be JSON" unless info.is_a? JSON driver.execute_script("sauce:job-info=#{info}") end |
#job_name=(name) ⇒ Object
13 14 15 |
# File 'lib/saucer/annotations.rb', line 13 def job_name=(name) driver.execute_script("sauce:job-name=#{name}") end |
#job_result=(result) ⇒ Object
8 9 10 11 |
# File 'lib/saucer/annotations.rb', line 8 def job_result=(result) raise ArgumentError, "invalid value for result" unless ['passed', 'failed', true, false].include?(result) driver.execute_script("sauce:job-result=#{result}") end |
#job_tags=(tags) ⇒ Object
17 18 19 20 |
# File 'lib/saucer/annotations.rb', line 17 def () = .join(',') if .is_a?(Array) driver.execute_script("sauce:job-tags=#{}") end |
#start_vm ⇒ Object
35 36 37 |
# File 'lib/saucer/annotations.rb', line 35 def start_vm driver.execute_script("sauce: start network") end |
#stop_vm ⇒ Object
31 32 33 |
# File 'lib/saucer/annotations.rb', line 31 def stop_vm driver.execute_script("sauce: stop network") end |