Top Level Namespace
Defined Under Namespace
Modules: Cucumber, Webrat Classes: ResponseHelper
Instance Method Summary collapse
-
#get_details_of_queue(queue, host) ⇒ Object
simple function to get at the number of messages on a queue and the number of consumers using it and store them in variables for later use.
- #octal_mode(mode) ⇒ Object
- #print_output ⇒ Object
Instance Method Details
#get_details_of_queue(queue, host) ⇒ Object
simple function to get at the number of messages on a queue and the number of consumers using it and store them in variables for later use
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/cucumber/nagios/steps/amqp_steps.rb', line 5 def get_details_of_queue(queue, host) AMQP.start(:host => host) do jobs = MQ.queue(queue) jobs.status do |msgs, cns| @messages = msgs @count = cns end AMQP.stop{ EM.stop } end end |
#octal_mode(mode) ⇒ Object
98 99 100 |
# File 'lib/cucumber/nagios/steps/file_steps.rb', line 98 def octal_mode(mode) ((mode.respond_to?(:oct) ? mode.oct : mode.to_i) & 007777) end |
#print_output ⇒ Object
55 56 57 58 59 60 |
# File 'lib/cucumber/nagios/steps/command_steps.rb', line 55 def print_output puts "--- run stdout:" puts @stdout puts "--- run stderr:" puts @stderr end |