Skip to content

Commit

Permalink
Work around differences between Rack 1.2.1 and git HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Jan 30, 2011
1 parent 38f29f8 commit ca1cd40
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/ramaze.rb
Expand Up @@ -66,7 +66,14 @@ class << self; attr_accessor :options; end
m.use Rack::ShowStatus
m.use Rack::RouteExceptions
m.use Rack::ConditionalGet
m.use Rack::ETag, 'public'

# FIXME: This works around differences between Rack 1.2.1 and the git HEAD
if Rack::ETag.instance_method(:initialize).arity == 1
m.use Rack::ETag
else
m.use Rack::ETag, 'public'
end

m.use Rack::Head
m.use Ramaze::Reloader
m.run Ramaze::AppMap
Expand All @@ -77,6 +84,14 @@ class << self; attr_accessor :options; end
m.use Rack::RouteExceptions
m.use Rack::ShowStatus
m.use Rack::ConditionalGet

# FIXME: This works around differences between Rack 1.2.1 and the git HEAD
if Rack::ETag.instance_method(:initialize).arity == 1
m.use Rack::ETag
else
m.use Rack::ETag, 'public'
end

m.use Rack::ETag
m.use Rack::Head
m.run Ramaze::AppMap
Expand Down

1 comment on commit ca1cd40

@godfat
Copy link

@godfat godfat commented on ca1cd40 Jan 30, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

Please sign in to comment.