Sha256: 2dd922bf7872957dd94ed2056268592eb2f9a58f4942f97360b9bf7fbf4797f1

Contents?: true

Size: 624 Bytes

Versions: 37

Compression:

Stored size: 624 Bytes

Contents

class TrackAllTheThings < Rack::Tracker::Handler
  def render
    Tilt.new( File.join( File.dirname(__FILE__), '../fixtures/track_all_the_things.erb') ).render(self)
  end

  def self.track(name, event)
    { name.to_s => event }
  end

  def track_me
    env['tracker']['track_all_the_things']
  end
end


class AnotherHandler < Rack::Tracker::Handler
  self.position = :body

  def render
    Tilt.new( File.join( File.dirname(__FILE__), '../fixtures/another_handler.erb') ).render(self)
  end

  def self.track(name, event)
    { name.to_s => event }
  end

  def track_me
    env['tracker']['another_handler']
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rack-tracker-0.4.2 spec/support/fake_handler.rb
rack-tracker-0.4.1 spec/support/fake_handler.rb
rack-tracker-0.4.0 spec/support/fake_handler.rb
rack-tracker-0.3.0 spec/support/fake_handler.rb
rack-tracker-0.2.6 spec/support/fake_handler.rb
rack-tracker-0.2.5 spec/support/fake_handler.rb
rack-tracker-0.2.4 spec/support/fake_handler.rb
rack-tracker-0.2.3 spec/support/fake_handler.rb
rack-tracker-0.2.2 spec/support/fake_handler.rb
rack-tracker-0.2.1 spec/support/fake_handler.rb
rack-tracker-0.2.0 spec/support/fake_handler.rb
rack-tracker-0.1.3 spec/support/fake_handler.rb
rack-tracker-0.1.1 spec/support/fake_handler.rb
rack-tracker-0.1.0 spec/support/fake_handler.rb
rack-tracker-0.0.4 spec/support/fake_handler.rb
rack-tracker-0.0.3 spec/support/fake_handler.rb
rack-tracker-0.0.2 spec/support/fake_handler.rb