lilypad 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -31,6 +31,8 @@ class ApplicationController < ActionController::Base
31
31
 
32
32
  def rescue_action(exception)
33
33
  super
34
+ request.env['rack.lilypad.component'] = params[:controller]
35
+ request.env['rack.lilypad.action'] = params[:action]
34
36
  raise exception
35
37
  end
36
38
  end
data/gemspec.rb CHANGED
@@ -14,5 +14,5 @@ GEM_SPEC = Gem::Specification.new do |s|
14
14
  s.name = GEM_NAME
15
15
  s.platform = Gem::Platform::RUBY
16
16
  s.require_path = "lib"
17
- s.version = "0.2.0"
17
+ s.version = "0.2.1"
18
18
  end
data/lib/rack/lilypad.rb CHANGED
@@ -31,7 +31,7 @@ module Rack
31
31
 
32
32
  class Hoptoad
33
33
 
34
- def initialize(api_key, filters, log)
34
+ def initialize(api_key, filters=[], log=false)
35
35
  @api_key = api_key
36
36
  @filters = filters
37
37
  @log = log
@@ -109,7 +109,8 @@ module Rack
109
109
  end
110
110
  end
111
111
  n.request do |r|
112
- r.component request_path
112
+ r.action environment['rack.lilypad.action']
113
+ r.component environment['rack.lilypad.component'] || request_path
113
114
  r.url request_path
114
115
  if request.params.any?
115
116
  r.params do |p|
@@ -10,6 +10,8 @@ class ApplicationController < ActionController::Base
10
10
 
11
11
  def rescue_action(exception)
12
12
  super
13
+ request.env['rack.lilypad.component'] = params[:controller]
14
+ request.env['rack.lilypad.action'] = params[:action]
13
15
  raise exception
14
16
  end
15
17