Sha256: 1f07dc11c4da37d22a53169f81bbac396e9573835644d46b095267eaf0562b28

Contents?: true

Size: 626 Bytes

Versions: 34

Compression:

Stored size: 626 Bytes

Contents

module Rack::Insight
  class ActiveResourcePanel
    class RequestResult
      include Rack::Insight::FilteredBacktrace

      attr_reader :path, :args, :result, :time
      alias results result

      def initialize(path, args, time, backtrace = [], result=nil)
        @path = path
        @args = args
        @time = time
        @backtrace = backtrace
        @result = result
      end

      def human_time
        "%.2fms" % (@time)
      end

      def valid_hash?(secret_key, possible_hash)
        hash = Digest::SHA1.hexdigest [secret_key, @sql].join(":")
        possible_hash == hash
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
rack-insight-0.5.13 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.12 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.11 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.10 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.9 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.8 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.7 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.6 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.5 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.4 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.3 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.2 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.1 lib/rack/insight/panels/active_resource_panel/query.rb
rack-insight-0.5.0 lib/rack/insight/panels/active_resource_panel/query.rb