# File lib/aruba/reporting.rb, line 71 def again(erb, _erbout, file) _erbout.concat(erb.result(binding)) end
# File lib/aruba/reporting.rb, line 75 def children(dir) Dir["#{dir}/*"].sort end
# File lib/aruba/reporting.rb, line 46 def commands @commands || [] end
# File lib/aruba/reporting.rb, line 83 def depth File.dirname(@scenario.feature.file).split('/').length end
# File lib/aruba/reporting.rb, line 40 def description unescaped_description = @scenario.description.gsub(/^(\s*)\\/, '\1') markdown = RDiscount.new(unescaped_description) markdown.to_html end
# File lib/aruba/reporting.rb, line 65 def files erb = ERB.new(template('files.erb'), nil, '-') file = current_dir erb.result(binding) end
# File lib/aruba/reporting.rb, line 87 def index erb = ERB.new(template('index.erb'), nil, '-') erb.result(binding) end
# File lib/aruba/reporting.rb, line 92 def index_title "Examples" end
# File lib/aruba/reporting.rb, line 50 def output @aruba_keep_ansi = true # We want the output coloured! escaped_stdout = CGI.escapeHTML(all_stdout) html = Bcat::ANSI.new(escaped_stdout).to_html Bcat::ANSI::STYLES.each do |name, style| html.gsub!(/style='#{style}'/, %{class="xterm_#{name}"}) end html end
# File lib/aruba/reporting.rb, line 21 def pygmentize(file) pygmentize = Process.new(%{pygmentize -f html -O encoding=utf-8 "#{file}"}, 3, 0.5) pygmentize.run! do |p| exit_status = p.stop(false) if(exit_status == 0) p.stdout(false) elsif(p.stderr(false) =~ /no lexer/) # Pygment's didn't recognize it IO.read(file) else STDERR.puts "\e[31m#{p.stderr} - is pygments installed?\e[0m" exit $?.exitstatus end end end
# File lib/aruba/reporting.rb, line 60 def report erb = ERB.new(template('main.erb'), nil, '-') erb.result(binding) end
Generated with the Darkfish Rdoc Generator 2.