Skip to content

Commit 9661006

Browse files
ioquatixlloeki
authored andcommitted
Fix usage of Rack::File.
1 parent 548d0c6 commit 9661006

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

example/adapter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ def call(env)
2020
run SimpleAdapter.new
2121
end
2222
map '/files' do
23-
run Rack::File.new('.')
23+
run Rack::Files.new('.')
2424
end
2525
end
2626

2727
# You could also start the server like this:
2828
#
2929
# app = Rack::URLMap.new('/test' => SimpleAdapter.new,
30-
# '/files' => Rack::File.new('.'))
30+
# '/files' => Rack::Files.new('.'))
3131
# Thin::Server.start('0.0.0.0', 3000, app)
3232
#

lib/rack/adapter/loader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def self.for(name, options={})
6464
return Merb::Rack::Application.new
6565

6666
when :file
67-
return Rack::File.new(options[:chdir])
67+
return Rack::Files.new(options[:chdir])
6868

6969
else
7070
raise AdapterNotFound, "Adapter not found: #{name}"

lib/rack/adapter/rails.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(options = {})
2323
load_application
2424

2525
@rails_app = self.class.rack_based? ? ActionController::Dispatcher.new : CgiApp.new
26-
@file_app = Rack::File.new(::File.join(RAILS_ROOT, "public"))
26+
@file_app = Rack::Files.new(::File.join(RAILS_ROOT, "public"))
2727
end
2828

2929
def load_application

0 commit comments

Comments
 (0)