Sha256: 98dfb36fdfb185a815e1638bec10d4c24021fd216a35efa7e49650e9d5ec5931

Contents?: true

Size: 302 Bytes

Versions: 1

Compression:

Stored size: 302 Bytes

Contents

class Jawbit::JawboneRack
  delegate :instrument, to: ActiveSupport::Notifications

  def call(env)
    request = Rack::Request.new env

    instrument 'notification.jawbone', json: json(request)

    [200, {}, ['']]
  end

  private

  def json(request)
    MultiJson.load request.body.read
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jawbit-0.1.0 lib/jawbit/jawbone_rack.rb