Sha256: ba0cdba307e75360bd15789d94396e4ecbd8e25d74458ff1a687c815f66058dd

Contents?: true

Size: 663 Bytes

Versions: 19

Compression:

Stored size: 663 Bytes

Contents

module Padrino
  ##
  # This module extend Sinatra::ShowExceptions adding Padrino as "Framework"
  #
  module ShowExceptions

    def self.included(base)
      base.alias_method_chain :frame_class, :padrino
    end

    def frame_class_with_padrino(frame)
      if frame.filename =~ /lib\/sinatra.*\.rb|lib\/padrino.*\.rb/
        "framework"
      elsif (defined?(Gem) && frame.filename.include?(Gem.dir)) ||
            frame.filename =~ /\/bin\/(\w+)$/ ||
            frame.filename =~ /Ruby\/Gems/
        "system"
      else
        "app"
      end
    end
  end # ShowExceptions
end # Padrino

Sinatra::ShowExceptions.send(:include, Padrino::ShowExceptions)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
padrino-core-0.9.26 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.24 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.25 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.23 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.22 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.21 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.20 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.19 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.18 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.17 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.16 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.15 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.14 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.13 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.12 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.11 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.10 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.9 lib/padrino-core/application/showexceptions.rb
padrino-core-0.9.7 lib/padrino-core/application/showexceptions.rb