Skip to content

Commit

Permalink
Fix usage of Rack::File.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix authored and lloeki committed Jan 2, 2024
1 parent 548d0c6 commit 481036a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def call(env)
run SimpleAdapter.new
end
map '/files' do
run Rack::File.new('.')
run Rack::Files.new('.')
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rack/adapter/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def self.for(name, options={})
return Merb::Rack::Application.new

when :file
return Rack::File.new(options[:chdir])
return Rack::Files.new(options[:chdir])

else
raise AdapterNotFound, "Adapter not found: #{name}"
Expand Down
2 changes: 1 addition & 1 deletion lib/rack/adapter/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initialize(options = {})
load_application

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

def load_application
Expand Down

0 comments on commit 481036a

Please sign in to comment.