Sha256: 25b14faed7a6896fafaca4296b684a3b29b85fd45d2362aabdee01aa7ca0c44d

Contents?: true

Size: 1.85 KB

Versions: 2

Compression:

Stored size: 1.85 KB

Contents

#debug_bar
  %h1 Debugger
  %ul
    %li
      %a.requestinfo{:href => '#', :onclick => 'jQuery("#debug_bar #requestinfo").toggleClass("show"); return false'} Request Info
    %li
      %a{:href => '/__ORANGE_DB__/migrate'} Reinitialize Database
  #requestinfo
    %h2 Request information
    - for var in [:GET, :POST, :cookies]
      %h3{:id => "#{var.to_s.downcase}-info"}= "#{var.to_s}"
      - unless packet.request.__send__(var).empty?
        %table.req
          %thead
            %tr
              %th Variable
              %th Value
          %tbody
            - packet.request.__send__(var).sort_by { |k, v| k.to_s }.each do |key, val|
              %tr
                %td #{key}
                %td.code
                  %div #{val.inspect}
      - else
        %p No #{var.to_s} data.
    %h3#env-info Rack ENV
    %table.req
      %thead
        %tr
          %th Variable
          %th Value
      %tbody
        - packet.env.sort_by { |k, v| k.to_s }.each do |key, val|
          - unless key =~ /^orange\./ 
            %tr
              %td #{h_debug key}
              %td.code
                %div #{h_debug val}
    %h3#orange-info Orange ENV
    %table.req
      %thead
        %tr
          %th Variable
          %th Value
      %tbody
        - packet.env['orange.env'].sort_by { |k, v| k.to_s }.each do |key, val|
          - if(![:request, :headers, :content].include?(key)) 
            %tr
              %td #{h_debug key}
              %td.code
                %div #{h_debug val}
    %h3#orange-info= 'Orange<br /> Response'
    %table.req
      %thead
        %tr
          %th Variable
          %th Value
      %tbody
        - packet.env['orange.env'].sort_by { |k, v| k.to_s }.each do |key, val|
          - if([:headers, :content].include?(key)) 
            %tr
              %td #{h_debug key}
              %td.code
                %div #{h_debug val}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
orange-0.1.8 lib/orange-more/debugger/views/debug_bar.haml
orange-0.1.7 lib/orange-more/debugger/views/debug_bar.haml